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

Version Description

Aug 13, 2021 = * Fix: Plugin security issue.

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.2.2
Comparing to
See all releases

Code changes from version 2.2.1 to 2.2.2

Files changed (70) hide show
  1. admin/class-wp-carousel-free-admin.php +6 -27
  2. admin/img/image_select/image_select.php +9 -0
  3. admin/views/help.php +44 -46
  4. admin/views/metabox-config.php +71 -5
  5. admin/views/notices/class-wp-carousel-free-promotion.php +163 -162
  6. admin/views/notices/review.php +24 -20
  7. admin/views/option-config.php +18 -10
  8. admin/views/premium.php +34 -56
  9. admin/views/tmce-button.php +27 -17
  10. admin/views/tools-config.php +13 -2
  11. admin/views/wpcfree-metabox/assets/css/spf.css +19 -1
  12. admin/views/wpcfree-metabox/assets/css/spf.min.css +1 -1
  13. admin/views/wpcfree-metabox/assets/js/spf.js +33 -33
  14. admin/views/wpcfree-metabox/assets/js/spf.min.js +1 -1
  15. admin/views/wpcfree-metabox/classes/abstract.class.php +38 -12
  16. admin/views/wpcfree-metabox/classes/fields.class.php +49 -11
  17. admin/views/wpcfree-metabox/classes/metabox.class.php +119 -42
  18. admin/views/wpcfree-metabox/classes/options.class.php +179 -53
  19. admin/views/wpcfree-metabox/classes/setup.class.php +153 -59
  20. admin/views/wpcfree-metabox/classes/widgets.class.php +57 -11
  21. admin/views/wpcfree-metabox/fields/backup/backup.php +0 -42
  22. admin/views/wpcfree-metabox/fields/border/border.php +58 -38
  23. admin/views/wpcfree-metabox/fields/button_set/button_set.php +26 -14
  24. admin/views/wpcfree-metabox/fields/carousel_type/carousel_type.php +28 -9
  25. admin/views/wpcfree-metabox/fields/checkbox/checkbox.php +65 -53
  26. admin/views/wpcfree-metabox/fields/code_editor/code_editor.php +66 -36
  27. admin/views/wpcfree-metabox/fields/color/color.php +51 -34
  28. admin/views/wpcfree-metabox/fields/color_group/color_group.php +39 -24
  29. admin/views/wpcfree-metabox/fields/column/column.php +35 -30
  30. admin/views/wpcfree-metabox/fields/custom_import/custom_import.php +25 -10
  31. admin/views/wpcfree-metabox/fields/gallery/gallery.php +32 -19
  32. admin/views/wpcfree-metabox/fields/heading/heading.php +17 -3
  33. admin/views/wpcfree-metabox/fields/image_select/image_select.php +27 -8
  34. admin/views/wpcfree-metabox/fields/image_sizes/image_sizes.php +32 -18
  35. admin/views/wpcfree-metabox/fields/index.php +1 -1
  36. admin/views/wpcfree-metabox/fields/media/media.php +87 -69
  37. admin/views/wpcfree-metabox/fields/notice/notice.php +15 -1
  38. admin/views/wpcfree-metabox/fields/radio/radio.php +20 -7
  39. admin/views/wpcfree-metabox/fields/select/select.php +21 -8
  40. admin/views/wpcfree-metabox/fields/selectf/selectf.php +20 -7
  41. admin/views/wpcfree-metabox/fields/shortcode/shortcode.php +15 -1
  42. admin/views/wpcfree-metabox/fields/spacing/spacing.php +26 -21
  43. admin/views/wpcfree-metabox/fields/spinner/spinner.php +37 -12
  44. admin/views/wpcfree-metabox/fields/subheading/subheading.php +25 -12
  45. admin/views/wpcfree-metabox/fields/switcher/switcher.php +25 -10
  46. admin/views/wpcfree-metabox/fields/switcherf/switcherf.php +20 -6
  47. admin/views/wpcfree-metabox/fields/text/text.php +45 -29
  48. admin/views/wpcfree-metabox/fields/typography/typography.php +122 -73
  49. admin/views/wpcfree-metabox/functions/actions.php +17 -147
  50. admin/views/wpcfree-metabox/functions/customize.php +0 -115
  51. admin/views/wpcfree-metabox/functions/deprecated.php +0 -7
  52. admin/views/wpcfree-metabox/functions/helpers.php +55 -28
  53. admin/views/wpcfree-metabox/functions/sanitize.php +30 -14
  54. admin/views/wpcfree-metabox/functions/validate.php +39 -103
  55. includes/class-wp-carosuel-free-updates.php +2 -2
  56. includes/class-wp-carousel-free-i18n.php +0 -2
  57. includes/class-wp-carousel-free-import-export.php +15 -12
  58. includes/class-wp-carousel-free-post-types.php +4 -3
  59. includes/class-wp-carousel-free-shortcode.php +1 -2
  60. includes/updates/update-2.1.7.php +10 -0
  61. public/class-wp-carousel-free-public.php +8 -1
  62. public/dynamic-style.php +1 -1
  63. public/shortcode-deprecated.php +11 -8
  64. public/templates/image-carousel.php +7 -7
  65. public/templates/post-carousel.php +4 -4
  66. public/templates/preloader.php +2 -2
  67. public/templates/product-carousel.php +6 -7
  68. readme.txt +4 -0
  69. uninstall.php +2 -2
  70. wp-carousel-free.php +7 -7
admin/class-wp-carousel-free-admin.php CHANGED
@@ -40,27 +40,6 @@ class WP_Carousel_Free_Admin {
40
  */
41
  protected $version;
42
 
43
- /**
44
- * The single instance of the class.
45
- *
46
- * @var self
47
- * @since 2.0.0
48
- */
49
- private static $_instance = null;
50
-
51
- /**
52
- * Allows for accessing single instance of class. Class should only be constructed once per call.
53
- *
54
- * @since 2.0.0
55
- * @static
56
- * @return self Main instance.
57
- */
58
- public static function instance() {
59
- if ( is_null( self::$_instance ) ) {
60
- self::$_instance = new self();
61
- }
62
- return self::$_instance;
63
- }
64
 
65
  /**
66
  * Initialize the class sets its properties.
@@ -103,11 +82,11 @@ class WP_Carousel_Free_Admin {
103
  2 => '',
104
  3 => '',
105
  4 => __( 'Carousel updated.', 'wp-carousel-free' ),
106
- 5 => isset( $_GET['revision'] ) ? sprintf( __( 'Carousel restored to revision from %s', 'wp-carousel-free' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
107
  6 => sprintf( __( 'Carousel published.', 'wp-carousel-free' ) ),
108
  7 => __( 'Carousel saved.', 'wp-carousel-free' ),
109
  8 => sprintf( __( 'Carousel submitted.', 'wp-carousel-free' ) ),
110
- 9 => sprintf( __( 'Carousel scheduled for: <strong>%1$s</strong>.', 'wp-carousel-free' ), date_i18n( __( 'M j, Y @ G:i', 'wp-carousel-free' ), strtotime( $post->post_date ) ) ),
111
  10 => sprintf( __( 'Carousel draft updated.', 'wp-carousel-free' ) ),
112
  );
113
  return $messages;
@@ -141,11 +120,11 @@ class WP_Carousel_Free_Admin {
141
  $carousels_types = isset( $upload_data['wpcp_carousel_type'] ) ? $upload_data['wpcp_carousel_type'] : '';
142
  switch ( $column ) {
143
  case 'shortcode':
144
- $column_field = '<input style="width: 270px; padding: 6px;cursor:pointer;" type="text" onClick="this.select();" readonly="readonly" value="[sp_wpcarousel id=&quot;' . $post_id . '&quot;]"/><div class="spwpc-after-copy-text"><i class="fa fa-check-circle"></i> Shortcode Copied to Clipboard! </div>';
145
- echo $column_field;
146
  break;
147
  case 'carousel_type':
148
- echo ucwords( str_replace( '-', ' ', $carousels_types ) );
149
 
150
  } // end switch.
151
  }
@@ -214,7 +193,7 @@ class WP_Carousel_Free_Admin {
214
  $screen = get_current_screen();
215
  if ( 'sp_wp_carousel' === get_post_type() || 'sp_wp_carousel_page_wpcp_settings' === $screen->id || 'sp_wp_carousel_page_wpcp_help' === $screen->id ) {
216
  $url = 'https://wordpress.org/support/plugin/wp-carousel-free/reviews/?filter=5#new-post';
217
- $text = sprintf( __( 'If you like <strong>WordPress Carousel</strong>, please leave us a <a href="%s" target="_blank">&#9733;&#9733;&#9733;&#9733;&#9733;</a> rating. Your Review is very important to us as it helps us to grow more. ', 'wp-carousel-free' ), $url );
218
  }
219
 
220
  return $text;
40
  */
41
  protected $version;
42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
 
44
  /**
45
  * Initialize the class sets its properties.
82
  2 => '',
83
  3 => '',
84
  4 => __( 'Carousel updated.', 'wp-carousel-free' ),
85
+ 5 => isset( $_GET['revision'] ) ? sprintf( 'Carousel restored to revision from %s', wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, // phpcs:disable WordPress.Security.NonceVerification.Recommended
86
  6 => sprintf( __( 'Carousel published.', 'wp-carousel-free' ) ),
87
  7 => __( 'Carousel saved.', 'wp-carousel-free' ),
88
  8 => sprintf( __( 'Carousel submitted.', 'wp-carousel-free' ) ),
89
+ 9 => sprintf( 'Carousel scheduled for: <strong>%1$s</strong>', date_i18n( __( 'M j, Y @ G:i', 'wp-carousel-free' ), strtotime( $post->post_date ) ) ),
90
  10 => sprintf( __( 'Carousel draft updated.', 'wp-carousel-free' ) ),
91
  );
92
  return $messages;
120
  $carousels_types = isset( $upload_data['wpcp_carousel_type'] ) ? $upload_data['wpcp_carousel_type'] : '';
121
  switch ( $column ) {
122
  case 'shortcode':
123
+ $column_field = '<input style="width: 270px; padding: 6px;cursor:pointer;" type="text" onClick="this.select();" readonly="readonly" value="[sp_wpcarousel id=&quot;' . esc_attr( $post_id ) . '&quot;]"/><div class="spwpc-after-copy-text"><i class="fa fa-check-circle"></i> Shortcode Copied to Clipboard! </div>';
124
+ echo $column_field; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
125
  break;
126
  case 'carousel_type':
127
+ echo ucwords( str_replace( '-', ' ', $carousels_types ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
128
 
129
  } // end switch.
130
  }
193
  $screen = get_current_screen();
194
  if ( 'sp_wp_carousel' === get_post_type() || 'sp_wp_carousel_page_wpcp_settings' === $screen->id || 'sp_wp_carousel_page_wpcp_help' === $screen->id ) {
195
  $url = 'https://wordpress.org/support/plugin/wp-carousel-free/reviews/?filter=5#new-post';
196
+ $text = sprintf( 'If you like <strong>WordPress Carousel</strong>, please leave us a <a href="%s" target="_blank">&#9733;&#9733;&#9733;&#9733;&#9733;</a> rating. Your Review is very important to us as it helps us to grow more. ', $url );
197
  }
198
 
199
  return $text;
admin/img/image_select/image_select.php CHANGED
@@ -10,6 +10,15 @@
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
  }
10
  if ( ! class_exists( 'SP_WPCP_Field_image_select' ) ) {
11
  class SP_WPCP_Field_image_select extends SP_WPCP_Fields {
12
 
13
+ /**
14
+ * Column field constructor.
15
+ *
16
+ * @param array $field The field type.
17
+ * @param string $value The values of the field.
18
+ * @param string $unique The unique ID for the field.
19
+ * @param string $where To where show the output CSS.
20
+ * @param string $parent The parent args.
21
+ */
22
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
23
  parent::__construct( $field, $value, $unique, $where, $parent );
24
  }
admin/views/help.php CHANGED
@@ -73,8 +73,8 @@ class WP_Carousel_Free_Help {
73
  <div class="header-area">
74
  <div class="container">
75
  <div class="header-logo">
76
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/wpcp-logo.svg'; ?>" alt="">
77
- <span><?php echo WPCAROUSELF_VERSION; ?></span>
78
  </div>
79
  <div class="header-content">
80
  <p>Thank you for installing WP Carousel plugin! This video will help you get started with the plugin.</p>
@@ -99,7 +99,7 @@ class WP_Carousel_Free_Help {
99
  <section class="sp-wpc__help upgrade">
100
  <div class="upgrade-area">
101
  <div class="upgrade-img">
102
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/wpcp-Icon.svg'; ?>" alt="">
103
  </div>
104
  <h2>Upgrade To Unleash the Power of WordPress Carousel Pro</h2>
105
  <p>Get the most out of WordPress Carousel by upgrading to unlock all of its powerful features. With WordPress Carousel Pro, you can unlock amazing features like:</p>
@@ -109,48 +109,48 @@ class WP_Carousel_Free_Help {
109
  <div class="row">
110
  <div class="col-lg-6">
111
  <ul class="upgrade-list">
112
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Fully responsive, SEO-friendly & optimized.</li>
113
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Advanced Shortcode Generator.</li>
114
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Slide Anything (e.g. Image, Post, Product, Content, Video, Text, HTML, Shortcodes, etc.)</li>
115
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Display posts from multiple Categories, Tags, Formats, or Types. (e.g. Latest, Taxonomies, Specific, etc.).</li>
116
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Multiple Carousels on the same page.</li>
117
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">100+ Visual Customization options.</li>
118
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Drag & Drop Carousel builder (image, content, video, etc.).</li>
119
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Image Carousel with internal and external links.</li>
120
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Image Carousel with caption and description.</li>
121
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Image Content Position (Bottom, Top, Right, and Overlay).</li>
122
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Show/hide image caption and description.</li>
123
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Slide background, border, and inner padding.</li>
124
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Lightbox functionality for images.</li>
125
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Modern effects for images (grayscale, zoom, fade).</li>
126
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Custom image resizes options.</li>
127
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Variable width option in the carousel.</li>
128
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Post Carousel with Title, image, excerpt, read more, category, date, author, tags, comments, etc.).</li>
129
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Post excerpt, full content, and content with the limit.</li>
130
  </ul>
131
  </div>
132
  <div class="col-lg-6">
133
  <ul class="upgrade-list">
134
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">WooCommerce Product Carousel.</li>
135
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Product content position (Bottom, Top, Right, Overlay)Filter by different product types (e.g. latest, categories, specific products, etc.).</li>
136
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Show/hide the standard product contents (product name, image, price, excerpt, read more, rating, add to cart, etc.).</li>
137
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Content Carousel (Anything).</li>
138
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Video Carousel with lightbox.</li>
139
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Supported YouTube, Vimeo, Dailymotion, mp4, WebM, and even self-hosted video.</li>
140
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Add Custom Video Thumbnails (for self-hosted) and video icon.</li>
141
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Carousel Mode (standard, center, ticker).</li>
142
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">25+ Carousel controls.</li>
143
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">8+ Different navigation positions.</li>
144
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Typography & Styling options (840+ Google fonts).</li>
145
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Duplicate or clone carousels.</li>
146
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Advanced plugin settings.</li>
147
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Multisite, RTL, and Accessibility ready.</li>
148
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Fully Translation ready with WPML, Polylang, Loco Translate, and more.</li>
149
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Page builders & theme compatibility.</li>
150
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Automatic Updates notifications.</li>
151
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">One To One Fast & Friendly Support</li>
152
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt="">Developer friendly & highly customizable.</li>
153
- <li><img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/checkmark.svg'; ?>" alt=""><span>Not Happy? 100% No Questions Asked <a href="https://shapedplugin.com/refund-policy/" target="_blank">Refund Policy!</a></span></li>
154
  </ul>
155
  </div>
156
  </div>
@@ -160,7 +160,7 @@ class WP_Carousel_Free_Help {
160
  <div class="upgrade-pro">
161
  <div class="pro-content">
162
  <div class="pro-icon">
163
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/wp-carousel-pro.svg'; ?>" alt="">
164
  </div>
165
  <div class="pro-text">
166
  <h2>Upgrade To WordPress Carousel Pro Today!</h2>
@@ -185,7 +185,7 @@ class WP_Carousel_Free_Help {
185
  </div>
186
  <div class="testimonial-info">
187
  <div class="img">
188
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/Joyce-van-den-Berg.png'; ?>" alt="">
189
  </div>
190
  <div class="info">
191
  <h3>Joyce van den Berg</h3>
@@ -203,7 +203,7 @@ class WP_Carousel_Free_Help {
203
  </div>
204
  <div class="testimonial-info">
205
  <div class="img">
206
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/Graeme-Myburgh.jpeg'; ?>" alt="">
207
  </div>
208
  <div class="info">
209
  <h3>Graeme Myburgh</h3>
@@ -221,6 +221,4 @@ class WP_Carousel_Free_Help {
221
  </div>
222
  <?php
223
  }
224
-
225
  }
226
-
73
  <div class="header-area">
74
  <div class="container">
75
  <div class="header-logo">
76
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/wpcp-logo.svg'; ?>" alt="">
77
+ <span><?php echo esc_attr( WPCAROUSELF_VERSION ); ?></span>
78
  </div>
79
  <div class="header-content">
80
  <p>Thank you for installing WP Carousel plugin! This video will help you get started with the plugin.</p>
99
  <section class="sp-wpc__help upgrade">
100
  <div class="upgrade-area">
101
  <div class="upgrade-img">
102
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/wpcp-Icon.svg'; ?>" alt="">
103
  </div>
104
  <h2>Upgrade To Unleash the Power of WordPress Carousel Pro</h2>
105
  <p>Get the most out of WordPress Carousel by upgrading to unlock all of its powerful features. With WordPress Carousel Pro, you can unlock amazing features like:</p>
109
  <div class="row">
110
  <div class="col-lg-6">
111
  <ul class="upgrade-list">
112
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Fully responsive, SEO-friendly & optimized.</li>
113
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Advanced Shortcode Generator.</li>
114
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Slide Anything (e.g. Image, Post, Product, Content, Video, Text, HTML, Shortcodes, etc.)</li>
115
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Display posts from multiple Categories, Tags, Formats, or Types. (e.g. Latest, Taxonomies, Specific, etc.).</li>
116
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Multiple Carousels on the same page.</li>
117
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">100+ Visual Customization options.</li>
118
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Drag & Drop Carousel builder (image, content, video, etc.).</li>
119
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Image Carousel with internal and external links.</li>
120
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Image Carousel with caption and description.</li>
121
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Image Content Position (Bottom, Top, Right, and Overlay).</li>
122
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Show/hide image caption and description.</li>
123
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Slide background, border, and inner padding.</li>
124
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Lightbox functionality for images.</li>
125
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Modern effects for images (grayscale, zoom, fade).</li>
126
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Custom image resizes options.</li>
127
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Variable width option in the carousel.</li>
128
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Post Carousel with Title, image, excerpt, read more, category, date, author, tags, comments, etc.).</li>
129
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Post excerpt, full content, and content with the limit.</li>
130
  </ul>
131
  </div>
132
  <div class="col-lg-6">
133
  <ul class="upgrade-list">
134
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">WooCommerce Product Carousel.</li>
135
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Product content position (Bottom, Top, Right, Overlay)Filter by different product types (e.g. latest, categories, specific products, etc.).</li>
136
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Show/hide the standard product contents (product name, image, price, excerpt, read more, rating, add to cart, etc.).</li>
137
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Content Carousel (Anything).</li>
138
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Video Carousel with lightbox.</li>
139
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Supported YouTube, Vimeo, Dailymotion, mp4, WebM, and even self-hosted video.</li>
140
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Add Custom Video Thumbnails (for self-hosted) and video icon.</li>
141
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Carousel Mode (standard, center, ticker).</li>
142
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">25+ Carousel controls.</li>
143
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">8+ Different navigation positions.</li>
144
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Typography & Styling options (840+ Google fonts).</li>
145
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Duplicate or clone carousels.</li>
146
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Advanced plugin settings.</li>
147
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Multisite, RTL, and Accessibility ready.</li>
148
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Fully Translation ready with WPML, Polylang, Loco Translate, and more.</li>
149
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Page builders & theme compatibility.</li>
150
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Automatic Updates notifications.</li>
151
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">One To One Fast & Friendly Support</li>
152
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt="">Developer friendly & highly customizable.</li>
153
+ <li><img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/checkmark.svg'; ?>" alt=""><span>Not Happy? 100% No Questions Asked <a href="https://shapedplugin.com/refund-policy/" target="_blank">Refund Policy!</a></span></li>
154
  </ul>
155
  </div>
156
  </div>
160
  <div class="upgrade-pro">
161
  <div class="pro-content">
162
  <div class="pro-icon">
163
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/wp-carousel-pro.svg'; ?>" alt="">
164
  </div>
165
  <div class="pro-text">
166
  <h2>Upgrade To WordPress Carousel Pro Today!</h2>
185
  </div>
186
  <div class="testimonial-info">
187
  <div class="img">
188
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/Joyce-van-den-Berg.png'; ?>" alt="">
189
  </div>
190
  <div class="info">
191
  <h3>Joyce van den Berg</h3>
203
  </div>
204
  <div class="testimonial-info">
205
  <div class="img">
206
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/Graeme-Myburgh.jpeg'; ?>" alt="">
207
  </div>
208
  <div class="info">
209
  <h3>Graeme Myburgh</h3>
221
  </div>
222
  <?php
223
  }
 
224
  }
 
admin/views/metabox-config.php CHANGED
@@ -1,4 +1,12 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
 
 
 
 
 
 
 
 
2
  die; } // Cannot access pages directly.
3
 
4
  //
@@ -61,6 +69,11 @@ SP_WPCF::createSection(
61
  'text' => __( 'Video', 'wp-carousel-free' ),
62
  'pro_only' => true,
63
  ),
 
 
 
 
 
64
  ),
65
  'default' => 'image-carousel',
66
  ),
@@ -418,6 +431,25 @@ SP_WPCF::createSection(
418
  'default' => 'rtl',
419
  'dependency' => array( 'wpcp_carousel_orientation', '==', 'horizontal', true ),
420
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
421
  array(
422
  'type' => 'subheading',
423
  'content' => __( 'Navigation', 'wp-carousel-free' ),
@@ -501,6 +533,17 @@ SP_WPCF::createSection(
501
  'type' => 'subheading',
502
  'content' => __( 'Miscellaneous', 'wp-carousel-free' ),
503
  ),
 
 
 
 
 
 
 
 
 
 
 
504
  array(
505
  'id' => 'slider_swipe',
506
  'type' => 'switcher',
@@ -781,9 +824,9 @@ SP_WPCF::createSection(
781
  'id' => 'wpcp_image_sizes',
782
  'type' => 'image_sizes',
783
  'chosen' => true,
784
- 'title' => __( 'Image Sizes', 'wp-carousel-free' ),
785
  'default' => 'full',
786
- 'subtitle' => __( 'Select a image size.', 'wp-carousel-free' ),
787
  'dependency' => array( 'wpcp_carousel_type|show_image', 'any|==', 'image-carousel,post-carousel,product-carousel|true' ),
788
  ),
789
  array(
@@ -814,6 +857,29 @@ SP_WPCF::createSection(
814
  ),
815
  'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
816
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
817
  array(
818
  'id' => '_image_title_attr',
819
  'type' => 'checkbox',
@@ -845,7 +911,7 @@ SP_WPCF::createSection(
845
  array(
846
  'id' => 'section_title_font_load',
847
  'type' => 'switcherf',
848
- 'title' => __( 'Load Carousel Section Title Font', 'wp-carousel-freee' ),
849
  'subtitle' => __( 'On/Off google font for the carousel section title.', 'wp-carousel-free' ),
850
  'default' => false,
851
  ),
@@ -853,7 +919,7 @@ SP_WPCF::createSection(
853
  'id' => 'wpcp_section_title_typography',
854
  'type' => 'typography',
855
  'title' => __( 'Carousel Section Title Font', 'wp-carousel-free' ),
856
- 'subtitle' => __( 'Set Carousel section title font properties.', 'wp-carousel-freee' ),
857
  'default' => array(
858
  'color' => '#444444',
859
  'font-family' => 'Open Sans',
1
+ <?php
2
+ /**
3
+ * The Metabox configuration
4
+ *
5
+ * @package WP Carousel
6
+ * @subpackage wp-carousel-free/admin/views
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
  die; } // Cannot access pages directly.
11
 
12
  //
69
  'text' => __( 'Video', 'wp-carousel-free' ),
70
  'pro_only' => true,
71
  ),
72
+ 'mix-content' => array(
73
+ 'icon' => 'dashicons dashicons-randomize',
74
+ 'text' => __( 'Mix-Content', 'wp-carousel-pro' ),
75
+ 'pro_only' => true,
76
+ ),
77
  ),
78
  'default' => 'image-carousel',
79
  ),
431
  'default' => 'rtl',
432
  'dependency' => array( 'wpcp_carousel_orientation', '==', 'horizontal', true ),
433
  ),
434
+ array(
435
+ 'id' => 'wpcp_carousel_row',
436
+ 'class' => 'wpcp_carousel_row_pro_only',
437
+ 'type' => 'column',
438
+ 'title' => __( 'Carousel Row', 'wp-carousel-pro' ),
439
+ 'subtitle' => __( 'Set number of carousel row on device.', 'wp-carousel-pro' ),
440
+ 'lg_desktop' => true,
441
+ 'desktop' => true,
442
+ 'laptop' => true,
443
+ 'tablet' => true,
444
+ 'mobile' => true,
445
+ 'default' => array(
446
+ 'lg_desktop' => '1',
447
+ 'desktop' => '1',
448
+ 'laptop' => '1',
449
+ 'tablet' => '1',
450
+ 'mobile' => '1',
451
+ ),
452
+ ),
453
  array(
454
  'type' => 'subheading',
455
  'content' => __( 'Navigation', 'wp-carousel-free' ),
533
  'type' => 'subheading',
534
  'content' => __( 'Miscellaneous', 'wp-carousel-free' ),
535
  ),
536
+ array(
537
+ 'id' => 'wpcp_scheduler',
538
+ 'class' => 'only_pro_switcher',
539
+ 'type' => 'switcher',
540
+ 'title' => __( 'Scheduling', 'wp-carousel-pro' ),
541
+ 'subtitle' => __( 'Enable/Disable scheduling carousel.', 'wp-carousel-pro' ),
542
+ 'default' => false,
543
+ 'text_on' => __( 'Enabled', 'wp-carousel-pro' ),
544
+ 'text_off' => __( 'Disabled', 'wp-carousel-pro' ),
545
+ 'text_width' => 95,
546
+ ),
547
  array(
548
  'id' => 'slider_swipe',
549
  'type' => 'switcher',
824
  'id' => 'wpcp_image_sizes',
825
  'type' => 'image_sizes',
826
  'chosen' => true,
827
+ 'title' => __( 'Image Size', 'wp-carousel-free' ),
828
  'default' => 'full',
829
+ 'subtitle' => __( 'Set a size for the image.', 'wp-carousel-free' ),
830
  'dependency' => array( 'wpcp_carousel_type|show_image', 'any|==', 'image-carousel,post-carousel,product-carousel|true' ),
831
  ),
832
  array(
857
  ),
858
  'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
859
  ),
860
+ array(
861
+ 'id' => 'wpcp_watermark',
862
+ 'class' => 'only_pro_switcher',
863
+ 'type' => 'switcher',
864
+ 'text_on' => __( 'Enabled', 'wp-carousel-pro' ),
865
+ 'text_off' => __( 'Disabled', 'wp-carousel-pro' ),
866
+ 'text_width' => 95,
867
+ 'title' => __( 'Watermark', 'wp-carousel-pro' ),
868
+ 'subtitle' => __( 'Enable/Disable watermark for the image.', 'wp-carousel-pro' ),
869
+ 'default' => false,
870
+ ),
871
+ array(
872
+ 'id' => 'wpcp_img_protection',
873
+ 'class' => 'only_pro_switcher',
874
+ 'type' => 'switcher',
875
+ 'text_on' => __( 'Enabled', 'wp-carousel-pro' ),
876
+ 'text_off' => __( 'Disabled', 'wp-carousel-pro' ),
877
+ 'text_width' => 95,
878
+ 'title' => __( 'Image Protection', 'wp-carousel-pro' ),
879
+ 'subtitle' => __( 'Enable to protect image downloading from right-click.', 'wp-carousel-pro' ),
880
+ 'default' => false,
881
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'image-carousel|true' ),
882
+ ),
883
  array(
884
  'id' => '_image_title_attr',
885
  'type' => 'checkbox',
911
  array(
912
  'id' => 'section_title_font_load',
913
  'type' => 'switcherf',
914
+ 'title' => __( 'Load Carousel Section Title Font', 'wp-carousel-free' ),
915
  'subtitle' => __( 'On/Off google font for the carousel section title.', 'wp-carousel-free' ),
916
  'default' => false,
917
  ),
919
  'id' => 'wpcp_section_title_typography',
920
  'type' => 'typography',
921
  'title' => __( 'Carousel Section Title Font', 'wp-carousel-free' ),
922
+ 'subtitle' => __( 'Set Carousel section title font properties.', 'wp-carousel-free' ),
923
  'default' => array(
924
  'color' => '#444444',
925
  'font-family' => 'Open Sans',
admin/views/notices/class-wp-carousel-free-promotion.php CHANGED
@@ -10,168 +10,169 @@
10
  */
11
  class WP_Carousel_Free_Promotion {
12
 
13
- /**
14
- * Option key for limited time promo
15
- *
16
- * @var string
17
- */
18
- public $promo_option_key = '_wp_carousel_limited_time_promo';
19
-
20
- /**
21
- * WP_Carousel_Free_Promotion constructor
22
- */
23
- public function __construct() {
24
- add_action( 'admin_notices', [ $this, 'show_promotions' ] );
25
- add_action( 'wp_ajax_sp_wpcf_dismiss_promotional_notice', [ $this, 'dismiss_limited_time_promo' ] );
26
- }
27
-
28
- /**
29
- * Shows promotions
30
- */
31
- public function show_promotions() {
32
- if ( ! current_user_can( 'manage_options' ) ) {
33
- return;
34
- }
35
-
36
- $notices = [
37
- [
38
- 'key' => 'black-friday-2020',
39
- 'start_date' => '2020-11-24 14:00:00 EST',
40
- 'end_date' => '2020-11-30 23:59:00 EST',
41
- 'title' => 'Enjoy Black Friday Deals <strong>30% OFF</strong> on <strong>WordPress Carousel Pro!</strong>',
42
- 'content' => ' Discount Code: <strong>BF2020</strong>',
43
- 'link' => 'https://shapedplugin.com/plugin/wordpress-carousel-pro/?utm_source=wordpress-wpcf&utm_medium=get-it-now&utm_campaign=BlackFriday2020',
44
- ],
45
- ];
46
-
47
- if ( empty( $notices ) ) {
48
- return;
49
- }
50
-
51
- $current_time_est = $this->get_current_time_est();
52
- $notice = [];
53
-
54
- $already_displayed_promo = get_option( $this->promo_option_key, [] );
55
-
56
- foreach ( $notices as $ntc ) {
57
- if ( in_array( $ntc['key'], $already_displayed_promo, true ) ) {
58
- continue;
59
- }
60
-
61
- if ( strtotime( $ntc['start_date'] ) < strtotime( $current_time_est ) && strtotime( $current_time_est ) < strtotime( $ntc['end_date'] ) ) {
62
- $notice = $ntc;
63
- }
64
- }
65
-
66
- if ( empty( $notice ) ) {
67
- return;
68
- }
69
-
70
- ?>
71
- <div class="notice sp-wpcf-promotional-notice">
72
- <div class="content">
73
- <h2><?php echo $notice['title'] . $notice['content']; ?></h2><a href="<?php echo esc_url( $notice['link'] ); ?>" class="button button-primary" target="_blank"><?php echo esc_html__( 'Get it Now', 'wp-carousel-free' ); ?></a>
74
- </div>
75
- <span class="promotional-close-icon notice-dismiss" data-key="<?php echo esc_attr( $notice['key'] ); ?>"></span>
76
- <div class="clear"></div>
77
- </div>
78
-
79
- <style>
80
- .sp-wpcf-promotional-notice {
81
- padding: 14px 18px;
82
- box-sizing: border-box;
83
- position: relative;
84
- }
85
- .sp-wpcf-promotional-notice .content {
86
- float: left;
87
- width: 75%;
88
- }
89
- .sp-wpcf-promotional-notice .content h2 {
90
- margin: 3px 0px 5px;
91
- font-size: 20px;
92
- font-weight: 400;
93
- color: #444;
94
- line-height: 25px;
95
- float: left;
96
- margin-right: 15px;
97
- }
98
- .sp-wpcf-promotional-notice .content a {
99
- border: none;
100
- box-shadow: none;
101
- height: 31px;
102
- line-height: 30px;
103
- border-radius: 3px;
104
- background: #18afb9;
105
- text-shadow: none;
106
- font-weight: 600;
107
- width: 95px;
108
- text-align: center;
109
- float: left;
110
- }
111
- .sp-wpcf-promotional-notice .content a:hover {
112
- background: #089fa9;
113
- }
114
- </style>
115
-
116
- <script type='text/javascript'>
117
- jQuery( document ).ready( function ( $ ) {
118
- $( 'body' ).on( 'click', '.sp-wpcf-promotional-notice span.promotional-close-icon', function ( e ) {
119
- e.preventDefault();
120
-
121
- var self = $( this ),
122
- key = self.data( 'key' );
123
-
124
- wp.ajax.send( 'sp_wpcf_dismiss_promotional_notice', {
125
- data: {
126
- sp_wpcf_promotion_dismissed: true,
127
- key: key,
128
- nonce: '<?php echo esc_attr( wp_create_nonce( 'wp_carousel_admin' ) ); ?>'
129
- },
130
- complete: function ( resp ) {
131
- self.closest( '.sp-wpcf-promotional-notice' ).fadeOut( 200 );
132
- }
133
- } );
134
- } );
135
- } );
136
- </script>
137
-
138
- <?php
139
- }
140
-
141
- /**
142
- * Dismisses limited time promo notice
143
- */
144
- public function dismiss_limited_time_promo() {
145
- $post_data = wp_unslash( $_POST );
146
-
147
- if ( ! current_user_can( 'manage_woocommerce' ) ) {
148
- wp_send_json_error( __( 'You have no permission to do that', 'wp-carousel-free' ) );
149
- }
150
-
151
- if ( ! wp_verify_nonce( $post_data['nonce'], 'wp_carousel_admin' ) ) {
152
- wp_send_json_error( __( 'Invalid nonce', 'wp-carousel-free' ) );
153
- }
154
-
155
- if ( isset( $post_data['sp_wpcf_promotion_dismissed'] ) && $post_data['sp_wpcf_promotion_dismissed'] ) {
156
- $already_displayed_promo = get_option( $this->promo_option_key, [] );
157
- $already_displayed_promo[] = $post_data['key'];
158
-
159
- update_option( $this->promo_option_key, $already_displayed_promo );
160
- wp_send_json_success();
161
- }
162
- }
163
-
164
-
165
- /**
166
- * Gets current time and converts to EST timezone.
167
- * @return string
168
- */
169
- private function get_current_time_est() {
170
- $dt = new \DateTime( 'now', new \DateTimeZone( 'UTC' ) );
171
- $dt->setTimezone( new \DateTimeZone( 'EST' ) );
172
-
173
- return $dt->format( 'Y-m-d H:i:s T' );
174
- }
 
175
 
176
  }
177
  new WP_Carousel_Free_Promotion();
10
  */
11
  class WP_Carousel_Free_Promotion {
12
 
13
+ /**
14
+ * Option key for limited time promo
15
+ *
16
+ * @var string
17
+ */
18
+ public $promo_option_key = '_wp_carousel_limited_time_promo';
19
+
20
+ /**
21
+ * WP_Carousel_Free_Promotion constructor
22
+ */
23
+ public function __construct() {
24
+ add_action( 'admin_notices', array( $this, 'show_promotions' ) );
25
+ add_action( 'wp_ajax_sp_wpcf_dismiss_promotional_notice', array( $this, 'dismiss_limited_time_promo' ) );
26
+ }
27
+
28
+ /**
29
+ * Shows promotions
30
+ */
31
+ public function show_promotions() {
32
+ if ( ! current_user_can( 'manage_options' ) ) {
33
+ return;
34
+ }
35
+
36
+ $notices = array(
37
+ array(
38
+ 'key' => 'black-friday-2020',
39
+ 'start_date' => '2020-11-24 14:00:00 EST',
40
+ 'end_date' => '2020-11-30 23:59:00 EST',
41
+ 'title' => 'Enjoy Black Friday Deals <strong>30% OFF</strong> on <strong>WordPress Carousel Pro!</strong>',
42
+ 'content' => ' Discount Code: <strong>BF2020</strong>',
43
+ 'link' => 'https://shapedplugin.com/plugin/wordpress-carousel-pro/?utm_source=wordpress-wpcf&utm_medium=get-it-now&utm_campaign=BlackFriday2020',
44
+ ),
45
+ );
46
+
47
+ if ( empty( $notices ) ) {
48
+ return;
49
+ }
50
+
51
+ $current_time_est = $this->get_current_time_est();
52
+ $notice = array();
53
+
54
+ $already_displayed_promo = get_option( $this->promo_option_key, array() );
55
+
56
+ foreach ( $notices as $ntc ) {
57
+ if ( in_array( $ntc['key'], $already_displayed_promo, true ) ) {
58
+ continue;
59
+ }
60
+
61
+ if ( strtotime( $ntc['start_date'] ) < strtotime( $current_time_est ) && strtotime( $current_time_est ) < strtotime( $ntc['end_date'] ) ) {
62
+ $notice = $ntc;
63
+ }
64
+ }
65
+
66
+ if ( empty( $notice ) ) {
67
+ return;
68
+ }
69
+
70
+ ?>
71
+ <div class="notice sp-wpcf-promotional-notice">
72
+ <div class="content">
73
+ <h2><?php echo wp_kses_post( $notice['title'] . $notice['content'] ); ?></h2><a href="<?php echo esc_url( $notice['link'] ); ?>" class="button button-primary" target="_blank"><?php echo esc_html__( 'Get it Now', 'wp-carousel-free' ); ?></a>
74
+ </div>
75
+ <span class="promotional-close-icon notice-dismiss" data-key="<?php echo esc_attr( $notice['key'] ); ?>"></span>
76
+ <div class="clear"></div>
77
+ </div>
78
+
79
+ <style>
80
+ .sp-wpcf-promotional-notice {
81
+ padding: 14px 18px;
82
+ box-sizing: border-box;
83
+ position: relative;
84
+ }
85
+ .sp-wpcf-promotional-notice .content {
86
+ float: left;
87
+ width: 75%;
88
+ }
89
+ .sp-wpcf-promotional-notice .content h2 {
90
+ margin: 3px 0px 5px;
91
+ font-size: 20px;
92
+ font-weight: 400;
93
+ color: #444;
94
+ line-height: 25px;
95
+ float: left;
96
+ margin-right: 15px;
97
+ }
98
+ .sp-wpcf-promotional-notice .content a {
99
+ border: none;
100
+ box-shadow: none;
101
+ height: 31px;
102
+ line-height: 30px;
103
+ border-radius: 3px;
104
+ background: #18afb9;
105
+ text-shadow: none;
106
+ font-weight: 600;
107
+ width: 95px;
108
+ text-align: center;
109
+ float: left;
110
+ }
111
+ .sp-wpcf-promotional-notice .content a:hover {
112
+ background: #089fa9;
113
+ }
114
+ </style>
115
+
116
+ <script type='text/javascript'>
117
+ jQuery( document ).ready( function ( $ ) {
118
+ $( 'body' ).on( 'click', '.sp-wpcf-promotional-notice span.promotional-close-icon', function ( e ) {
119
+ e.preventDefault();
120
+
121
+ var self = $( this ),
122
+ key = self.data( 'key' );
123
+
124
+ wp.ajax.send( 'sp_wpcf_dismiss_promotional_notice', {
125
+ data: {
126
+ sp_wpcf_promotion_dismissed: true,
127
+ key: key,
128
+ nonce: '<?php echo esc_attr( wp_create_nonce( 'wp_carousel_admin' ) ); ?>'
129
+ },
130
+ complete: function ( resp ) {
131
+ self.closest( '.sp-wpcf-promotional-notice' ).fadeOut( 200 );
132
+ }
133
+ } );
134
+ } );
135
+ } );
136
+ </script>
137
+
138
+ <?php
139
+ }
140
+
141
+ /**
142
+ * Dismisses limited time promo notice
143
+ */
144
+ public function dismiss_limited_time_promo() {
145
+ $post_data = wp_unslash( $_POST );
146
+
147
+ if ( ! current_user_can( 'manage_woocommerce' ) ) {
148
+ wp_send_json_error( __( 'You have no permission to do that', 'wp-carousel-free' ) );
149
+ }
150
+
151
+ if ( ! wp_verify_nonce( $post_data['nonce'], 'wp_carousel_admin' ) ) {
152
+ wp_send_json_error( __( 'Invalid nonce', 'wp-carousel-free' ) );
153
+ }
154
+
155
+ if ( isset( $post_data['sp_wpcf_promotion_dismissed'] ) && $post_data['sp_wpcf_promotion_dismissed'] ) {
156
+ $already_displayed_promo = get_option( $this->promo_option_key, array() );
157
+ $already_displayed_promo[] = $post_data['key'];
158
+
159
+ update_option( $this->promo_option_key, $already_displayed_promo );
160
+ wp_send_json_success();
161
+ }
162
+ }
163
+
164
+
165
+ /**
166
+ * Gets current time and converts to EST timezone.
167
+ *
168
+ * @return string
169
+ */
170
+ private function get_current_time_est() {
171
+ $dt = new \DateTime( 'now', new \DateTimeZone( 'UTC' ) );
172
+ $dt->setTimezone( new \DateTimeZone( 'EST' ) );
173
+
174
+ return $dt->format( 'Y-m-d H:i:s T' );
175
+ }
176
 
177
  }
178
  new WP_Carousel_Free_Promotion();
admin/views/notices/review.php CHANGED
@@ -47,7 +47,7 @@ class WP_Carousel_Free_Review {
47
  ?>
48
  <div id="sp-wpcfree-review-notice" class="sp-wpcfree-review-notice">
49
  <div class="sp-wpcfree-plugin-icon">
50
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/wp-carousel-pro.svg'; ?>" alt="WP Carousel">
51
  </div>
52
  <div class="sp-wpcfree-notice-text">
53
  <h3>Enjoying <strong>WP Carousel</strong>?</h3>
@@ -81,7 +81,8 @@ class WP_Carousel_Free_Review {
81
 
82
  $.post( ajaxurl, {
83
  action: 'sp-wpcfree-never-show-review-notice',
84
- notice_dismissed_data : notice_dismissed_value
 
85
  });
86
 
87
  $('#sp-wpcfree-review-notice.sp-wpcfree-review-notice').hide();
@@ -100,24 +101,27 @@ class WP_Carousel_Free_Review {
100
  * @return void
101
  **/
102
  public function dismiss_review_notice() {
103
- if ( ! $review ) {
104
- $review = array();
105
- }
106
- switch ( $_POST['notice_dismissed_data'] ) {
107
- case '1':
108
- $review['time'] = time();
109
- $review['dismissed'] = false;
110
- break;
111
- case '2':
112
- $review['time'] = time();
113
- $review['dismissed'] = false;
114
- break;
115
- case '3':
116
- $review['time'] = time();
117
- $review['dismissed'] = true;
118
- break;
 
 
 
 
 
119
  }
120
- update_option( 'sp_wp_carousel_free_review_notice_dismiss', $review );
121
- die;
122
  }
123
  }
47
  ?>
48
  <div id="sp-wpcfree-review-notice" class="sp-wpcfree-review-notice">
49
  <div class="sp-wpcfree-plugin-icon">
50
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/wp-carousel-pro.svg'; ?>" alt="WP Carousel">
51
  </div>
52
  <div class="sp-wpcfree-notice-text">
53
  <h3>Enjoying <strong>WP Carousel</strong>?</h3>
81
 
82
  $.post( ajaxurl, {
83
  action: 'sp-wpcfree-never-show-review-notice',
84
+ notice_dismissed_data : notice_dismissed_value,
85
+ nonce: <?php echo esc_attr( wp_create_nonce( 'wpcfree-review-notice' ) ); ?>,
86
  });
87
 
88
  $('#sp-wpcfree-review-notice.sp-wpcfree-review-notice').hide();
101
  * @return void
102
  **/
103
  public function dismiss_review_notice() {
104
+ $review = array();
105
+ $nonce = ( ! empty( $_POST['nonce'] ) ) ? sanitize_text_field( wp_unslash( $_POST['nonce'] ) ) : '';
106
+ if ( wp_verify_nonce( $nonce, 'wpcfree-review-notice' ) ) {
107
+ $notice_dismissed = ( ! empty( $_POST['notice_dismissed_data'] ) ) ? sanitize_text_field( wp_unslash( $_POST['notice_dismissed_data'] ) ) : '';
108
+
109
+ switch ( $notice_dismissed ) {
110
+ case '1':
111
+ $review['time'] = time();
112
+ $review['dismissed'] = false;
113
+ break;
114
+ case '2':
115
+ $review['time'] = time();
116
+ $review['dismissed'] = false;
117
+ break;
118
+ case '3':
119
+ $review['time'] = time();
120
+ $review['dismissed'] = true;
121
+ break;
122
+ }
123
+ update_option( 'sp_wp_carousel_free_review_notice_dismiss', $review );
124
+ die;
125
  }
 
 
126
  }
127
  }
admin/views/option-config.php CHANGED
@@ -1,13 +1,21 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
 
 
 
 
 
 
 
 
2
  die; } // Cannot access directly.
3
 
4
  //
5
- // Set a unique slug-like ID
6
  //
7
  $prefix = 'sp_wpcp_settings';
8
 
9
  //
10
- // Create options
11
  //
12
  SP_WPCF::createOptions(
13
  $prefix,
@@ -35,7 +43,7 @@ SP_WPCF::createOptions(
35
  );
36
 
37
  //
38
- // Create a section
39
  //
40
  SP_WPCF::createSection(
41
  $prefix,
@@ -44,11 +52,11 @@ SP_WPCF::createSection(
44
  'icon' => 'fa fa-cogs',
45
  'fields' => array(
46
  array(
47
- 'id' => 'wpcf_delete_all_data',
48
- 'type' => 'checkbox',
49
- 'title' => __( 'Clean-up Data on Plugin Deletion', 'wp-carousel-free' ),
50
- 'help' => __( 'Check to remove plugin\'s data when plugin is uninstalled or deleted.', 'wp-carousel-free' ),
51
- 'default' => false,
52
  ),
53
  array(
54
  'type' => 'subheading',
@@ -93,7 +101,7 @@ SP_WPCF::createSection(
93
  );
94
 
95
  //
96
- // Custom CSS Fields
97
  //
98
  SP_WPCF::createSection(
99
  $prefix,
1
+ <?php
2
+ /**
3
+ * The options configuration
4
+ *
5
+ * @package WP Carousel
6
+ * @subpackage wp-carousel-free/admin/views
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
  die; } // Cannot access directly.
11
 
12
  //
13
+ // Set a unique slug-like ID.
14
  //
15
  $prefix = 'sp_wpcp_settings';
16
 
17
  //
18
+ // Create options.
19
  //
20
  SP_WPCF::createOptions(
21
  $prefix,
43
  );
44
 
45
  //
46
+ // Create a section.
47
  //
48
  SP_WPCF::createSection(
49
  $prefix,
52
  'icon' => 'fa fa-cogs',
53
  'fields' => array(
54
  array(
55
+ 'id' => 'wpcf_delete_all_data',
56
+ 'type' => 'checkbox',
57
+ 'title' => __( 'Clean-up Data on Plugin Deletion', 'wp-carousel-free' ),
58
+ 'help' => __( 'Check to remove plugin\'s data when plugin is uninstalled or deleted.', 'wp-carousel-free' ),
59
+ 'default' => false,
60
  ),
61
  array(
62
  'type' => 'subheading',
101
  );
102
 
103
  //
104
+ // Custom CSS Fields.
105
  //
106
  SP_WPCF::createSection(
107
  $prefix,
admin/views/premium.php CHANGED
@@ -15,29 +15,6 @@ if ( ! defined( 'ABSPATH' ) ) {
15
  */
16
  class WP_Carousel_Free_Upgrade {
17
 
18
- /**
19
- * Wp Carousel Pro single instance of the class
20
- *
21
- * @var null
22
- * @since 2.0.0
23
- */
24
- protected static $_instance = null;
25
-
26
- /**
27
- * Main WP_Carousel_Free_Help Instance
28
- *
29
- * @since 2.0.0
30
- * @static
31
- * @see sp_wpcp_help()
32
- * @return self Main instance
33
- */
34
- public static function instance() {
35
- if ( is_null( self::$_instance ) ) {
36
- self::$_instance = new self();
37
- }
38
-
39
- return self::$_instance;
40
- }
41
 
42
  /**
43
  * Add admin menu.
@@ -62,9 +39,9 @@ class WP_Carousel_Free_Upgrade {
62
  /**
63
  * Happy users.
64
  *
65
- * @param boolean $username
66
- * @param array $args
67
- * @return void
68
  */
69
  public function happy_users( $username = 'shapedplugin', $args = array() ) {
70
  if ( $username ) {
@@ -107,10 +84,11 @@ class WP_Carousel_Free_Upgrade {
107
  <div class="row">
108
  <div class="sp-wpc__col-xl-6">
109
  <div class="sp-wpc__banner-content">
110
- <h2 class="sp-wpc__font-30 main-color sp-wpc__font-weight-500"><?php _e( 'Upgrade To WordPress Carousel Pro', 'wp-carousel-free' ); ?></h2>
 
111
  <h4 class="sp-wpc__mt-10 sp-wpc__font-18 sp-wpc__font-weight-500"><?php _e( 'Supercharge <strong>Your WordPress Carousels</strong> with powerful functionality!', 'wp-carousel-free' ); ?></h4>
112
- <p class="sp-wpc__mt-25 text-color-2 line-height-20 sp-wpc__font-weight-400"><?php _e( 'The Most Powerful and User-friendly Multi-purpose WordPress Carousel plugin to Slide out of Anything.', 'wp-carousel-free' ); ?></p>
113
- <p class="sp-wpc__mt-20 text-color-2 sp-wpc__line-height-20 sp-wpc__font-weight-400"><?php _e( 'Create beautiful carousels with images, Posts, WooCommerce Products, Contents (Images, Text, HTML, Shortcodes), Video, etc. The plugin has its own image and content management system and also Supports <strong>Posts, Pages, Custom Post Type, Taxonomy, Custom Taxonomy, Custom Contents, YouTube, Vimeo, Dailymotion, mp4, WebM, Self-hosted Video</strong> with Lightbox.', 'wp-carousel-free' ); ?></p>
114
  </div>
115
  <div class="sp-wpc__banner-button sp-wpc__mt-40">
116
  <a class="sp-wpc__btn sp-wpc__btn-sky" href="https://shapedplugin.com/plugin/wordpress-carousel-pro/?ref=1" target="_blank">Upgrade To Pro Now</a>
@@ -119,7 +97,7 @@ class WP_Carousel_Free_Upgrade {
119
  </div>
120
  <div class="sp-wpc__col-xl-6">
121
  <div class="sp-wpc__banner-img">
122
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/premium/wpcp-vector.svg'; ?>" alt="">
123
  </div>
124
  </div>
125
  </div>
@@ -174,7 +152,7 @@ class WP_Carousel_Free_Upgrade {
174
  <h4 class="sp-wpc__font-16 sp-wpc__mt-10 sp-wpc__font-weight-400">Learn why WordPress Carousel Pro is the best Multi-purpose Carousel Plugin.</h4>
175
  </div>
176
  <div class="video-area text-center">
177
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/premium/wpcp-vector-1.svg'; ?>" alt="">
178
  <div class="video-button">
179
  <a class="js-video-button" href="#" data-channel="youtube" data-video-url="//www.youtube.com/embed/XMYYgFD7ZIA">
180
  <span><i class="fa fa-play"></i></span>
@@ -196,7 +174,7 @@ class WP_Carousel_Free_Upgrade {
196
  <div class="feature-area">
197
  <div class="feature-item mr-30">
198
  <div class="feature-icon">
199
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/premium/slide-anything.svg'; ?>" alt="">
200
  </div>
201
  <div class="feature-content">
202
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Slide Anything</h3>
@@ -206,7 +184,7 @@ class WP_Carousel_Free_Upgrade {
206
  <div class="feature-item ml-30">
207
  <div class="feature-icon">
208
  <img src="
209
- <?php echo WPCAROUSELF_URL . 'admin/img/images/premium/advanced-carousel-generator.svg'; ?>
210
  " alt="">
211
  </div>
212
  <div class="feature-content">
@@ -219,7 +197,7 @@ class WP_Carousel_Free_Upgrade {
219
  <div class="feature-item mr-30">
220
  <div class="feature-icon">
221
  <img src="
222
- <?php echo WPCAROUSELF_URL . 'admin/img/images/premium/Customize.svg'; ?>
223
  " alt="">
224
  </div>
225
  <div class="feature-content">
@@ -229,7 +207,7 @@ class WP_Carousel_Free_Upgrade {
229
  </div>
230
  <div class="feature-item ml-30">
231
  <div class="feature-icon">
232
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/premium/Multiple-Image-Carousels.svg'; ?>" alt="">
233
  </div>
234
  <div class="feature-content">
235
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Multiple Image Carousels on the Same Page</h3>
@@ -240,7 +218,7 @@ class WP_Carousel_Free_Upgrade {
240
  <div class="feature-area">
241
  <div class="feature-item mr-30">
242
  <div class="feature-icon custom-padding">
243
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/premium/post-carousel.svg'; ?>" alt="">
244
  </div>
245
  <div class="feature-content">
246
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Post Carousel (Custom post types, Taxonomies)</h3>
@@ -249,7 +227,7 @@ class WP_Carousel_Free_Upgrade {
249
  </div>
250
  <div class="feature-item ml-30">
251
  <div class="feature-icon">
252
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/premium/woo-carousel.svg'; ?>" alt="">
253
  </div>
254
  <div class="feature-content">
255
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">WooCommerce Product Carousel (Categories, specific)</h3>
@@ -260,7 +238,7 @@ class WP_Carousel_Free_Upgrade {
260
  <div class="feature-area">
261
  <div class="feature-item mr-30">
262
  <div class="feature-icon">
263
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/premium/content-carousel.svg'; ?>" alt="">
264
  </div>
265
  <div class="feature-content">
266
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Content Carousel (Slide can be anything you want)</h3>
@@ -269,7 +247,7 @@ class WP_Carousel_Free_Upgrade {
269
  </div>
270
  <div class="feature-item ml-30">
271
  <div class="feature-icon">
272
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/premium/video-carousel.svg'; ?>" alt="">
273
  </div>
274
  <div class="feature-content">
275
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Video Carousel with Lightbox</h3>
@@ -280,7 +258,7 @@ class WP_Carousel_Free_Upgrade {
280
  <div class="feature-area">
281
  <div class="feature-item mr-30">
282
  <div class="feature-icon">
283
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/premium/drag-and-drop.svg'; ?>" alt="">
284
  </div>
285
  <div class="feature-content">
286
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Drag & Drop Carousel Builder </h3>
@@ -289,7 +267,7 @@ class WP_Carousel_Free_Upgrade {
289
  </div>
290
  <div class="feature-item ml-30">
291
  <div class="feature-icon custom-padding">
292
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/premium/links.svg'; ?>" alt="">
293
  </div>
294
  <div class="feature-content">
295
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Image Carousel with Internal & External Linksd</h3>
@@ -301,7 +279,7 @@ class WP_Carousel_Free_Upgrade {
301
  <div class="feature-area">
302
  <div class="feature-item mr-30">
303
  <div class="feature-icon">
304
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/premium/lightbox.svg'; ?>" alt="">
305
  </div>
306
  <div class="feature-content">
307
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Lightbox Functionality for Image</h3>
@@ -310,7 +288,7 @@ class WP_Carousel_Free_Upgrade {
310
  </div>
311
  <div class="feature-item ml-30">
312
  <div class="feature-icon">
313
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/premium/carousel-controls.svg'; ?>" alt="">
314
  </div>
315
  <div class="feature-content">
316
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">25+ Carousel Controls</h3>
@@ -321,7 +299,7 @@ class WP_Carousel_Free_Upgrade {
321
  <div class="feature-area">
322
  <div class="feature-item mr-30">
323
  <div class="feature-icon">
324
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/premium/carosuel-mode.svg'; ?>" alt="">
325
  </div>
326
  <div class="feature-content">
327
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Carousel Mode and Orientation (Horizontal & Vertical) </h3>
@@ -330,7 +308,7 @@ class WP_Carousel_Free_Upgrade {
330
  </div>
331
  <div class="feature-item ml-30">
332
  <div class="feature-icon">
333
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/premium/Modern-Effects.svg'; ?>" alt="">
334
  </div>
335
  <div class="feature-content">
336
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Modern Effects for Images (grayscale, zoom, fade).</h3>
@@ -341,7 +319,7 @@ class WP_Carousel_Free_Upgrade {
341
  <div class="feature-area">
342
  <div class="feature-item mr-30">
343
  <div class="feature-icon">
344
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/premium/Re-sizing.svg'; ?>" alt="">
345
  </div>
346
  <div class="feature-content">
347
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Custom Image Re-sizing</h3>
@@ -350,7 +328,7 @@ class WP_Carousel_Free_Upgrade {
350
  </div>
351
  <div class="feature-item ml-30">
352
  <div class="feature-icon">
353
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/premium/Advanced-settings.svg'; ?>" alt="">
354
  </div>
355
  <div class="feature-content">
356
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Advanced Plugin Settings</h3>
@@ -361,7 +339,7 @@ class WP_Carousel_Free_Upgrade {
361
  <div class="feature-area">
362
  <div class="feature-item mr-30">
363
  <div class="feature-icon">
364
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/premium/typo.svg'; ?>" alt="">
365
  </div>
366
  <div class="feature-content">
367
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Advanced Typography (Fonts, Color & Styling)</h3>
@@ -370,7 +348,7 @@ class WP_Carousel_Free_Upgrade {
370
  </div>
371
  <div class="feature-item ml-30">
372
  <div class="feature-icon">
373
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/premium/Translation-RTL-Ready.svg'; ?>" alt="">
374
  </div>
375
  <div class="feature-content">
376
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Multisite, Multilingual, RTL, Accessibility Ready</h3>
@@ -381,7 +359,7 @@ class WP_Carousel_Free_Upgrade {
381
  <div class="feature-area">
382
  <div class="feature-item mr-30">
383
  <div class="feature-icon">
384
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/premium/page-bilder.svg'; ?>" alt="">
385
  </div>
386
  <div class="feature-content">
387
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Page Builders & Countless Theme Compatibility</h3>
@@ -390,7 +368,7 @@ class WP_Carousel_Free_Upgrade {
390
  </div>
391
  <div class="feature-item ml-30">
392
  <div class="feature-icon">
393
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/premium/support.svg'; ?>" alt="">
394
  </div>
395
  <div class="feature-content">
396
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Top-notch Support and Frequently Updates</h3>
@@ -410,9 +388,9 @@ class WP_Carousel_Free_Upgrade {
410
  <div class="sp-wpc__col-xl-12">
411
  <div class="buy-content text-center">
412
  <div class="buy-img">
413
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/premium/happy.svg'; ?>" alt="">
414
  </div>
415
- <h2 class="sp-wpc__font-28">Join
416
  <?php
417
  $install = 0;
418
  foreach ( $plugin_names as &$plugin_name ) {
@@ -420,7 +398,7 @@ class WP_Carousel_Free_Upgrade {
420
  }
421
  echo esc_attr( $install + '15000' ) . '+';
422
  ?>
423
- Happy Users in 160+ Countries </h2>
424
  <p class="sp-wpc__font-16 sp-wpc__mt-25 sp-wpc__line-height-22">98% of customers are happy with <b>ShapedPlugin's</b> products and support. <br>
425
  So it’s a great time to join them.</p>
426
  <a class="sp-wpc__btn sp-wpc__btn-buy sp-wpc__mt-40" href="https://shapedplugin.com/plugin/wordpress-carousel-pro/?ref=1" target="_blank">Get Started for $39 Today!</a>
@@ -443,7 +421,7 @@ class WP_Carousel_Free_Upgrade {
443
  </div>
444
  <div class="testimonial-info">
445
  <div class="img">
446
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/Joyce-van-den-Berg.png'; ?>" alt="">
447
  </div>
448
  <div class="info">
449
  <h3>Joyce van den Berg</h3>
@@ -461,7 +439,7 @@ class WP_Carousel_Free_Upgrade {
461
  </div>
462
  <div class="testimonial-info">
463
  <div class="img">
464
- <img src="<?php echo WPCAROUSELF_URL . 'admin/img/images/Graeme-Myburgh.jpeg'; ?>" alt="">
465
  </div>
466
  <div class="info">
467
  <h3>Graeme Myburgh</h3>
15
  */
16
  class WP_Carousel_Free_Upgrade {
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
  /**
20
  * Add admin menu.
39
  /**
40
  * Happy users.
41
  *
42
+ * @param boolean $username username.
43
+ * @param array $args args.
44
+ * @return statement
45
  */
46
  public function happy_users( $username = 'shapedplugin', $args = array() ) {
47
  if ( $username ) {
84
  <div class="row">
85
  <div class="sp-wpc__col-xl-6">
86
  <div class="sp-wpc__banner-content">
87
+ <h2 class="sp-wpc__font-30 main-color sp-wpc__font-weight-500">
88
+ <?php esc_html__( 'Upgrade To WordPress Carousel Pro', 'wp-carousel-free' ); ?></h2>
89
  <h4 class="sp-wpc__mt-10 sp-wpc__font-18 sp-wpc__font-weight-500"><?php _e( 'Supercharge <strong>Your WordPress Carousels</strong> with powerful functionality!', 'wp-carousel-free' ); ?></h4>
90
+ <p class="sp-wpc__mt-25 text-color-2 line-height-20 sp-wpc__font-weight-400"><?php esc_html__( 'The Most Powerful and User-friendly Multi-purpose WordPress Carousel plugin to Slide out of Anything.', 'wp-carousel-free' ); ?></p>
91
+ <p class="sp-wpc__mt-20 text-color-2 sp-wpc__line-height-20 sp-wpc__font-weight-400"><?php esc_html__( 'Create beautiful carousels with images, Posts, WooCommerce Products, Contents (Images, Text, HTML, Shortcodes), Video, etc. The plugin has its own image and content management system and also Supports <strong>Posts, Pages, Custom Post Type, Taxonomy, Custom Taxonomy, Custom Contents, YouTube, Vimeo, Dailymotion, mp4, WebM, Self-hosted Video</strong> with Lightbox.', 'wp-carousel-free' ); ?></p>
92
  </div>
93
  <div class="sp-wpc__banner-button sp-wpc__mt-40">
94
  <a class="sp-wpc__btn sp-wpc__btn-sky" href="https://shapedplugin.com/plugin/wordpress-carousel-pro/?ref=1" target="_blank">Upgrade To Pro Now</a>
97
  </div>
98
  <div class="sp-wpc__col-xl-6">
99
  <div class="sp-wpc__banner-img">
100
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/wpcp-vector.svg'; ?>" alt="">
101
  </div>
102
  </div>
103
  </div>
152
  <h4 class="sp-wpc__font-16 sp-wpc__mt-10 sp-wpc__font-weight-400">Learn why WordPress Carousel Pro is the best Multi-purpose Carousel Plugin.</h4>
153
  </div>
154
  <div class="video-area text-center">
155
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/wpcp-vector-1.svg'; ?>" alt="">
156
  <div class="video-button">
157
  <a class="js-video-button" href="#" data-channel="youtube" data-video-url="//www.youtube.com/embed/XMYYgFD7ZIA">
158
  <span><i class="fa fa-play"></i></span>
174
  <div class="feature-area">
175
  <div class="feature-item mr-30">
176
  <div class="feature-icon">
177
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/slide-anything.svg'; ?>" alt="">
178
  </div>
179
  <div class="feature-content">
180
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Slide Anything</h3>
184
  <div class="feature-item ml-30">
185
  <div class="feature-icon">
186
  <img src="
187
+ <?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/advanced-carousel-generator.svg'; ?>
188
  " alt="">
189
  </div>
190
  <div class="feature-content">
197
  <div class="feature-item mr-30">
198
  <div class="feature-icon">
199
  <img src="
200
+ <?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/Customize.svg'; ?>
201
  " alt="">
202
  </div>
203
  <div class="feature-content">
207
  </div>
208
  <div class="feature-item ml-30">
209
  <div class="feature-icon">
210
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/Multiple-Image-Carousels.svg'; ?>" alt="">
211
  </div>
212
  <div class="feature-content">
213
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Multiple Image Carousels on the Same Page</h3>
218
  <div class="feature-area">
219
  <div class="feature-item mr-30">
220
  <div class="feature-icon custom-padding">
221
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/post-carousel.svg'; ?>" alt="">
222
  </div>
223
  <div class="feature-content">
224
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Post Carousel (Custom post types, Taxonomies)</h3>
227
  </div>
228
  <div class="feature-item ml-30">
229
  <div class="feature-icon">
230
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/woo-carousel.svg'; ?>" alt="">
231
  </div>
232
  <div class="feature-content">
233
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">WooCommerce Product Carousel (Categories, specific)</h3>
238
  <div class="feature-area">
239
  <div class="feature-item mr-30">
240
  <div class="feature-icon">
241
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/content-carousel.svg'; ?>" alt="">
242
  </div>
243
  <div class="feature-content">
244
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Content Carousel (Slide can be anything you want)</h3>
247
  </div>
248
  <div class="feature-item ml-30">
249
  <div class="feature-icon">
250
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/video-carousel.svg'; ?>" alt="">
251
  </div>
252
  <div class="feature-content">
253
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Video Carousel with Lightbox</h3>
258
  <div class="feature-area">
259
  <div class="feature-item mr-30">
260
  <div class="feature-icon">
261
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/drag-and-drop.svg'; ?>" alt="">
262
  </div>
263
  <div class="feature-content">
264
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Drag & Drop Carousel Builder </h3>
267
  </div>
268
  <div class="feature-item ml-30">
269
  <div class="feature-icon custom-padding">
270
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/links.svg'; ?>" alt="">
271
  </div>
272
  <div class="feature-content">
273
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Image Carousel with Internal & External Linksd</h3>
279
  <div class="feature-area">
280
  <div class="feature-item mr-30">
281
  <div class="feature-icon">
282
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/lightbox.svg'; ?>" alt="">
283
  </div>
284
  <div class="feature-content">
285
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Lightbox Functionality for Image</h3>
288
  </div>
289
  <div class="feature-item ml-30">
290
  <div class="feature-icon">
291
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/carousel-controls.svg'; ?>" alt="">
292
  </div>
293
  <div class="feature-content">
294
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">25+ Carousel Controls</h3>
299
  <div class="feature-area">
300
  <div class="feature-item mr-30">
301
  <div class="feature-icon">
302
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/carosuel-mode.svg'; ?>" alt="">
303
  </div>
304
  <div class="feature-content">
305
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Carousel Mode and Orientation (Horizontal & Vertical) </h3>
308
  </div>
309
  <div class="feature-item ml-30">
310
  <div class="feature-icon">
311
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/Modern-Effects.svg'; ?>" alt="">
312
  </div>
313
  <div class="feature-content">
314
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Modern Effects for Images (grayscale, zoom, fade).</h3>
319
  <div class="feature-area">
320
  <div class="feature-item mr-30">
321
  <div class="feature-icon">
322
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/Re-sizing.svg'; ?>" alt="">
323
  </div>
324
  <div class="feature-content">
325
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Custom Image Re-sizing</h3>
328
  </div>
329
  <div class="feature-item ml-30">
330
  <div class="feature-icon">
331
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/Advanced-settings.svg'; ?>" alt="">
332
  </div>
333
  <div class="feature-content">
334
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Advanced Plugin Settings</h3>
339
  <div class="feature-area">
340
  <div class="feature-item mr-30">
341
  <div class="feature-icon">
342
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/typo.svg'; ?>" alt="">
343
  </div>
344
  <div class="feature-content">
345
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Advanced Typography (Fonts, Color & Styling)</h3>
348
  </div>
349
  <div class="feature-item ml-30">
350
  <div class="feature-icon">
351
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/Translation-RTL-Ready.svg'; ?>" alt="">
352
  </div>
353
  <div class="feature-content">
354
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Multisite, Multilingual, RTL, Accessibility Ready</h3>
359
  <div class="feature-area">
360
  <div class="feature-item mr-30">
361
  <div class="feature-icon">
362
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/page-bilder.svg'; ?>" alt="">
363
  </div>
364
  <div class="feature-content">
365
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Page Builders & Countless Theme Compatibility</h3>
368
  </div>
369
  <div class="feature-item ml-30">
370
  <div class="feature-icon">
371
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/support.svg'; ?>" alt="">
372
  </div>
373
  <div class="feature-content">
374
  <h3 class="sp-wpc__font-18 sp-wpc__font-weight-600">Top-notch Support and Frequently Updates</h3>
388
  <div class="sp-wpc__col-xl-12">
389
  <div class="buy-content text-center">
390
  <div class="buy-img">
391
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/premium/happy.svg'; ?>" alt="">
392
  </div>
393
+ <h2 class="sp-wpc__font-28">Join
394
  <?php
395
  $install = 0;
396
  foreach ( $plugin_names as &$plugin_name ) {
398
  }
399
  echo esc_attr( $install + '15000' ) . '+';
400
  ?>
401
+ Happy Users in 160+ Countries </h2>
402
  <p class="sp-wpc__font-16 sp-wpc__mt-25 sp-wpc__line-height-22">98% of customers are happy with <b>ShapedPlugin's</b> products and support. <br>
403
  So it’s a great time to join them.</p>
404
  <a class="sp-wpc__btn sp-wpc__btn-buy sp-wpc__mt-40" href="https://shapedplugin.com/plugin/wordpress-carousel-pro/?ref=1" target="_blank">Get Started for $39 Today!</a>
421
  </div>
422
  <div class="testimonial-info">
423
  <div class="img">
424
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/Joyce-van-den-Berg.png'; ?>" alt="">
425
  </div>
426
  <div class="info">
427
  <h3>Joyce van den Berg</h3>
439
  </div>
440
  <div class="testimonial-info">
441
  <div class="img">
442
+ <img src="<?php echo esc_url( WPCAROUSELF_URL ) . 'admin/img/images/Graeme-Myburgh.jpeg'; ?>" alt="">
443
  </div>
444
  <div class="info">
445
  <h3>Graeme Myburgh</h3>
admin/views/tmce-button.php CHANGED
@@ -1,5 +1,15 @@
1
  <?php
2
- // Make sure we don't expose any info if called directly
 
 
 
 
 
 
 
 
 
 
3
  if ( ! defined( 'ABSPATH' ) ) {
4
  exit;
5
  }
@@ -72,8 +82,8 @@ if ( ! class_exists( 'SP_WPCP_MCE_Carousel_List' ) ) {
72
  * Register our button in the editor.
73
  *
74
  * @since 2.0.0
75
- * @param string $buttons The Tiny mce button.
76
- * @return statement
77
  */
78
  public function register_mce_button( $buttons ) {
79
  array_push( $buttons, 'sp_wpcp_mce_button' );
@@ -95,7 +105,7 @@ if ( ! class_exists( 'SP_WPCP_MCE_Carousel_List' ) ) {
95
  $cpt = $wpdb->get_results(
96
  $wpdb->prepare(
97
  "SELECT ID, post_title
98
- FROM $wpdb->posts
99
  WHERE $wpdb->posts.post_type = %s
100
  AND $wpdb->posts.post_status = %s
101
  ORDER BY ID DESC",
@@ -126,7 +136,7 @@ if ( ! class_exists( 'SP_WPCP_MCE_Carousel_List' ) ) {
126
  * @return string
127
  */
128
  public function wpcp_carousel_list_ajax() {
129
- // check for nonce.
130
  check_ajax_referer( 'sp-wpcp-mce-nonce', 'security' );
131
  $posts = $this->posts( 'sp_wp_carousel' ); // change 'post' if you need posts list.
132
  return $posts;
@@ -139,7 +149,7 @@ if ( ! class_exists( 'SP_WPCP_MCE_Carousel_List' ) ) {
139
  * @return void
140
  */
141
  public function wpcp_cpt_list() {
142
- // create nonce.
143
  global $current_screen;
144
  $current_screen->post_type;
145
  if ( 'post' || 'page' === $current_screen ) {
@@ -149,22 +159,22 @@ if ( ! class_exists( 'SP_WPCP_MCE_Carousel_List' ) ) {
149
  jQuery( document ).ready( function( $ ) {
150
  var data = {
151
  'action' : 'wpcp_cpt_list', // wp ajax action.
152
- 'security' : '<?php echo $nonce; ?>' // nonce value created earlier.
153
  };
154
  // fire ajax.
155
- jQuery.post( ajaxurl, data, function( response ) {
156
- // if nonce fails then not authorized else settings saved.
157
- if( response === '-1' ){
158
- // do nothing.
159
- console.log('error');
160
- } else {
161
- if (typeof(tinyMCE) != 'undefined') {
162
- if (tinyMCE.activeEditor != null) {
163
  tinyMCE.activeEditor.settings.spWPCPCarouselList = response;
164
  }
165
  }
166
- }
167
- });
168
  });
169
  </script>
170
  <?php
1
  <?php
2
+ /**
3
+ * The Tiny MCE button.
4
+ *
5
+ * @link https://shapedplugin.com
6
+ * @since 2.0.0
7
+ *
8
+ * @package WordPress_Carousel_Pro
9
+ * @subpackage WordPress_Carousel_Pro/admin/views
10
+ */
11
+
12
+ // Make sure we don't expose any info if called directly.
13
  if ( ! defined( 'ABSPATH' ) ) {
14
  exit;
15
  }
82
  * Register our button in the editor.
83
  *
84
  * @since 2.0.0
85
+ * @param array $buttons The Tiny mce button.
86
+ * @return array
87
  */
88
  public function register_mce_button( $buttons ) {
89
  array_push( $buttons, 'sp_wpcp_mce_button' );
105
  $cpt = $wpdb->get_results(
106
  $wpdb->prepare(
107
  "SELECT ID, post_title
108
+ FROM $wpdb->posts
109
  WHERE $wpdb->posts.post_type = %s
110
  AND $wpdb->posts.post_status = %s
111
  ORDER BY ID DESC",
136
  * @return string
137
  */
138
  public function wpcp_carousel_list_ajax() {
139
+ // Check for nonce.
140
  check_ajax_referer( 'sp-wpcp-mce-nonce', 'security' );
141
  $posts = $this->posts( 'sp_wp_carousel' ); // change 'post' if you need posts list.
142
  return $posts;
149
  * @return void
150
  */
151
  public function wpcp_cpt_list() {
152
+ // Create nonce.
153
  global $current_screen;
154
  $current_screen->post_type;
155
  if ( 'post' || 'page' === $current_screen ) {
159
  jQuery( document ).ready( function( $ ) {
160
  var data = {
161
  'action' : 'wpcp_cpt_list', // wp ajax action.
162
+ 'security' : '<?php echo esc_attr( $nonce ); ?>' // nonce value created earlier.
163
  };
164
  // fire ajax.
165
+ jQuery.post( ajaxurl, data, function( response ) {
166
+ // if nonce fails then not authorized else settings saved.
167
+ if( response === '-1' ){
168
+ // do nothing.
169
+ console.log('error');
170
+ } else {
171
+ if (typeof(tinyMCE) != 'undefined') {
172
+ if (tinyMCE.activeEditor != null) {
173
  tinyMCE.activeEditor.settings.spWPCPCarouselList = response;
174
  }
175
  }
176
+ }
177
+ });
178
  });
179
  </script>
180
  <?php
admin/views/tools-config.php CHANGED
@@ -1,4 +1,15 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
 
 
 
 
 
 
 
 
 
 
 
2
  die; } // Cannot access directly.
3
 
4
  //
@@ -50,7 +61,7 @@ SP_WPCF::createSection(
50
  'id' => 'lcp_post',
51
  'class' => 'wpcp_post_ids',
52
  'type' => 'select',
53
- 'title' => __( ' ', 'wp-carousel-free' ),
54
  'options' => 'sp_wp_carousel',
55
  'chosen' => true,
56
  'sortable' => false,
1
+ <?php
2
+ /**
3
+ * The admin tools menu of the plugin.
4
+ *
5
+ * @link https://shapedplugin.com
6
+ * @since 2.0.0
7
+ *
8
+ * @package WordPress_Carousel_Pro
9
+ * @subpackage WordPress_Carousel_Pro/admin/views
10
+ */
11
+
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
  die; } // Cannot access directly.
14
 
15
  //
61
  'id' => 'lcp_post',
62
  'class' => 'wpcp_post_ids',
63
  'type' => 'select',
64
+ 'title' => ' ',
65
  'options' => 'sp_wp_carousel',
66
  'chosen' => true,
67
  'sortable' => false,
admin/views/wpcfree-metabox/assets/css/spf.css CHANGED
@@ -4865,7 +4865,8 @@ WP Carousel Pro Custom CSS.
4865
  Free version CSS.
4866
  */
4867
  .spf-field-carousel_type .spf--image:nth-child(4),
4868
- .spf-field-carousel_type .spf--image:nth-child(5) {
 
4869
  pointer-events: none;
4870
  }
4871
  .spf-field-carousel_type .spf--image {
@@ -5126,3 +5127,20 @@ WP Carousel Pro Custom CSS.
5126
  position: sticky;
5127
  line-height: 27px;
5128
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4865
  Free version CSS.
4866
  */
4867
  .spf-field-carousel_type .spf--image:nth-child(4),
4868
+ .spf-field-carousel_type .spf--image:nth-child(5),
4869
+ .spf-field-carousel_type .spf--image:nth-child(6) {
4870
  pointer-events: none;
4871
  }
4872
  .spf-field-carousel_type .spf--image {
5127
  position: sticky;
5128
  line-height: 27px;
5129
  }
5130
+
5131
+ /* Carousel Row style */
5132
+ .spf-field-column.wpcp_carousel_row_pro_only {
5133
+ opacity: .7;
5134
+ pointer-events: none;
5135
+ }
5136
+ .spf-field-column.wpcp_carousel_row_pro_only .spf-fieldset .spf--input:last-child::after {
5137
+ position: absolute;
5138
+ content: "PRO";
5139
+ background-color: #d4d4d4;
5140
+ padding: 2px 4px;
5141
+ font-size: 8px;
5142
+ border-radius: 2px;
5143
+ height: 11px;
5144
+ margin-left: 5px;
5145
+ margin-top: 7px;
5146
+ }
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 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;-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 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;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important;border-radius:4px;height:38px;-webkit-transition:background-color .2s;transition:background-color .2s;color:#fff!important}.spf-buttons .button.spf-save-ajax{background-color:#02cc7b;border-color:transparent;color:#fff!important;-webkit-box-shadow:none;box-shadow:none;text-shadow:none;border-radius:4px;height:38px;width:75px;-webkit-transition:background-color .2s;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;-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:#178087;border-top:1px solid #178087;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 #178087;box-shadow:0 3px 0 0 #178087 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:#178087}.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 #178087 inset}.spf-field.spf-field-notice.pro_notice{padding-top:0}.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-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;user-select:none;-webkit-user-select:none;-moz-transition:all .2s;-o-transition:all .2s;-webkit-transition:all .2s;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;user-select:none;-webkit-user-select:none;-moz-transition:all .2s;-o-transition:all .2s;-webkit-transition:all .2s;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;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-success{border-color:#46b450}.spf-notice-info{border-color:#339fd4}.spf-notice-warning{border-color:#ffbc00}.spf-notice-danger{border-color:#dc3232}.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 10px 28px;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;border:1px solid rgba(82,179,217,.2);border-radius:2px;cursor:pointer;position:relative}.spf-field-shortcode.wpcp-admin-footer .wpcp-shortcode-selectable::after{content:url(../images/copy.svg);width:16px;left:10px;top:50%;position:absolute;margin-top:-7px}.spf-field-shortcode.wpcp-admin-footer .sptp-copy-btn{width:16px;margin-left:13px;position:absolute;top:50%;margin-top:-8px}#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;pointer-events:none}.spf-field-button_set .spf--button.spf-pro-only{background-color:rgba(247,247,247,.4)!important}.spf-field.spf-field-switcher.only_pro_switcher .spf--ball::after{content:"PRO";position:relative;text-align:center;width:24px;float:right;font-weight:600;font-size:8px;color:#a5a5a5;opacity:1;line-height:18px}.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-field.spf-field-switcher.only_pro_switcher .spf--switcher{background:#cbcfd0;pointer-events:none}#spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header img{max-width:200px}.sp_wp_carousel_page_wpcp_settings .wrap h1{display:none}.spf-notice{color:#999;font-style:italic;font-size:13px;padding:12px 12px 12px 0!important;border:none!important}.spf-field-notice{background-color:transparent!important}.spf-field.spf-field-button_set.wpcp_export{margin-top:0;padding-top:0}.spf-field-button_set.wpcp_export .spf--button:hover,.spf-field.spf-field-custom_import.wpcp_import button:hover{background:#135e96;border-color:#135e96;color:#fff}.spf-field-button_set.wpcp_export .spf--button,.spf-field.spf-field-custom_import.wpcp_import button{background:#2271b1;border-color:#2271b1;color:#fff;text-decoration:none;text-shadow:none;display:inline-block;text-decoration:none;font-size:13px;line-height:2.15384615;min-height:30px;margin:0;padding:0 10px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box}.sp-lcp-options .spf-field-select .spf-fieldset{position:relative}.spf-field.spf-field-custom_import.wpcp_import .spf-fieldset{position:relative}.spf-field.spf-field-custom_import.wpcp_import p{padding-bottom:0;margin-bottom:1px}.spf-field.spf-field-custom_import.wpcp_import button{margin-top:10px;padding-bottom:0}.spf-field.spf-field-custom_import.wpcp_import .spf-help{cursor:help;position:absolute;top:80%;transform:translateY(-50%);padding:5px;font-size:14px;color:#aaa;width:15px;left:64px}.spf-field.spf-field-select.wpcp_post_ids .chosen-container .chosen-drop{max-width:400px}.spf-field.spf-field-select.wpcp_post_ids .chosen-container{max-width:400px}.spf-field.spf-field-select.wpcp_post_ids{padding-top:0}.sp-wpcp-options .spf-header-inner h1.export-import img{height:24px;height:24px;float:left;width:28px;margin-right:8px;padding-top:6px}.sp-wpcp-options.wpcp_tools .spf-nav-options li:nth-child(1) a{background-image:url(../images/export-icon.svg)}.sp-wpcp-options.wpcp_tools .spf-nav-options li:nth-child(2) a{background-image:url(../images/import.svg)}.sp-wpcp-options.wpcp_tools .spf-nav-options li:nth-child(1) a.spf-section-active{background-image:url(../images/file-export-icon1.svg)}.sp-wpcp-options.wpcp_tools .spf-nav-options li:nth-child(2) a.spf-section-active{background-image:url(../images/file-import-icon1.svg)}.sp-wpcp-options.wpcp_tools .spf-nav-options ul li a{padding:15px 30px;background-size:14px;background-position:10px center;background-repeat:no-repeat}.spf-field.spf-field-column .clear{clear:inherit}.spf-field-checkbox .spf-help,.spf-field-column .spf-help{position:sticky;line-height:27px}
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;-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 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;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important;border-radius:4px;height:38px;-webkit-transition:background-color .2s;transition:background-color .2s;color:#fff!important}.spf-buttons .button.spf-save-ajax{background-color:#02cc7b;border-color:transparent;color:#fff!important;-webkit-box-shadow:none;box-shadow:none;text-shadow:none;border-radius:4px;height:38px;width:75px;-webkit-transition:background-color .2s;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;-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:#178087;border-top:1px solid #178087;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 #178087;box-shadow:0 3px 0 0 #178087 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:#178087}.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 #178087 inset}.spf-field.spf-field-notice.pro_notice{padding-top:0}.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-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;user-select:none;-webkit-user-select:none;-moz-transition:all .2s;-o-transition:all .2s;-webkit-transition:all .2s;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;user-select:none;-webkit-user-select:none;-moz-transition:all .2s;-o-transition:all .2s;-webkit-transition:all .2s;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;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-success{border-color:#46b450}.spf-notice-info{border-color:#339fd4}.spf-notice-warning{border-color:#ffbc00}.spf-notice-danger{border-color:#dc3232}.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),.spf-field-carousel_type .spf--image:nth-child(6){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 10px 28px;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;border:1px solid rgba(82,179,217,.2);border-radius:2px;cursor:pointer;position:relative}.spf-field-shortcode.wpcp-admin-footer .wpcp-shortcode-selectable::after{content:url(../images/copy.svg);width:16px;left:10px;top:50%;position:absolute;margin-top:-7px}.spf-field-shortcode.wpcp-admin-footer .sptp-copy-btn{width:16px;margin-left:13px;position:absolute;top:50%;margin-top:-8px}#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;pointer-events:none}.spf-field-button_set .spf--button.spf-pro-only{background-color:rgba(247,247,247,.4)!important}.spf-field.spf-field-switcher.only_pro_switcher .spf--ball::after{content:"PRO";position:relative;text-align:center;width:24px;float:right;font-weight:600;font-size:8px;color:#a5a5a5;opacity:1;line-height:18px}.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-field.spf-field-switcher.only_pro_switcher .spf--switcher{background:#cbcfd0;pointer-events:none}#spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header img{max-width:200px}.sp_wp_carousel_page_wpcp_settings .wrap h1{display:none}.spf-notice{color:#999;font-style:italic;font-size:13px;padding:12px 12px 12px 0!important;border:none!important}.spf-field-notice{background-color:transparent!important}.spf-field.spf-field-button_set.wpcp_export{margin-top:0;padding-top:0}.spf-field-button_set.wpcp_export .spf--button:hover,.spf-field.spf-field-custom_import.wpcp_import button:hover{background:#135e96;border-color:#135e96;color:#fff}.spf-field-button_set.wpcp_export .spf--button,.spf-field.spf-field-custom_import.wpcp_import button{background:#2271b1;border-color:#2271b1;color:#fff;text-decoration:none;text-shadow:none;display:inline-block;text-decoration:none;font-size:13px;line-height:2.15384615;min-height:30px;margin:0;padding:0 10px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box}.sp-lcp-options .spf-field-select .spf-fieldset{position:relative}.spf-field.spf-field-custom_import.wpcp_import .spf-fieldset{position:relative}.spf-field.spf-field-custom_import.wpcp_import p{padding-bottom:0;margin-bottom:1px}.spf-field.spf-field-custom_import.wpcp_import button{margin-top:10px;padding-bottom:0}.spf-field.spf-field-custom_import.wpcp_import .spf-help{cursor:help;position:absolute;top:80%;transform:translateY(-50%);padding:5px;font-size:14px;color:#aaa;width:15px;left:64px}.spf-field.spf-field-select.wpcp_post_ids .chosen-container .chosen-drop{max-width:400px}.spf-field.spf-field-select.wpcp_post_ids .chosen-container{max-width:400px}.spf-field.spf-field-select.wpcp_post_ids{padding-top:0}.sp-wpcp-options .spf-header-inner h1.export-import img{height:24px;height:24px;float:left;width:28px;margin-right:8px;padding-top:6px}.sp-wpcp-options.wpcp_tools .spf-nav-options li:nth-child(1) a{background-image:url(../images/export-icon.svg)}.sp-wpcp-options.wpcp_tools .spf-nav-options li:nth-child(2) a{background-image:url(../images/import.svg)}.sp-wpcp-options.wpcp_tools .spf-nav-options li:nth-child(1) a.spf-section-active{background-image:url(../images/file-export-icon1.svg)}.sp-wpcp-options.wpcp_tools .spf-nav-options li:nth-child(2) a.spf-section-active{background-image:url(../images/file-import-icon1.svg)}.sp-wpcp-options.wpcp_tools .spf-nav-options ul li a{padding:15px 30px;background-size:14px;background-position:10px center;background-repeat:no-repeat}.spf-field.spf-field-column .clear{clear:inherit}.spf-field-checkbox .spf-help,.spf-field-column .spf-help{position:sticky;line-height:27px}.spf-field-column.wpcp_carousel_row_pro_only{opacity:.7;pointer-events:none}.spf-field-column.wpcp_carousel_row_pro_only .spf-fieldset .spf--input:last-child::after{position:absolute;content:"PRO";background-color:#d4d4d4;padding:2px 4px;font-size:8px;border-radius:2px;height:11px;margin-left:5px;margin-top:7px}
admin/views/wpcfree-metabox/assets/js/spf.js CHANGED
@@ -2458,45 +2458,45 @@
2458
  // Post
2459
  // ------------------------------------------------------
2460
  // Trigger taxonomy list when post type is selected.
2461
- $('.sp_wpcp_post_type select').change(function (event) {
2462
- event.preventDefault();
2463
- var data = {
2464
- action: 'wpcp_get_taxonomies',
2465
- wpcf_post_type: $(this).val(),
2466
- }
2467
- $.post(ajaxurl, data, function (resp) {
2468
- $('.sp_wpcp_post_taxonomy select').html(resp);
2469
- $(".sp_wpcp_post_taxonomy select").trigger("chosen:updated");
2470
- });
2471
- });
2472
 
2473
  // Update terms list on the change of post taxonomy.
2474
- $('.sp_wpcp_post_taxonomy select').change(function (event) {
2475
- event.preventDefault();
2476
- var data = {
2477
- action: 'wpcp_get_terms', // Callback function.
2478
- wpcf_post_taxonomy: $(this).val(),
2479
- }
2480
- $.post(ajaxurl, data, function (resp) {
2481
- $('.sp_wpcp_taxonomy_terms select').html(resp);
2482
- $(".sp_wpcp_taxonomy_terms select").trigger("chosen:updated");
2483
 
2484
- });
2485
- });
2486
 
2487
 
2488
  // Populate specific post list in the drop-down.
2489
- $('.sp_wpcp_post_type select').change(function (event) {
2490
- event.preventDefault();
2491
- var data = {
2492
- action: 'wpcp_get_posts', // Callback function.
2493
- wpcf_post_type: $(this).val(), // Callback function's value.
2494
- }
2495
- $.post(ajaxurl, data, function (resp) {
2496
- $('.sp_wpcp_specific_posts select').html(resp);
2497
- $(".sp_wpcp_specific_posts select").trigger("chosen:updated");
2498
- });
2499
- });
2500
 
2501
  // Disable some pro feature.
2502
  $('.spf-field-select select option:contains("Pro")').attr('disabled', 'disabled').addClass('wpcp_pro_only').css({ 'pointer-events': 'none', 'opacity': '.8' });
2458
  // Post
2459
  // ------------------------------------------------------
2460
  // Trigger taxonomy list when post type is selected.
2461
+ // $('.sp_wpcp_post_type select').change(function (event) {
2462
+ // event.preventDefault();
2463
+ // var data = {
2464
+ // action: 'wpcp_get_taxonomies',
2465
+ // wpcf_post_type: $(this).val(),
2466
+ // }
2467
+ // $.post(ajaxurl, data, function (resp) {
2468
+ // $('.sp_wpcp_post_taxonomy select').html(resp);
2469
+ // $(".sp_wpcp_post_taxonomy select").trigger("chosen:updated");
2470
+ // });
2471
+ // });
2472
 
2473
  // Update terms list on the change of post taxonomy.
2474
+ // $('.sp_wpcp_post_taxonomy select').change(function (event) {
2475
+ // event.preventDefault();
2476
+ // var data = {
2477
+ // action: 'wpcp_get_terms', // Callback function.
2478
+ // wpcf_post_taxonomy: $(this).val(),
2479
+ // }
2480
+ // $.post(ajaxurl, data, function (resp) {
2481
+ // $('.sp_wpcp_taxonomy_terms select').html(resp);
2482
+ // $(".sp_wpcp_taxonomy_terms select").trigger("chosen:updated");
2483
 
2484
+ // });
2485
+ // });
2486
 
2487
 
2488
  // Populate specific post list in the drop-down.
2489
+ // $('.sp_wpcp_post_type select').change(function (event) {
2490
+ // event.preventDefault();
2491
+ // var data = {
2492
+ // action: 'wpcp_get_posts', // Callback function.
2493
+ // wpcf_post_type: $(this).val(), // Callback function's value.
2494
+ // }
2495
+ // $.post(ajaxurl, data, function (resp) {
2496
+ // $('.sp_wpcp_specific_posts select').html(resp);
2497
+ // $(".sp_wpcp_specific_posts select").trigger("chosen:updated");
2498
+ // });
2499
+ // });
2500
 
2501
  // Disable some pro feature.
2502
  $('.spf-field-select select option:contains("Pro")').attr('disabled', 'disabled').addClass('wpcp_pro_only').css({ 'pointer-events': 'none', 'opacity': '.8' });
admin/views/wpcfree-metabox/assets/js/spf.min.js CHANGED
@@ -1 +1 @@
1
- !function($,window,document,undefined){"use strict";var SP_WPCF=SP_WPCF||{};function wpcp_copyToClipboard(element){var $temp=$("<input>");$("body").append($temp),$temp.val($(element).text()).select(),document.execCommand("copy"),$temp.remove()}function wpcp_SelectText(element){var r=document.createRange(),w=element.get(0);r.selectNodeContents(w);var sel=window.getSelection();sel.removeAllRanges(),sel.addRange(r)}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"),SP_WPCF.vars.is_rtl,offset_left=$this.offset().left+24,$tooltip.css({top:$this.offset().top-($tooltip.outerHeight()/2-14),left:offset_left,textAlign:"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")}))})),$('.spf-field-select select option:contains("Pro")').attr("disabled","disabled").addClass("wpcp_pro_only").css({"pointer-events":"none",opacity:".8"}),$(".wpcp-shortcode-selectable").click((function(e){e.preventDefault(),wpcp_copyToClipboard($(this)),wpcp_SelectText($(this)),$(this).focus().select(),jQuery(".spwpc-after-copy-text").animate({opacity:1,bottom:25},300),setTimeout((function(){jQuery(".spwpc-after-copy-text").animate({opacity:0},200),jQuery(".spwpc-after-copy-text").animate({bottom:0},0)}),2e3)})),$(".post-type-sp_wp_carousel .shortcode.column-shortcode input").click((function(e){var copyText;e.preventDefault(),$(this).select(),document.execCommand("copy"),jQuery(".spwpc-after-copy-text").animate({opacity:1,bottom:25},300),setTimeout((function(){jQuery(".spwpc-after-copy-text").animate({opacity:0},200),jQuery(".spwpc-after-copy-text").animate({bottom:0},0)}),2e3)}));var $export_type=$(".wpcp_what_export").find("input:checked").val();$(".wpcp_what_export").on("change",(function(){$export_type=$(this).find("input:checked").val()})),$(".wpcp_export .spf--button").click((function(event){event.preventDefault();var $shortcode_ids=$(".wpcp_post_ids select").val(),$ex_nonce=$("#spf_options_nonce").val(),selected_shortcode;if("all_shortcodes"===$export_type||"selected_shortcodes"===$export_type)var data={action:"wpcp_export_shortcodes",wpcf_ids:"selected_shortcodes"===$export_type?$shortcode_ids:"all_shortcodes",nonce:$ex_nonce};else $(".spf-form-result.spf-form-success").text("No carousel selected.").show(),setTimeout((function(){$(".spf-form-result.spf-form-success").hide().text("")}),3e3);$.post(ajaxurl,data,(function(resp){if(resp){var json=JSON.stringify(resp);json=[json];var blob=new Blob(json),link=document.createElement("a"),wpcp_time=$.now();link.href=window.URL.createObjectURL(blob),link.download="wp-carousel-export-"+wpcp_time+".json",link.click(),$(".spf-form-result.spf-form-success").text("Exported successfully!").show(),setTimeout((function(){$(".spf-form-result.spf-form-success").hide().text(""),$(".wpcp_post_ids select").val("").trigger("chosen:updated")}),3e3)}}))})),$(".wpcp_import button.import").click((function(event){event.preventDefault();var wpcp_shortcodes=$("#import").prop("files")[0];if(""!=$("#import").val()){var $im_nonce=$("#spf_options_nonce").val(),reader=new FileReader;reader.readAsText(wpcp_shortcodes),reader.onload=function(event){var jsonObj=JSON.stringify(event.target.result);$.ajax({url:ajaxurl,type:"POST",data:{shortcode:jsonObj,action:"wpcp_import_shortcodes",nonce:$im_nonce},success:function(resp){$(".spf-form-result.spf-form-success").text("Imported successfully!").show(),setTimeout((function(){$(".spf-form-result.spf-form-success").hide().text(""),$("#import").val(""),window.location.replace($("#wpcp_shortcode_link_redirect").attr("href"))}),2e3)}})}}else $(".spf-form-result.spf-form-success").text("No exported json file chosen.").show(),setTimeout((function(){$(".spf-form-result.spf-form-success").hide().text("")}),3e3)}))}(jQuery,window,document);
1
+ !function($,window,document,undefined){"use strict";var SP_WPCF=SP_WPCF||{};function wpcp_copyToClipboard(element){var $temp=$("<input>");$("body").append($temp),$temp.val($(element).text()).select(),document.execCommand("copy"),$temp.remove()}function wpcp_SelectText(element){var r=document.createRange(),w=element.get(0);r.selectNodeContents(w);var sel=window.getSelection();sel.removeAllRanges(),sel.addRange(r)}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"),SP_WPCF.vars.is_rtl,offset_left=$this.offset().left+24,$tooltip.css({top:$this.offset().top-($tooltip.outerHeight()/2-14),left:offset_left,textAlign:"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()})),$('.spf-field-select select option:contains("Pro")').attr("disabled","disabled").addClass("wpcp_pro_only").css({"pointer-events":"none",opacity:".8"}),$(".wpcp-shortcode-selectable").click((function(e){e.preventDefault(),wpcp_copyToClipboard($(this)),wpcp_SelectText($(this)),$(this).focus().select(),jQuery(".spwpc-after-copy-text").animate({opacity:1,bottom:25},300),setTimeout((function(){jQuery(".spwpc-after-copy-text").animate({opacity:0},200),jQuery(".spwpc-after-copy-text").animate({bottom:0},0)}),2e3)})),$(".post-type-sp_wp_carousel .shortcode.column-shortcode input").click((function(e){var copyText;e.preventDefault(),$(this).select(),document.execCommand("copy"),jQuery(".spwpc-after-copy-text").animate({opacity:1,bottom:25},300),setTimeout((function(){jQuery(".spwpc-after-copy-text").animate({opacity:0},200),jQuery(".spwpc-after-copy-text").animate({bottom:0},0)}),2e3)}));var $export_type=$(".wpcp_what_export").find("input:checked").val();$(".wpcp_what_export").on("change",(function(){$export_type=$(this).find("input:checked").val()})),$(".wpcp_export .spf--button").click((function(event){event.preventDefault();var $shortcode_ids=$(".wpcp_post_ids select").val(),$ex_nonce=$("#spf_options_nonce").val(),selected_shortcode;if("all_shortcodes"===$export_type||"selected_shortcodes"===$export_type)var data={action:"wpcp_export_shortcodes",wpcf_ids:"selected_shortcodes"===$export_type?$shortcode_ids:"all_shortcodes",nonce:$ex_nonce};else $(".spf-form-result.spf-form-success").text("No carousel selected.").show(),setTimeout((function(){$(".spf-form-result.spf-form-success").hide().text("")}),3e3);$.post(ajaxurl,data,(function(resp){if(resp){var json=JSON.stringify(resp);json=[json];var blob=new Blob(json),link=document.createElement("a"),wpcp_time=$.now();link.href=window.URL.createObjectURL(blob),link.download="wp-carousel-export-"+wpcp_time+".json",link.click(),$(".spf-form-result.spf-form-success").text("Exported successfully!").show(),setTimeout((function(){$(".spf-form-result.spf-form-success").hide().text(""),$(".wpcp_post_ids select").val("").trigger("chosen:updated")}),3e3)}}))})),$(".wpcp_import button.import").click((function(event){event.preventDefault();var wpcp_shortcodes=$("#import").prop("files")[0];if(""!=$("#import").val()){var $im_nonce=$("#spf_options_nonce").val(),reader=new FileReader;reader.readAsText(wpcp_shortcodes),reader.onload=function(event){var jsonObj=JSON.stringify(event.target.result);$.ajax({url:ajaxurl,type:"POST",data:{shortcode:jsonObj,action:"wpcp_import_shortcodes",nonce:$im_nonce},success:function(resp){$(".spf-form-result.spf-form-success").text("Imported successfully!").show(),setTimeout((function(){$(".spf-form-result.spf-form-success").hide().text(""),$("#import").val(""),window.location.replace($("#wpcp_shortcode_link_redirect").attr("href"))}),2e3)}})}}else $(".spf-form-result.spf-form-success").text("No exported json file chosen.").show(),setTimeout((function(){$(".spf-form-result.spf-form-success").hide().text("")}),3e3)}))}(jQuery,window,document);
admin/views/wpcfree-metabox/classes/abstract.class.php CHANGED
@@ -1,34 +1,60 @@
1
  <?php if ( ! defined( 'ABSPATH' ) ) {
2
  die; } // Cannot access directly.
3
- /**
4
- *
5
- * Abstract Class
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
  if ( ! class_exists( 'SP_WPCF_Abstract' ) ) {
 
 
 
 
 
 
 
 
11
  abstract class SP_WPCF_Abstract {
12
 
13
- public $abstract = '';
14
- public $output_css = '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  public $typographies = array();
16
 
 
 
 
 
 
17
  public function __construct() {
18
-
19
- // Check for embed custom css styles
20
  if ( ! empty( $this->args['output_css'] ) ) {
21
  add_action( 'wp_head', array( &$this, 'add_output_css' ), 100 );
22
  }
23
 
24
  }
25
 
 
 
 
 
 
26
  public function add_output_css() {
27
 
28
  $this->output_css = apply_filters( "SP_WPCF_{$this->unique}_output_css", $this->output_css, $this );
29
 
30
  if ( ! empty( $this->output_css ) ) {
31
- echo '<style type="text/css">' . $this->output_css . '</style>';
32
  }
33
 
34
  }
1
  <?php if ( ! defined( 'ABSPATH' ) ) {
2
  die; } // Cannot access directly.
3
+
 
 
 
 
 
 
4
  if ( ! class_exists( 'SP_WPCF_Abstract' ) ) {
5
+
6
+ /**
7
+ *
8
+ * Abstract Class
9
+ *
10
+ * @since 1.0.0
11
+ * @version 1.0.0
12
+ */
13
  abstract class SP_WPCF_Abstract {
14
 
15
+ /**
16
+ * Abstract
17
+ *
18
+ * @var string
19
+ */
20
+ public $abstract = '';
21
+ /**
22
+ * Output_css
23
+ *
24
+ * @var string
25
+ */
26
+ public $output_css = '';
27
+ /**
28
+ * Typographies
29
+ *
30
+ * @var array
31
+ */
32
  public $typographies = array();
33
 
34
+ /**
35
+ * Abstract construct
36
+ *
37
+ * @return void
38
+ */
39
  public function __construct() {
40
+ // Check for embed custom css styles.
 
41
  if ( ! empty( $this->args['output_css'] ) ) {
42
  add_action( 'wp_head', array( &$this, 'add_output_css' ), 100 );
43
  }
44
 
45
  }
46
 
47
+ /**
48
+ * Add_output_css
49
+ *
50
+ * @return void
51
+ */
52
  public function add_output_css() {
53
 
54
  $this->output_css = apply_filters( "SP_WPCF_{$this->unique}_output_css", $this->output_css, $this );
55
 
56
  if ( ! empty( $this->output_css ) ) {
57
+ echo '<style type="text/css">' . esc_html( $this->output_css ) . '</style>';
58
  }
59
 
60
  }
admin/views/wpcfree-metabox/classes/fields.class.php CHANGED
@@ -1,15 +1,25 @@
1
  <?php if ( ! defined( 'ABSPATH' ) ) {
2
  die; } // Cannot access directly.
3
- /**
4
- *
5
- * Fields Class
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
  if ( ! class_exists( 'SP_WPCF_Fields' ) ) {
11
- abstract class SP_WPCF_Fields extends SP_WPCF_Abstract {
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  public function __construct( $field = array(), $value = '', $unique = '', $where = '', $parent = '' ) {
14
  $this->field = $field;
15
  $this->value = $value;
@@ -18,6 +28,12 @@ if ( ! class_exists( 'SP_WPCF_Fields' ) ) {
18
  $this->parent = $parent;
19
  }
20
 
 
 
 
 
 
 
21
  public function field_name( $nested_name = '' ) {
22
 
23
  $field_id = ( ! empty( $this->field['id'] ) ) ? $this->field['id'] : '';
@@ -33,6 +49,12 @@ if ( ! class_exists( 'SP_WPCF_Fields' ) ) {
33
 
34
  }
35
 
 
 
 
 
 
 
36
  public function field_attributes( $custom_atts = array() ) {
37
 
38
  $field_id = ( ! empty( $this->field['id'] ) ) ? $this->field['id'] : '';
@@ -52,10 +74,10 @@ if ( ! class_exists( 'SP_WPCF_Fields' ) ) {
52
 
53
  if ( ! empty( $attributes ) ) {
54
  foreach ( $attributes as $key => $value ) {
55
- if ( $value === 'only-key' ) {
56
- $atts .= ' ' . $key;
57
  } else {
58
- $atts .= ' ' . $key . '="' . $value . '"';
59
  }
60
  }
61
  }
@@ -64,10 +86,20 @@ if ( ! class_exists( 'SP_WPCF_Fields' ) ) {
64
 
65
  }
66
 
 
 
 
 
 
67
  public function field_before() {
68
  return ( ! empty( $this->field['before'] ) ) ? $this->field['before'] : '';
69
  }
70
 
 
 
 
 
 
71
  public function field_after() {
72
 
73
  $output = ( ! empty( $this->field['desc'] ) ) ? '<p class="spf-text-desc">' . $this->field['desc'] . '</p>' : '';
@@ -79,6 +111,12 @@ if ( ! class_exists( 'SP_WPCF_Fields' ) ) {
79
 
80
  }
81
 
 
 
 
 
 
 
82
  public function field_data( $type = '' ) {
83
 
84
  $options = array();
1
  <?php if ( ! defined( 'ABSPATH' ) ) {
2
  die; } // Cannot access directly.
3
+
 
 
 
 
 
 
4
  if ( ! class_exists( 'SP_WPCF_Fields' ) ) {
 
5
 
6
+ /**
7
+ *
8
+ * Fields Class
9
+ *
10
+ * @since 1.0.0
11
+ * @version 1.0.0
12
+ */
13
+ abstract class SP_WPCF_Fields extends SP_WPCF_Abstract {
14
+ /**
15
+ * Field constructor.
16
+ *
17
+ * @param array $field The field type.
18
+ * @param string $value The values of the field.
19
+ * @param string $unique The unique ID for the field.
20
+ * @param string $where To where show the output CSS.
21
+ * @param string $parent The parent args.
22
+ */
23
  public function __construct( $field = array(), $value = '', $unique = '', $where = '', $parent = '' ) {
24
  $this->field = $field;
25
  $this->value = $value;
28
  $this->parent = $parent;
29
  }
30
 
31
+ /**
32
+ * Field_name
33
+ *
34
+ * @param mixed $nested_name name.
35
+ * @return statement
36
+ */
37
  public function field_name( $nested_name = '' ) {
38
 
39
  $field_id = ( ! empty( $this->field['id'] ) ) ? $this->field['id'] : '';
49
 
50
  }
51
 
52
+ /**
53
+ * Field_attributes
54
+ *
55
+ * @param array $custom_atts array custom array.
56
+ * @return string
57
+ */
58
  public function field_attributes( $custom_atts = array() ) {
59
 
60
  $field_id = ( ! empty( $this->field['id'] ) ) ? $this->field['id'] : '';
74
 
75
  if ( ! empty( $attributes ) ) {
76
  foreach ( $attributes as $key => $value ) {
77
+ if ( 'only-key' === $value ) {
78
+ $atts .= ' ' . esc_attr( $key );
79
  } else {
80
+ $atts .= ' ' . esc_attr( $key ) . '="' . esc_attr( $value ) . '"';
81
  }
82
  }
83
  }
86
 
87
  }
88
 
89
+ /**
90
+ * Field_before
91
+ *
92
+ * @return string
93
+ */
94
  public function field_before() {
95
  return ( ! empty( $this->field['before'] ) ) ? $this->field['before'] : '';
96
  }
97
 
98
+ /**
99
+ * Field_after
100
+ *
101
+ * @return statement
102
+ */
103
  public function field_after() {
104
 
105
  $output = ( ! empty( $this->field['desc'] ) ) ? '<p class="spf-text-desc">' . $this->field['desc'] . '</p>' : '';
111
 
112
  }
113
 
114
+ /**
115
+ * Field_data
116
+ *
117
+ * @param mixed $type type.
118
+ * @return Array
119
+ */
120
  public function field_data( $type = '' ) {
121
 
122
  $options = array();
admin/views/wpcfree-metabox/classes/metabox.class.php CHANGED
@@ -10,13 +10,42 @@
10
  if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
11
  class SP_WPCF_Metabox extends SP_WPCF_Abstract {
12
 
13
- // constans
14
- public $unique = '';
15
- public $abstract = 'metabox';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  public $pre_fields = array();
17
- public $sections = array();
18
- public $post_type = array();
19
- public $args = array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  'title' => '',
21
  'post_type' => 'post',
22
  'data_type' => 'serialize',
@@ -34,7 +63,13 @@ if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
34
  'defaults' => array(),
35
  );
36
 
37
- // run metabox construct
 
 
 
 
 
 
38
  public function __construct( $key, $params = array() ) {
39
 
40
  $this->unique = $key;
@@ -54,16 +89,28 @@ if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
54
  }
55
  }
56
 
57
- // wp enqeueu for typography and output css
58
  parent::__construct();
59
 
60
  }
61
 
62
- // instance
 
 
 
 
 
 
63
  public static function instance( $key, $params = array() ) {
64
  return new self( $key, $params );
65
  }
66
 
 
 
 
 
 
 
67
  public function pre_fields( $sections ) {
68
 
69
  $result = array();
@@ -79,6 +126,12 @@ if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
79
  return $result;
80
  }
81
 
 
 
 
 
 
 
82
  public function add_metabox_classes( $classes ) {
83
 
84
  global $post;
@@ -90,7 +143,7 @@ if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
90
 
91
  $classes[] = 'spf-post-formats';
92
 
93
- // Sanitize post format for standard to default
94
  if ( ( $key = array_search( 'standard', $this->post_formats ) ) !== false ) {
95
  $this->post_formats[ $key ] = 'default';
96
  }
@@ -127,7 +180,12 @@ if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
127
 
128
  }
129
 
130
- // add metabox
 
 
 
 
 
131
  public function add_meta_box( $post_type ) {
132
 
133
  if ( ! in_array( $post_type, $this->args['exclude_post_types'] ) ) {
@@ -136,7 +194,12 @@ if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
136
 
137
  }
138
 
139
- // get default value
 
 
 
 
 
140
  public function get_default( $field ) {
141
 
142
  $default = ( isset( $this->args['defaults'][ $field['id'] ] ) ) ? $this->args['defaults'][ $field['id'] ] : '';
@@ -146,7 +209,12 @@ if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
146
 
147
  }
148
 
149
- // get meta value
 
 
 
 
 
150
  public function get_meta_value( $field ) {
151
 
152
  global $post;
@@ -155,7 +223,7 @@ if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
155
 
156
  if ( is_object( $post ) && ! empty( $field['id'] ) ) {
157
 
158
- if ( $this->args['data_type'] !== 'serialize' ) {
159
  $meta = get_post_meta( $post->ID, $field['id'] );
160
  $value = ( isset( $meta[0] ) ) ? $meta[0] : null;
161
  } else {
@@ -172,12 +240,18 @@ if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
172
 
173
  }
174
 
175
- // add metabox content
 
 
 
 
 
 
176
  public function add_meta_box_content( $post, $callback ) {
177
 
178
  global $post;
179
 
180
- $has_nav = ( count( $this->sections ) > 1 && $this->args['context'] !== 'side' ) ? true : false;
181
  $show_all = ( ! $has_nav ) ? ' spf-show-all' : '';
182
  $errors = ( is_object( $post ) ) ? get_post_meta( $post->ID, '_spf_errors', true ) : array();
183
  $errors = ( ! empty( $errors ) ) ? $errors : array();
@@ -188,13 +262,13 @@ if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
188
 
189
  wp_nonce_field( 'spf_metabox_nonce', 'spf_metabox_nonce' );
190
 
191
- echo '<div class="spf spf-theme-' . $this->args['theme'] . ' ' . $this->args['class'] . ' spf-metabox">';
192
 
193
- echo '<div class="spf-wrapper' . $show_all . '">';
194
 
195
  if ( $has_nav ) {
196
 
197
- echo '<div class="spf-nav spf-nav-metabox" data-unique="' . $this->unique . '">';
198
 
199
  echo '<ul>';
200
  $tab_key = 1;
@@ -203,7 +277,7 @@ if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
203
  $tab_error = ( ! empty( $errors['sections'][ $tab_key ] ) ) ? '<i class="spf-label-error spf-error">!</i>' : '';
204
  $tab_icon = ( ! empty( $section['icon'] ) ) ? '<i class="spf-icon ' . $section['icon'] . '"></i>' : '';
205
 
206
- echo '<li><a href="#" data-section="' . $this->unique . '_' . $tab_key . '">' . $tab_icon . $section['title'] . $tab_error . '</a></li>';
207
 
208
  $tab_key++;
209
  }
@@ -223,12 +297,12 @@ if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
223
 
224
  $onload = ( ! $has_nav ) ? ' spf-onload' : '';
225
 
226
- echo '<div id="spf-section-' . $this->unique . '_' . $section_key . '" class="spf-section' . $onload . '">';
227
 
228
- $section_icon = ( ! empty( $section['icon'] ) ) ? '<i class="spf-icon ' . $section['icon'] . '"></i>' : '';
229
  $section_title = ( ! empty( $section['title'] ) ) ? $section['title'] : '';
230
 
231
- echo ( $section_title || $section_icon ) ? '<div class="spf-section-title"><h3>' . $section_icon . $section_title . '</h3></div>' : '';
232
 
233
  if ( ! empty( $section['fields'] ) ) {
234
 
@@ -243,7 +317,7 @@ if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
243
  }
244
  } else {
245
 
246
- echo '<div class="spf-no-option spf-text-muted">' . esc_html__( 'No option provided by developer.', 'wp-carousel-free' ) . '</div>';
247
 
248
  }
249
 
@@ -260,7 +334,7 @@ if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
260
 
261
  echo '<div class=" spf-metabox-restore">';
262
  echo '<label>';
263
- echo '<input type="checkbox" name="' . $this->unique . '[_restore]" />';
264
  echo '<span class="button spf-button-restore">' . esc_html__( 'Restore', 'wp-carousel-free' ) . '</span>';
265
  echo '<span class="button spf-button-cancel">' . sprintf( '<small>( %s )</small> %s', esc_html__( 'update post for restore ', 'wp-carousel-free' ), esc_html__( 'Cancel', 'wp-carousel-free' ) ) . '</span>';
266
  echo '</label>';
@@ -280,7 +354,13 @@ if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
280
 
281
  }
282
 
283
- // save metabox
 
 
 
 
 
 
284
  public function save_meta_box( $post_id, $post ) {
285
 
286
  if ( wp_verify_nonce( spf_get_var( 'spf_metabox_nonce' ), 'spf_metabox_nonce' ) ) {
@@ -290,12 +370,12 @@ if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
290
 
291
  if ( ! empty( $request ) ) {
292
 
293
- // ignore _nonce
294
  if ( isset( $request['_nonce'] ) ) {
295
  unset( $request['_nonce'] );
296
  }
297
 
298
- // sanitize and validate
299
  $section_key = 1;
300
  foreach ( $this->sections as $section ) {
301
 
@@ -305,21 +385,18 @@ if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
305
 
306
  if ( ! empty( $field['id'] ) ) {
307
 
308
- // sanitize
309
  if ( ! empty( $field['sanitize'] ) ) {
310
-
311
- $sanitize = $field['sanitize'];
312
- $value_sanitize = isset( $request[ $field['id'] ] ) ? $request[ $field['id'] ] : '';
313
- $request[ $field['id'] ] = call_user_func( $sanitize, $value_sanitize );
314
-
315
  }
316
 
317
- // validate
318
  if ( ! empty( $field['validate'] ) ) {
319
-
320
- $validate = $field['validate'];
321
- $value_validate = isset( $request[ $field['id'] ] ) ? $request[ $field['id'] ] : '';
322
- $has_validated = call_user_func( $validate, $value_validate );
323
 
324
  if ( ! empty( $has_validated ) ) {
325
 
@@ -330,7 +407,7 @@ if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
330
  }
331
  }
332
 
333
- // auto sanitize
334
  if ( ! isset( $request[ $field['id'] ] ) || is_null( $request[ $field['id'] ] ) ) {
335
  $request[ $field['id'] ] = '';
336
  }
@@ -347,7 +424,7 @@ if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
347
 
348
  if ( empty( $request ) || ! empty( $request['_restore'] ) ) {
349
 
350
- if ( $this->args['data_type'] !== 'serialize' ) {
351
  foreach ( $request as $key => $value ) {
352
  delete_post_meta( $post_id, $key );
353
  }
@@ -356,7 +433,7 @@ if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
356
  }
357
  } else {
358
 
359
- if ( $this->args['data_type'] !== 'serialize' ) {
360
  foreach ( $request as $key => $value ) {
361
  update_post_meta( $post_id, $key, $value );
362
  }
10
  if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
11
  class SP_WPCF_Metabox extends SP_WPCF_Abstract {
12
 
13
+ /**
14
+ * Unique
15
+ *
16
+ * @var string
17
+ */
18
+ public $unique = '';
19
+ /**
20
+ * Abstract
21
+ *
22
+ * @var string
23
+ */
24
+ public $abstract = 'metabox';
25
+ /**
26
+ * Pre_fields
27
+ *
28
+ * @var array
29
+ */
30
  public $pre_fields = array();
31
+ /**
32
+ * Sections
33
+ *
34
+ * @var array
35
+ */
36
+ public $sections = array();
37
+ /**
38
+ * Post_type
39
+ *
40
+ * @var array
41
+ */
42
+ public $post_type = array();
43
+ /**
44
+ * Args
45
+ *
46
+ * @var array
47
+ */
48
+ public $args = array(
49
  'title' => '',
50
  'post_type' => 'post',
51
  'data_type' => 'serialize',
63
  'defaults' => array(),
64
  );
65
 
66
+ /**
67
+ * Run metabox construct
68
+ *
69
+ * @param string $key key.
70
+ * @param array $params params.
71
+ * @return void
72
+ */
73
  public function __construct( $key, $params = array() ) {
74
 
75
  $this->unique = $key;
89
  }
90
  }
91
 
92
+ // wp enqueue for typography and output css.
93
  parent::__construct();
94
 
95
  }
96
 
97
+ /**
98
+ * Instance
99
+ *
100
+ * @param string $key key.
101
+ * @param array $params params.
102
+ * @return statement
103
+ */
104
  public static function instance( $key, $params = array() ) {
105
  return new self( $key, $params );
106
  }
107
 
108
+ /**
109
+ * Pre_fields
110
+ *
111
+ * @param mixed $sections sections.
112
+ * @return array
113
+ */
114
  public function pre_fields( $sections ) {
115
 
116
  $result = array();
126
  return $result;
127
  }
128
 
129
+ /**
130
+ * Add_metabox_classes
131
+ *
132
+ * @param mixed $classes Classes.
133
+ * @return string
134
+ */
135
  public function add_metabox_classes( $classes ) {
136
 
137
  global $post;
143
 
144
  $classes[] = 'spf-post-formats';
145
 
146
+ // Sanitize post format for standard to default.
147
  if ( ( $key = array_search( 'standard', $this->post_formats ) ) !== false ) {
148
  $this->post_formats[ $key ] = 'default';
149
  }
180
 
181
  }
182
 
183
+ /**
184
+ * Add metabox.
185
+ *
186
+ * @param mixed $post_type post type.
187
+ * @return void
188
+ */
189
  public function add_meta_box( $post_type ) {
190
 
191
  if ( ! in_array( $post_type, $this->args['exclude_post_types'] ) ) {
194
 
195
  }
196
 
197
+ /**
198
+ * Get default value
199
+ *
200
+ * @param mixed $field field.
201
+ * @return string
202
+ */
203
  public function get_default( $field ) {
204
 
205
  $default = ( isset( $this->args['defaults'][ $field['id'] ] ) ) ? $this->args['defaults'][ $field['id'] ] : '';
209
 
210
  }
211
 
212
+ /**
213
+ * Get meta value.
214
+ *
215
+ * @param mixed $field field.
216
+ * @return statement
217
+ */
218
  public function get_meta_value( $field ) {
219
 
220
  global $post;
223
 
224
  if ( is_object( $post ) && ! empty( $field['id'] ) ) {
225
 
226
+ if ( 'serialize' !== $this->args['data_type'] ) {
227
  $meta = get_post_meta( $post->ID, $field['id'] );
228
  $value = ( isset( $meta[0] ) ) ? $meta[0] : null;
229
  } else {
240
 
241
  }
242
 
243
+ /**
244
+ * Add metabox content
245
+ *
246
+ * @param mixed $post post.
247
+ * @param mixed $callback call back function.
248
+ * @return void
249
+ */
250
  public function add_meta_box_content( $post, $callback ) {
251
 
252
  global $post;
253
 
254
+ $has_nav = ( count( $this->sections ) > 1 && 'side' !== $this->args['context'] ) ? true : false;
255
  $show_all = ( ! $has_nav ) ? ' spf-show-all' : '';
256
  $errors = ( is_object( $post ) ) ? get_post_meta( $post->ID, '_spf_errors', true ) : array();
257
  $errors = ( ! empty( $errors ) ) ? $errors : array();
262
 
263
  wp_nonce_field( 'spf_metabox_nonce', 'spf_metabox_nonce' );
264
 
265
+ echo '<div class="spf spf-theme-' . esc_attr( $this->args['theme'] ) . ' ' . esc_attr( $this->args['class'] ) . ' spf-metabox">';
266
 
267
+ echo '<div class="spf-wrapper' . esc_attr( $show_all ) . '">';
268
 
269
  if ( $has_nav ) {
270
 
271
+ echo '<div class="spf-nav spf-nav-metabox" data-unique="' . esc_attr( $this->unique ) . '">';
272
 
273
  echo '<ul>';
274
  $tab_key = 1;
277
  $tab_error = ( ! empty( $errors['sections'][ $tab_key ] ) ) ? '<i class="spf-label-error spf-error">!</i>' : '';
278
  $tab_icon = ( ! empty( $section['icon'] ) ) ? '<i class="spf-icon ' . $section['icon'] . '"></i>' : '';
279
 
280
+ echo '<li><a href="#" data-section="' . esc_attr( $this->unique ) . '_' . esc_attr( $tab_key ) . '">' . wp_kses_post( $tab_icon . $section['title'] . $tab_error ) . '</a></li>';
281
 
282
  $tab_key++;
283
  }
297
 
298
  $onload = ( ! $has_nav ) ? ' spf-onload' : '';
299
 
300
+ echo '<div id="spf-section-' . esc_attr( $this->unique ) . '_' . esc_attr( $section_key ) . '" class="spf-section' . esc_attr( $onload ) . '">';
301
 
302
+ $section_icon = ( ! empty( $section['icon'] ) ) ? '<i class="spf-icon ' . esc_attr( $section['icon'] ) . '"></i>' : '';
303
  $section_title = ( ! empty( $section['title'] ) ) ? $section['title'] : '';
304
 
305
+ echo ( $section_title || $section_icon ) ? wp_kses_post( '<div class="spf-section-title"><h3>' . $section_icon . $section_title . '</h3></div>' ) : '';
306
 
307
  if ( ! empty( $section['fields'] ) ) {
308
 
317
  }
318
  } else {
319
 
320
+ echo '<div class="spf-no-option spf-text-muted">' . esc_html__( 'No option provided by developer.', 'wp-carousel-free' ) . '</div>';
321
 
322
  }
323
 
334
 
335
  echo '<div class=" spf-metabox-restore">';
336
  echo '<label>';
337
+ echo '<input type="checkbox" name="' . esc_attr( $this->unique ) . '[_restore]" />';
338
  echo '<span class="button spf-button-restore">' . esc_html__( 'Restore', 'wp-carousel-free' ) . '</span>';
339
  echo '<span class="button spf-button-cancel">' . sprintf( '<small>( %s )</small> %s', esc_html__( 'update post for restore ', 'wp-carousel-free' ), esc_html__( 'Cancel', 'wp-carousel-free' ) ) . '</span>';
340
  echo '</label>';
354
 
355
  }
356
 
357
+ /**
358
+ * Save metabox.
359
+ *
360
+ * @param mixed $post_id id.
361
+ * @param mixed $post post.
362
+ * @return void
363
+ */
364
  public function save_meta_box( $post_id, $post ) {
365
 
366
  if ( wp_verify_nonce( spf_get_var( 'spf_metabox_nonce' ), 'spf_metabox_nonce' ) ) {
370
 
371
  if ( ! empty( $request ) ) {
372
 
373
+ // ignore _nonce.
374
  if ( isset( $request['_nonce'] ) ) {
375
  unset( $request['_nonce'] );
376
  }
377
 
378
+ // sanitize and validate.
379
  $section_key = 1;
380
  foreach ( $this->sections as $section ) {
381
 
385
 
386
  if ( ! empty( $field['id'] ) ) {
387
 
388
+ // sanitize.
389
  if ( ! empty( $field['sanitize'] ) ) {
390
+ $sanitize = $field['sanitize'];
391
+ $value_sanitize = isset( $request[ $field['id'] ] ) ? $request[ $field['id'] ] : '';
392
+ $request[ $field['id'] ] = call_user_func( $sanitize, $value_sanitize );
 
 
393
  }
394
 
395
+ // Validate.
396
  if ( ! empty( $field['validate'] ) ) {
397
+ $validate = $field['validate'];
398
+ $value_validate = isset( $request[ $field['id'] ] ) ? $request[ $field['id'] ] : '';
399
+ $has_validated = call_user_func( $validate, $value_validate );
 
400
 
401
  if ( ! empty( $has_validated ) ) {
402
 
407
  }
408
  }
409
 
410
+ // Auto sanitize.
411
  if ( ! isset( $request[ $field['id'] ] ) || is_null( $request[ $field['id'] ] ) ) {
412
  $request[ $field['id'] ] = '';
413
  }
424
 
425
  if ( empty( $request ) || ! empty( $request['_restore'] ) ) {
426
 
427
+ if ( 'serialize' !== $this->args['data_type'] ) {
428
  foreach ( $request as $key => $value ) {
429
  delete_post_meta( $post_id, $key );
430
  }
433
  }
434
  } else {
435
 
436
+ if ( 'serialize' !== $this->args['data_type'] ) {
437
  foreach ( $request as $key => $value ) {
438
  update_post_meta( $post_id, $key, $value );
439
  }
admin/views/wpcfree-metabox/classes/options.class.php CHANGED
@@ -10,20 +10,68 @@
10
  if ( ! class_exists( 'SP_WPCF_Options' ) ) {
11
  class SP_WPCF_Options extends SP_WPCF_Abstract {
12
 
13
- // constants.
14
- public $unique = '';
15
- public $notice = '';
16
- public $abstract = 'options';
17
- public $sections = array();
18
- public $options = array();
19
- public $errors = array();
20
- public $pre_tabs = array();
21
- public $pre_fields = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  public $pre_sections = array();
23
 
24
- // default args.
 
 
 
 
25
  public $args = array(
26
-
27
  // framework title.
28
  'framework_title' => 'ShapedPlugin',
29
  'framework_class' => '',
@@ -85,7 +133,13 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
85
 
86
  );
87
 
88
- // run framework construct.
 
 
 
 
 
 
89
  public function __construct( $key, $params = array() ) {
90
 
91
  $this->unique = $key;
@@ -109,16 +163,28 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
109
  add_action( 'network_admin_menu', array( &$this, 'add_admin_menu' ) );
110
  }
111
 
112
- // wp enqeueu for typography and output css.
113
  parent::__construct();
114
 
115
  }
116
 
117
- // instance.
 
 
 
 
 
 
118
  public static function instance( $key, $params = array() ) {
119
  return new self( $key, $params );
120
  }
121
 
 
 
 
 
 
 
122
  public function pre_tabs( $sections ) {
123
 
124
  $result = array();
@@ -146,6 +212,12 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
146
  return wp_list_sort( $result, array( 'priority' => 'ASC' ), 'ASC', true );
147
  }
148
 
 
 
 
 
 
 
149
  public function pre_fields( $sections ) {
150
 
151
  $result = array();
@@ -161,6 +233,12 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
161
  return $result;
162
  }
163
 
 
 
 
 
 
 
164
  public function pre_sections( $sections ) {
165
 
166
  $result = array();
@@ -179,7 +257,12 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
179
  return $result;
180
  }
181
 
182
- // add admin bar menu.
 
 
 
 
 
183
  public function add_admin_bar_menu( $wp_admin_bar ) {
184
 
185
  if ( ! empty( $this->args['show_bar_menu'] ) && empty( $this->args['menu_hidden'] ) ) {
@@ -224,13 +307,18 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
224
 
225
  }
226
 
 
 
 
 
 
227
  public function ajax_save() {
228
 
229
  if ( ! empty( $_POST['data'] ) ) {
230
 
231
- $_POST = json_decode( stripslashes( $_POST['data'] ), true );
232
 
233
- if ( ! empty( $_POST['spf_options_nonce'] ) && wp_verify_nonce( $_POST['spf_options_nonce'], 'spf_options_nonce' ) ) {
234
 
235
  $this->set_options();
236
 
@@ -257,7 +345,13 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
257
 
258
  }
259
 
260
- // get default value
 
 
 
 
 
 
261
  public function get_default( $field, $options = array() ) {
262
 
263
  $default = ( isset( $this->args['defaults'][ $field['id'] ] ) ) ? $this->args['defaults'][ $field['id'] ] : '';
@@ -268,7 +362,11 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
268
 
269
  }
270
 
271
- // save defaults and set new fields value to main options.
 
 
 
 
272
  public function save_defaults() {
273
 
274
  $tmp_options = $this->options;
@@ -285,7 +383,11 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
285
 
286
  }
287
 
288
- // set options.
 
 
 
 
289
  public function set_options() {
290
 
291
  if ( wp_verify_nonce( spf_get_var( 'spf_options_nonce' ), 'spf_options_nonce' ) ) {
@@ -294,7 +396,7 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
294
  $transient = spf_get_var( 'spf_transient' );
295
  $section_id = ( ! empty( $transient['section'] ) ) ? $transient['section'] : '';
296
 
297
- // import data.
298
  if ( ! empty( $transient['spf_import_data'] ) ) {
299
 
300
  $import_data = json_decode( stripslashes( trim( $transient['spf_import_data'] ) ), true );
@@ -327,7 +429,7 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
327
 
328
  } else {
329
 
330
- // sanitize and validate.
331
  foreach ( $this->pre_fields as $field ) {
332
 
333
  if ( ! empty( $field['id'] ) ) {
@@ -386,14 +488,19 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
386
 
387
  }
388
 
389
- // save options database.
 
 
 
 
 
390
  public function save_options( $request ) {
391
 
392
- if ( $this->args['database'] === 'transient' ) {
393
  set_transient( $this->unique, $request, $this->args['transient_time'] );
394
- } elseif ( $this->args['database'] === 'theme_mod' ) {
395
  set_theme_mod( $this->unique, $request );
396
- } elseif ( $this->args['database'] === 'network' ) {
397
  update_site_option( $this->unique, $request );
398
  } else {
399
  update_option( $this->unique, $request );
@@ -403,14 +510,18 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
403
 
404
  }
405
 
406
- // get options from database.
 
 
 
 
407
  public function get_options() {
408
 
409
- if ( $this->args['database'] === 'transient' ) {
410
  $this->options = get_transient( $this->unique );
411
- } elseif ( $this->args['database'] === 'theme_mod' ) {
412
  $this->options = get_theme_mod( $this->unique );
413
- } elseif ( $this->args['database'] === 'network' ) {
414
  $this->options = get_site_option( $this->unique );
415
  } else {
416
  $this->options = get_option( $this->unique );
@@ -424,12 +535,16 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
424
 
425
  }
426
 
427
- // wp api: admin menu.
 
 
 
 
428
  public function add_admin_menu() {
429
 
430
- extract( $this->args );
431
 
432
- if ( $menu_type === 'submenu' ) {
433
 
434
  $menu_page = call_user_func( 'add_submenu_page', $menu_parent, $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'add_options_html' ) );
435
 
@@ -439,7 +554,7 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
439
 
440
  if ( ! empty( $this->args['show_sub_menu'] ) && count( $this->pre_tabs ) > 1 ) {
441
 
442
- // create submenus.
443
  $tab_key = 1;
444
  foreach ( $this->pre_tabs as $section ) {
445
 
@@ -466,6 +581,11 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
466
 
467
  }
468
 
 
 
 
 
 
469
  public function add_page_on_load() {
470
 
471
  if ( ! empty( $this->args['contextual_help'] ) ) {
@@ -483,6 +603,13 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
483
 
484
  }
485
 
 
 
 
 
 
 
 
486
  public function error_check( $sections, $err = '' ) {
487
 
488
  if ( ! $this->args['ajax_save'] ) {
@@ -491,7 +618,7 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
491
  foreach ( $sections['fields'] as $field ) {
492
  if ( ! empty( $field['id'] ) ) {
493
  if ( array_key_exists( $field['id'], $this->errors ) ) {
494
- $err = '<span class="spf-label-error">!</span>';
495
  }
496
  }
497
  }
@@ -524,20 +651,19 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
524
  $ajax_class = ( $this->args['ajax_save'] ) ? ' spf-save-ajax' : '';
525
  $sticky_class = ( $this->args['sticky_header'] ) ? ' spf-sticky-header' : '';
526
  $wrapper_class = ( $this->args['framework_class'] ) ? ' ' . $this->args['framework_class'] : '';
527
- // echo '<div class="wrap"><h1>' . $this->args['menu_title'] . '</h1></div>';
528
- echo '<div class="spf spf-theme-' . $this->args['theme'] . ' spf-options' . $wrapper_class . '" data-slug="' . $this->args['menu_slug'] . '" data-unique="' . $this->unique . '">';
529
 
530
  $notice_class = ( ! empty( $this->notice ) ) ? ' spf-form-show' : '';
531
  $notice_text = ( ! empty( $this->notice ) ) ? $this->notice : '';
532
 
533
- echo '<div class="spf-form-result spf-form-success' . $notice_class . '">' . $notice_text . '</div>';
534
 
535
  $error_class = ( ! empty( $this->errors ) ) ? ' spf-form-show' : '';
536
 
537
- echo '<div class="spf-form-result spf-form-error' . $error_class . '">';
538
  if ( ! empty( $this->errors ) ) {
539
  foreach ( $this->errors as $error ) {
540
- echo '<i class="spf-label-error">!</i> ' . $error . '<br />';
541
  }
542
  }
543
  echo '</div>';
@@ -547,16 +673,16 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
547
  echo '<form method="post" action="" enctype="multipart/form-data" id="spf-form">';
548
 
549
  echo '<input type="hidden" class="spf-section-id" name="spf_transient[section]" value="1">';
550
- wp_nonce_field( 'spf_options_nonce', 'spf_options_nonce');
551
 
552
  echo '<div class="spf-header' . esc_attr( $sticky_class ) . '">';
553
  echo '<div class="spf-header-inner">';
554
 
555
  echo '<div class="spf-header-left">';
556
  if ( $show_buttons ) {
557
- 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>';
558
  } else {
559
- echo '<h1 class="export-import"><img src="' . WPCAROUSELF_URL . 'admin/img/import-export.svg">' . $this->args['framework_title'] . '</h1>';
560
  }
561
  echo '</div>';
562
 
@@ -567,7 +693,7 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
567
  echo ( $this->args['show_search'] ) ? '<div class="spf-search"><input type="text" placeholder="' . esc_html__( 'Search option(s)', 'wp-carousel-free' ) . '" /></div>' : '';
568
  if ( $show_buttons ) {
569
  echo '<div class="spf-buttons">';
570
- echo '<input type="submit" name="' . $this->unique . '[_nonce][save]" class="button button-primary spf-save' . $ajax_class . '" value="' . esc_html__( 'Save', 'wp-carousel-free' ) . '" data-save="' . esc_html__( 'Saving...', 'wp-carousel-free' ) . '">';
571
  echo ( $this->args['show_reset_section'] ) ? '<input type="submit" name="spf_transient[reset_section]" class="button button-secondary spf-reset-section spf-confirm" value="' . esc_html__( 'Reset Section', 'wp-carousel-free' ) . '" data-confirm="' . esc_html__( 'Are you sure to reset this section options?', 'wp-carousel-free' ) . '">' : '';
572
  echo ( $this->args['show_reset_all'] ) ? '<input type="submit" name="spf_transient[reset]" class="button button-secondary spf-reset-all spf-confirm" value="' . esc_html__( 'Reset All', 'wp-carousel-free' ) . '" data-confirm="' . esc_html__( 'Are you sure to reset all options?', 'wp-carousel-free' ) . '">' : '';
573
  echo '</div>';
@@ -578,7 +704,7 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
578
  echo '</div>';
579
  echo '</div>';
580
 
581
- echo '<div class="spf-wrapper' . $show_all . '">';
582
 
583
  if ( $has_nav ) {
584
  echo '<div class="spf-nav spf-nav-options">';
@@ -590,13 +716,13 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
590
  foreach ( $this->pre_tabs as $tab ) {
591
 
592
  $tab_error = $this->error_check( $tab );
593
- $tab_icon = ( ! empty( $tab['icon'] ) ) ? '<i class="' . $tab['icon'] . '"></i>' : '';
594
 
595
  if ( ! empty( $tab['subs'] ) ) {
596
 
597
  echo '<li class="spf-tab-depth-0">';
598
 
599
- echo '<a href="#tab=' . $tab_key . '" class="spf-arrow">' . $tab_icon . $tab['title'] . $tab_error . '</a>';
600
 
601
  echo '<ul>';
602
 
@@ -605,7 +731,7 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
605
  $sub_error = $this->error_check( $sub );
606
  $sub_icon = ( ! empty( $sub['icon'] ) ) ? '<i class="' . $sub['icon'] . '"></i>' : '';
607
 
608
- echo '<li class="spf-tab-depth-1"><a id="spf-tab-link-' . $tab_key . '" href="#tab=' . $tab_key . '">' . $sub_icon . $sub['title'] . $sub_error . '</a></li>';
609
 
610
  $tab_key++;
611
  }
@@ -616,7 +742,7 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
616
 
617
  } else {
618
 
619
- echo '<li class="spf-tab-depth-0"><a id="spf-tab-link-' . $tab_key . '" href="#tab=' . $tab_key . '">' . $tab_icon . $tab['title'] . $tab_error . '</a></li>';
620
 
621
  $tab_key++;
622
  }
@@ -639,9 +765,9 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
639
  $onload = ( ! $has_nav ) ? ' spf-onload' : '';
640
  $section_icon = ( ! empty( $section['icon'] ) ) ? '<i class="spf-icon ' . $section['icon'] . '"></i>' : '';
641
 
642
- echo '<div id="spf-section-' . $section_key . '" class="spf-section' . $onload . '">';
643
- echo ( $has_nav ) ? '<div class="spf-section-title"><h3>' . $section_icon . $section['title'] . '</h3></div>' : '';
644
- echo ( ! empty( $section['description'] ) ) ? '<div class="spf-field spf-section-description">' . $section['description'] . '</div>' : '';
645
 
646
  if ( ! empty( $section['fields'] ) ) {
647
 
@@ -685,7 +811,7 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
685
 
686
  echo '<div class="clear"></div>';
687
 
688
- echo ( ! empty( $this->args['footer_after'] ) ) ? $this->args['footer_after'] : '';
689
 
690
  echo '</div>';
691
 
10
  if ( ! class_exists( 'SP_WPCF_Options' ) ) {
11
  class SP_WPCF_Options extends SP_WPCF_Abstract {
12
 
13
+ // Constants.
14
+ /**
15
+ * Unique
16
+ *
17
+ * @var string
18
+ */
19
+ public $unique = '';
20
+ /**
21
+ * Notice
22
+ *
23
+ * @var string
24
+ */
25
+ public $notice = '';
26
+ /**
27
+ * Abstract
28
+ *
29
+ * @var string
30
+ */
31
+ public $abstract = 'options';
32
+ /**
33
+ * Sections
34
+ *
35
+ * @var array
36
+ */
37
+ public $sections = array();
38
+ /**
39
+ * Options
40
+ *
41
+ * @var array
42
+ */
43
+ public $options = array();
44
+ /**
45
+ * Errors
46
+ *
47
+ * @var array
48
+ */
49
+ public $errors = array();
50
+ /**
51
+ * Pre_tabs
52
+ *
53
+ * @var array
54
+ */
55
+ public $pre_tabs = array();
56
+ /**
57
+ * Pre_fields
58
+ *
59
+ * @var array
60
+ */
61
+ public $pre_fields = array();
62
+ /**
63
+ * Pre_sections
64
+ *
65
+ * @var array
66
+ */
67
  public $pre_sections = array();
68
 
69
+ /**
70
+ * Default args.
71
+ *
72
+ * @var array
73
+ */
74
  public $args = array(
 
75
  // framework title.
76
  'framework_title' => 'ShapedPlugin',
77
  'framework_class' => '',
133
 
134
  );
135
 
136
+ /**
137
+ * Run framework construct.
138
+ *
139
+ * @param mixed $key key.
140
+ * @param mixed $params params.
141
+ * @return void
142
+ */
143
  public function __construct( $key, $params = array() ) {
144
 
145
  $this->unique = $key;
163
  add_action( 'network_admin_menu', array( &$this, 'add_admin_menu' ) );
164
  }
165
 
166
+ // wp enqueue for typography and output css.
167
  parent::__construct();
168
 
169
  }
170
 
171
+ /**
172
+ * Instance
173
+ *
174
+ * @param mixed $key key.
175
+ * @param mixed $params params.
176
+ * @return statement
177
+ */
178
  public static function instance( $key, $params = array() ) {
179
  return new self( $key, $params );
180
  }
181
 
182
+ /**
183
+ * Pre_tabs
184
+ *
185
+ * @param array $sections sections.
186
+ * @return array
187
+ */
188
  public function pre_tabs( $sections ) {
189
 
190
  $result = array();
212
  return wp_list_sort( $result, array( 'priority' => 'ASC' ), 'ASC', true );
213
  }
214
 
215
+ /**
216
+ * Pre_fields
217
+ *
218
+ * @param mixed $sections sections.
219
+ * @return array
220
+ */
221
  public function pre_fields( $sections ) {
222
 
223
  $result = array();
233
  return $result;
234
  }
235
 
236
+ /**
237
+ * Pre_sections
238
+ *
239
+ * @param mixed $sections section.
240
+ * @return array
241
+ */
242
  public function pre_sections( $sections ) {
243
 
244
  $result = array();
257
  return $result;
258
  }
259
 
260
+ /**
261
+ * Add admin bar menu.
262
+ *
263
+ * @param object $wp_admin_bar admin bar.
264
+ * @return void
265
+ */
266
  public function add_admin_bar_menu( $wp_admin_bar ) {
267
 
268
  if ( ! empty( $this->args['show_bar_menu'] ) && empty( $this->args['menu_hidden'] ) ) {
307
 
308
  }
309
 
310
+ /**
311
+ * Ajax_save
312
+ *
313
+ * @return void
314
+ */
315
  public function ajax_save() {
316
 
317
  if ( ! empty( $_POST['data'] ) ) {
318
 
319
+ $_POST = json_decode( stripslashes( $_POST['data'] ), true ); // phpcs:ignore
320
 
321
+ if ( ! empty( $_POST['spf_options_nonce'] ) && wp_verify_nonce( wp_unslash( $_POST['spf_options_nonce'] ), 'spf_options_nonce' ) ) { // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
322
 
323
  $this->set_options();
324
 
345
 
346
  }
347
 
348
+ /**
349
+ * Get default value
350
+ *
351
+ * @param mixed $field field.
352
+ * @param array $options options.
353
+ * @return mixed
354
+ */
355
  public function get_default( $field, $options = array() ) {
356
 
357
  $default = ( isset( $this->args['defaults'][ $field['id'] ] ) ) ? $this->args['defaults'][ $field['id'] ] : '';
362
 
363
  }
364
 
365
+ /**
366
+ * Save defaults and set new fields value to main options.
367
+ *
368
+ * @return void
369
+ */
370
  public function save_defaults() {
371
 
372
  $tmp_options = $this->options;
383
 
384
  }
385
 
386
+ /**
387
+ * Set options.
388
+ *
389
+ * @return bool
390
+ */
391
  public function set_options() {
392
 
393
  if ( wp_verify_nonce( spf_get_var( 'spf_options_nonce' ), 'spf_options_nonce' ) ) {
396
  $transient = spf_get_var( 'spf_transient' );
397
  $section_id = ( ! empty( $transient['section'] ) ) ? $transient['section'] : '';
398
 
399
+ // Import data.
400
  if ( ! empty( $transient['spf_import_data'] ) ) {
401
 
402
  $import_data = json_decode( stripslashes( trim( $transient['spf_import_data'] ) ), true );
429
 
430
  } else {
431
 
432
+ // Sanitize and validate.
433
  foreach ( $this->pre_fields as $field ) {
434
 
435
  if ( ! empty( $field['id'] ) ) {
488
 
489
  }
490
 
491
+ /**
492
+ * Save options database.
493
+ *
494
+ * @param mixed $request Request.
495
+ * @return void
496
+ */
497
  public function save_options( $request ) {
498
 
499
+ if ( 'transient' === $this->args['database'] ) {
500
  set_transient( $this->unique, $request, $this->args['transient_time'] );
501
+ } elseif ( 'theme_mod' === $this->args['database'] ) {
502
  set_theme_mod( $this->unique, $request );
503
+ } elseif ( 'network' === $this->args['database'] ) {
504
  update_site_option( $this->unique, $request );
505
  } else {
506
  update_option( $this->unique, $request );
510
 
511
  }
512
 
513
+ /**
514
+ * Get options from database.
515
+ *
516
+ * @return mixed
517
+ */
518
  public function get_options() {
519
 
520
+ if ( 'transient' === $this->args['database'] ) {
521
  $this->options = get_transient( $this->unique );
522
+ } elseif ( 'theme_mod' === $this->args['database'] ) {
523
  $this->options = get_theme_mod( $this->unique );
524
+ } elseif ( 'network' === $this->args['database'] ) {
525
  $this->options = get_site_option( $this->unique );
526
  } else {
527
  $this->options = get_option( $this->unique );
535
 
536
  }
537
 
538
+ /**
539
+ * Wp api: admin menu.
540
+ *
541
+ * @return void
542
+ */
543
  public function add_admin_menu() {
544
 
545
+ extract( $this->args ); // @codingStandardsIgnoreLine
546
 
547
+ if ( 'submenu' === $menu_type ) {
548
 
549
  $menu_page = call_user_func( 'add_submenu_page', $menu_parent, $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'add_options_html' ) );
550
 
554
 
555
  if ( ! empty( $this->args['show_sub_menu'] ) && count( $this->pre_tabs ) > 1 ) {
556
 
557
+ // Create sub menus.
558
  $tab_key = 1;
559
  foreach ( $this->pre_tabs as $section ) {
560
 
581
 
582
  }
583
 
584
+ /**
585
+ * Add_page_on_load
586
+ *
587
+ * @return void
588
+ */
589
  public function add_page_on_load() {
590
 
591
  if ( ! empty( $this->args['contextual_help'] ) ) {
603
 
604
  }
605
 
606
+ /**
607
+ * Error check
608
+ *
609
+ * @param mixed $sections Sections.
610
+ * @param mixed $err error.
611
+ * @return statement
612
+ */
613
  public function error_check( $sections, $err = '' ) {
614
 
615
  if ( ! $this->args['ajax_save'] ) {
618
  foreach ( $sections['fields'] as $field ) {
619
  if ( ! empty( $field['id'] ) ) {
620
  if ( array_key_exists( $field['id'], $this->errors ) ) {
621
+ $err = '<span class="spf-label-error">!</span>';
622
  }
623
  }
624
  }
651
  $ajax_class = ( $this->args['ajax_save'] ) ? ' spf-save-ajax' : '';
652
  $sticky_class = ( $this->args['sticky_header'] ) ? ' spf-sticky-header' : '';
653
  $wrapper_class = ( $this->args['framework_class'] ) ? ' ' . $this->args['framework_class'] : '';
654
+ echo '<div class="spf spf-theme-' . esc_attr( $this->args['theme'] ) . ' spf-options' . esc_attr( $wrapper_class ) . '" data-slug="' . esc_attr( $this->args['menu_slug'] ) . '" data-unique="' . esc_attr( $this->unique ) . '">';
 
655
 
656
  $notice_class = ( ! empty( $this->notice ) ) ? ' spf-form-show' : '';
657
  $notice_text = ( ! empty( $this->notice ) ) ? $this->notice : '';
658
 
659
+ echo '<div class="spf-form-result spf-form-success' . esc_attr( $notice_class ) . '">' . wp_kses_post( $notice_text ) . '</div>';
660
 
661
  $error_class = ( ! empty( $this->errors ) ) ? ' spf-form-show' : '';
662
 
663
+ echo '<div class="spf-form-result spf-form-error' . esc_attr( $error_class ) . '">';
664
  if ( ! empty( $this->errors ) ) {
665
  foreach ( $this->errors as $error ) {
666
+ echo '<i class="spf-label-error">!</i> ' . wp_kses_post( $error ) . '<br />';
667
  }
668
  }
669
  echo '</div>';
673
  echo '<form method="post" action="" enctype="multipart/form-data" id="spf-form">';
674
 
675
  echo '<input type="hidden" class="spf-section-id" name="spf_transient[section]" value="1">';
676
+ wp_nonce_field( 'spf_options_nonce', 'spf_options_nonce' );
677
 
678
  echo '<div class="spf-header' . esc_attr( $sticky_class ) . '">';
679
  echo '<div class="spf-header-inner">';
680
 
681
  echo '<div class="spf-header-left">';
682
  if ( $show_buttons ) {
683
+ 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>' . wp_kses_post( $this->args['framework_title'] ) . '</h1>';
684
  } else {
685
+ echo '<h1 class="export-import"><img src="' . esc_url( WPCAROUSELF_URL ) . 'admin/img/import-export.svg">' . wp_kses_post( $this->args['framework_title'] ) . '</h1>';
686
  }
687
  echo '</div>';
688
 
693
  echo ( $this->args['show_search'] ) ? '<div class="spf-search"><input type="text" placeholder="' . esc_html__( 'Search option(s)', 'wp-carousel-free' ) . '" /></div>' : '';
694
  if ( $show_buttons ) {
695
  echo '<div class="spf-buttons">';
696
+ echo '<input type="submit" name="' . esc_attr( $this->unique ) . '[_nonce][save]" class="button button-primary spf-save' . esc_attr( $ajax_class ) . '" value="' . esc_html__( 'Save', 'wp-carousel-free' ) . '" data-save="' . esc_html__( 'Saving...', 'wp-carousel-free' ) . '">';
697
  echo ( $this->args['show_reset_section'] ) ? '<input type="submit" name="spf_transient[reset_section]" class="button button-secondary spf-reset-section spf-confirm" value="' . esc_html__( 'Reset Section', 'wp-carousel-free' ) . '" data-confirm="' . esc_html__( 'Are you sure to reset this section options?', 'wp-carousel-free' ) . '">' : '';
698
  echo ( $this->args['show_reset_all'] ) ? '<input type="submit" name="spf_transient[reset]" class="button button-secondary spf-reset-all spf-confirm" value="' . esc_html__( 'Reset All', 'wp-carousel-free' ) . '" data-confirm="' . esc_html__( 'Are you sure to reset all options?', 'wp-carousel-free' ) . '">' : '';
699
  echo '</div>';
704
  echo '</div>';
705
  echo '</div>';
706
 
707
+ echo '<div class="spf-wrapper' . esc_attr( $show_all ) . '">';
708
 
709
  if ( $has_nav ) {
710
  echo '<div class="spf-nav spf-nav-options">';
716
  foreach ( $this->pre_tabs as $tab ) {
717
 
718
  $tab_error = $this->error_check( $tab );
719
+ $tab_icon = ( ! empty( $tab['icon'] ) ) ? '<i class="' . esc_attr( $tab['icon'] ) . '"></i>' : '';
720
 
721
  if ( ! empty( $tab['subs'] ) ) {
722
 
723
  echo '<li class="spf-tab-depth-0">';
724
 
725
+ echo '<a href="#tab=' . esc_attr( $tab_key ) . '" class="spf-arrow">' . wp_kses_post( $tab_icon . $tab['title'] . $tab_error ) . '</a>';
726
 
727
  echo '<ul>';
728
 
731
  $sub_error = $this->error_check( $sub );
732
  $sub_icon = ( ! empty( $sub['icon'] ) ) ? '<i class="' . $sub['icon'] . '"></i>' : '';
733
 
734
+ echo '<li class="spf-tab-depth-1"><a id="spf-tab-link-' . esc_attr( $tab_key ) . '" href="#tab=' . esc_attr( $tab_key ) . '">' . wp_kses_post( $sub_icon . $sub['title'] . $sub_error ) . '</a></li>';
735
 
736
  $tab_key++;
737
  }
742
 
743
  } else {
744
 
745
+ echo '<li class="spf-tab-depth-0"><a id="spf-tab-link-' . esc_attr( $tab_key ) . '" href="#tab=' . esc_attr( $tab_key ) . '">' . wp_kses_post( $tab_icon . $tab['title'] . $tab_error ) . '</a></li>';
746
 
747
  $tab_key++;
748
  }
765
  $onload = ( ! $has_nav ) ? ' spf-onload' : '';
766
  $section_icon = ( ! empty( $section['icon'] ) ) ? '<i class="spf-icon ' . $section['icon'] . '"></i>' : '';
767
 
768
+ echo '<div id="spf-section-' . esc_attr( $section_key ) . '" class="spf-section' . esc_attr( $onload ) . '">';
769
+ echo ( $has_nav ) ? '<div class="spf-section-title"><h3>' . wp_kses_post( $section_icon . $section['title'] ) . '</h3></div>' : '';
770
+ echo ( ! empty( $section['description'] ) ) ? '<div class="spf-field spf-section-description">' . wp_kses_post( $section['description'] ) . '</div>' : '';
771
 
772
  if ( ! empty( $section['fields'] ) ) {
773
 
811
 
812
  echo '<div class="clear"></div>';
813
 
814
+ echo ( ! empty( $this->args['footer_after'] ) ) ? wp_kses_post( $this->args['footer_after'] ) : '';
815
 
816
  echo '</div>';
817
 
admin/views/wpcfree-metabox/classes/setup.class.php CHANGED
@@ -1,39 +1,78 @@
1
  <?php if ( ! defined( 'ABSPATH' ) ) {
2
  die; } // Cannot access directly.
3
- /**
4
- *
5
- * Setup Class
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
  if ( ! class_exists( 'SP_WPCF' ) ) {
 
 
 
 
 
 
 
 
11
  class SP_WPCF {
12
 
13
  /**
14
- * Constants.
15
  *
16
  * @var string
17
  */
18
  public static $version = '2.0.6';
 
 
 
 
 
19
  public static $premium = true;
20
- public static $dir = null;
21
- public static $url = null;
22
- public static $inited = array();
23
- public static $fields = array();
24
- public static $args = array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  'options' => array(),
26
  'customize_options' => array(),
27
  'metaboxes' => array(),
28
  'shortcoders' => array(),
29
- 'taxonomy_options' => array(),
30
  'widgets' => array(),
31
  );
32
 
33
- // shortcode instances.
 
 
 
 
34
  public static $shortcode_instances = array();
35
 
36
- // init.
 
 
 
 
37
  public static function init() {
38
 
39
  // init action.
@@ -52,9 +91,12 @@ if ( ! class_exists( 'SP_WPCF' ) ) {
52
 
53
  }
54
 
55
- // setup.
 
 
 
 
56
  public static function setup() {
57
-
58
  // setup options.
59
  $params = array();
60
  if ( ! empty( self::$args['options'] ) ) {
@@ -90,43 +132,49 @@ if ( ! class_exists( 'SP_WPCF' ) ) {
90
  }
91
  }
92
 
93
- // setup taxonomy options.
94
- $params = array();
95
- if ( ! empty( self::$args['taxonomy_options'] ) ) {
96
- foreach ( self::$args['taxonomy_options'] as $key => $value ) {
97
- if ( ! empty( self::$args['sections'][ $key ] ) && ! isset( self::$inited[ $key ] ) ) {
98
-
99
- $params['args'] = $value;
100
- $params['sections'] = self::$args['sections'][ $key ];
101
- self::$inited[ $key ] = true;
102
-
103
- SP_WPCF_Taxonomy_Options::instance( $key, $params );
104
-
105
- }
106
- }
107
- }
108
-
109
  do_action( 'spf_loaded' );
110
 
111
  }
112
 
113
- // create options.
 
 
 
 
 
 
114
  public static function createOptions( $id, $args = array() ) {
115
  self::$args['options'][ $id ] = $args;
116
  }
117
 
118
- // create metabox options.
 
 
 
 
 
 
119
  public static function createMetabox( $id, $args = array() ) {
120
  self::$args['metaboxes'][ $id ] = $args;
121
  }
122
 
123
- // create section.
 
 
 
 
 
 
124
  public static function createSection( $id, $sections ) {
125
  self::$args['sections'][ $id ][] = $sections;
126
  self::set_used_fields( $sections );
127
  }
128
 
129
- // constants.
 
 
 
 
130
  public static function constants() {
131
 
132
  // we need this path-finder code for set URL of framework.
@@ -143,8 +191,14 @@ if ( ! class_exists( 'SP_WPCF' ) ) {
143
 
144
  }
145
 
 
 
 
 
 
 
 
146
  public static function include_plugin_file( $file, $load = true ) {
147
-
148
  $path = '';
149
  $file = ltrim( $file, '/' );
150
  $override = apply_filters( 'spf_override', 'spf-override' );
@@ -180,26 +234,46 @@ if ( ! class_exists( 'SP_WPCF' ) ) {
180
 
181
  }
182
 
 
 
 
 
 
 
183
  public static function is_active_plugin( $file = '' ) {
184
  return in_array( $file, (array) get_option( 'active_plugins', array() ) );
185
  }
186
 
187
- // Sanitize dirname.
 
 
 
 
 
188
  public static function sanitize_dirname( $dirname ) {
189
  return preg_replace( '/[^A-Za-z]/', '', $dirname );
190
  }
191
 
192
- // Set plugin url.
 
 
 
 
 
193
  public static function include_plugin_url( $file ) {
194
  return self::$url . '/' . ltrim( $file, '/' );
195
  }
196
 
197
- // General includes.
 
 
 
 
198
  public static function includes() {
199
 
200
  // includes helpers.
201
  self::include_plugin_file( 'functions/actions.php' );
202
- self::include_plugin_file( 'functions/deprecated.php' );
203
  self::include_plugin_file( 'functions/helpers.php' );
204
  self::include_plugin_file( 'functions/sanitize.php' );
205
  self::include_plugin_file( 'functions/validate.php' );
@@ -217,15 +291,24 @@ if ( ! class_exists( 'SP_WPCF' ) ) {
217
 
218
  }
219
 
220
- // Include field.
 
 
 
 
 
221
  public static function maybe_include_field( $type = '' ) {
222
  if ( ! class_exists( 'SP_WPCF_Field_' . $type ) && class_exists( 'SP_WPCF_Fields' ) ) {
223
  self::include_plugin_file( 'fields/' . $type . '/' . $type . '.php' );
224
  }
225
  }
226
 
227
-
228
- // Get all of fields.
 
 
 
 
229
  public static function set_used_fields( $sections ) {
230
 
231
  if ( ! empty( $sections['fields'] ) ) {
@@ -244,32 +327,35 @@ if ( ! class_exists( 'SP_WPCF' ) ) {
244
 
245
  }
246
 
247
- //
248
- // Enqueue admin and fields styles and scripts.
 
 
 
249
  public static function add_admin_enqueue_scripts() {
250
  $current_screen = get_current_screen();
251
  $the_current_post_type = $current_screen->post_type;
252
  if ( 'sp_wp_carousel' === $the_current_post_type ) {
253
 
254
- // check for developer mode
255
  $min = ( apply_filters( 'spf_dev_mode', false ) || WP_DEBUG ) ? '' : '.min';
256
 
257
- // admin utilities.
258
  wp_enqueue_media();
259
 
260
- // wp color picker.
261
  wp_enqueue_style( 'wp-color-picker' );
262
  wp_enqueue_script( 'wp-color-picker' );
263
 
264
- // framework core styles.
265
  wp_enqueue_style( 'spf', WPCAROUSELF_URL . 'admin/views/wpcfree-metabox/assets/css/spf' . $min . '.css', array(), WPCAROUSELF_VERSION, 'all' );
266
 
267
- // rtl styles.
268
  if ( is_rtl() ) {
269
  wp_enqueue_style( 'spf-rtl', WPCAROUSELF_URL . 'admin/views/wpcfree-metabox/assets/css/spf-rtl' . $min . '.css', array(), WPCAROUSELF_VERSION, 'all' );
270
  }
271
 
272
- // framework core scripts.
273
  wp_enqueue_script( 'spf-plugins', WPCAROUSELF_URL . 'admin/views/wpcfree-metabox/assets/js/spf-plugins' . $min . '.js', array(), WPCAROUSELF_VERSION, true );
274
  wp_enqueue_script( 'spf', WPCAROUSELF_URL . 'admin/views/wpcfree-metabox/assets/js/spf' . $min . '.js', array( 'spf-plugins' ), WPCAROUSELF_VERSION, true );
275
 
@@ -310,11 +396,19 @@ if ( ! class_exists( 'SP_WPCF' ) ) {
310
 
311
  }
312
 
313
- //
314
- // Add a new framework field.
 
 
 
 
 
 
 
 
315
  public static function field( $field = array(), $value = '', $unique = '', $where = '', $parent = '' ) {
316
 
317
- // Check for unallow fields.
318
  if ( ! empty( $field['_notice'] ) ) {
319
 
320
  $field_type = $field['type'];
@@ -343,11 +437,11 @@ if ( ! class_exists( 'SP_WPCF' ) ) {
343
 
344
  if ( ! empty( $field_type ) ) {
345
 
346
- echo '<div class="spf-field spf-field-' . $field_type . $is_pseudo . $class . $hidden . '"' . $depend . '>';
347
 
348
  if ( ! empty( $field['title'] ) ) {
349
  $subtitle = ( ! empty( $field['subtitle'] ) ) ? '<p class="spf-text-subtitle">' . $field['subtitle'] . '</p>' : '';
350
- echo '<div class="spf-title"><h4>' . $field['title'] . '</h4>' . $subtitle . '</div>';
351
  }
352
 
353
  echo ( ! empty( $field['title'] ) ) ? '<div class="spf-fieldset">' : '';
1
  <?php if ( ! defined( 'ABSPATH' ) ) {
2
  die; } // Cannot access directly.
3
+
 
 
 
 
 
 
4
  if ( ! class_exists( 'SP_WPCF' ) ) {
5
+
6
+ /**
7
+ *
8
+ * Setup Class
9
+ *
10
+ * @since 1.0.0
11
+ * @version 1.0.0
12
+ */
13
  class SP_WPCF {
14
 
15
  /**
16
+ * Version.
17
  *
18
  * @var string
19
  */
20
  public static $version = '2.0.6';
21
+ /**
22
+ * Premium.
23
+ *
24
+ * @var string
25
+ */
26
  public static $premium = true;
27
+ /**
28
+ * Dir.
29
+ *
30
+ * @var string
31
+ */
32
+ public static $dir = null;
33
+ /**
34
+ * Url.
35
+ *
36
+ * @var string
37
+ */
38
+ public static $url = null;
39
+ /**
40
+ * Init.
41
+ *
42
+ * @var array
43
+ */
44
+ public static $inited = array();
45
+ /**
46
+ * Field.
47
+ *
48
+ * @var array
49
+ */
50
+ public static $fields = array();
51
+ /**
52
+ * Args.
53
+ *
54
+ * @var array
55
+ */
56
+ public static $args = array(
57
  'options' => array(),
58
  'customize_options' => array(),
59
  'metaboxes' => array(),
60
  'shortcoders' => array(),
 
61
  'widgets' => array(),
62
  );
63
 
64
+ /**
65
+ * Shortcode instances.
66
+ *
67
+ * @var array
68
+ */
69
  public static $shortcode_instances = array();
70
 
71
+ /**
72
+ * Init
73
+ *
74
+ * @return void
75
+ */
76
  public static function init() {
77
 
78
  // init action.
91
 
92
  }
93
 
94
+ /**
95
+ * Setup
96
+ *
97
+ * @return void
98
+ */
99
  public static function setup() {
 
100
  // setup options.
101
  $params = array();
102
  if ( ! empty( self::$args['options'] ) ) {
132
  }
133
  }
134
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  do_action( 'spf_loaded' );
136
 
137
  }
138
 
139
+ /**
140
+ * Create Options
141
+ *
142
+ * @param mixed $id ID.
143
+ * @param mixed $args Args.
144
+ * @return void
145
+ */
146
  public static function createOptions( $id, $args = array() ) {
147
  self::$args['options'][ $id ] = $args;
148
  }
149
 
150
+ /**
151
+ * Create metabox options.
152
+ *
153
+ * @param mixed $id ID.
154
+ * @param mixed $args Args.
155
+ * @return void
156
+ */
157
  public static function createMetabox( $id, $args = array() ) {
158
  self::$args['metaboxes'][ $id ] = $args;
159
  }
160
 
161
+ /**
162
+ * Create section.
163
+ *
164
+ * @param mixed $id ID.
165
+ * @param mixed $sections Sections.
166
+ * @return void
167
+ */
168
  public static function createSection( $id, $sections ) {
169
  self::$args['sections'][ $id ][] = $sections;
170
  self::set_used_fields( $sections );
171
  }
172
 
173
+ /**
174
+ * Constants
175
+ *
176
+ * @return void
177
+ */
178
  public static function constants() {
179
 
180
  // we need this path-finder code for set URL of framework.
191
 
192
  }
193
 
194
+ /**
195
+ * Include plugin files
196
+ *
197
+ * @param mixed $file file.
198
+ * @param mixed $load load.
199
+ * @return array
200
+ */
201
  public static function include_plugin_file( $file, $load = true ) {
 
202
  $path = '';
203
  $file = ltrim( $file, '/' );
204
  $override = apply_filters( 'spf_override', 'spf-override' );
234
 
235
  }
236
 
237
+ /**
238
+ * Is active plugin
239
+ *
240
+ * @param mixed $file file.
241
+ * @return statement
242
+ */
243
  public static function is_active_plugin( $file = '' ) {
244
  return in_array( $file, (array) get_option( 'active_plugins', array() ) );
245
  }
246
 
247
+ /**
248
+ * Sanitize dirname.
249
+ *
250
+ * @param mixed $dirname dirname.
251
+ * @return statement
252
+ */
253
  public static function sanitize_dirname( $dirname ) {
254
  return preg_replace( '/[^A-Za-z]/', '', $dirname );
255
  }
256
 
257
+ /**
258
+ * Set plugin url.
259
+ *
260
+ * @param mixed $file file.
261
+ * @return string
262
+ */
263
  public static function include_plugin_url( $file ) {
264
  return self::$url . '/' . ltrim( $file, '/' );
265
  }
266
 
267
+ /**
268
+ * General includes.
269
+ *
270
+ * @return void
271
+ */
272
  public static function includes() {
273
 
274
  // includes helpers.
275
  self::include_plugin_file( 'functions/actions.php' );
276
+ // self::include_plugin_file( 'functions/deprecated.php' );
277
  self::include_plugin_file( 'functions/helpers.php' );
278
  self::include_plugin_file( 'functions/sanitize.php' );
279
  self::include_plugin_file( 'functions/validate.php' );
291
 
292
  }
293
 
294
+ /**
295
+ * Include field.
296
+ *
297
+ * @param mixed $type type.
298
+ * @return void
299
+ */
300
  public static function maybe_include_field( $type = '' ) {
301
  if ( ! class_exists( 'SP_WPCF_Field_' . $type ) && class_exists( 'SP_WPCF_Fields' ) ) {
302
  self::include_plugin_file( 'fields/' . $type . '/' . $type . '.php' );
303
  }
304
  }
305
 
306
+ /**
307
+ * Get all of fields.
308
+ *
309
+ * @param mixed $sections sections.
310
+ * @return void
311
+ */
312
  public static function set_used_fields( $sections ) {
313
 
314
  if ( ! empty( $sections['fields'] ) ) {
327
 
328
  }
329
 
330
+ /**
331
+ * Enqueue admin and fields styles and scripts.
332
+ *
333
+ * @return void
334
+ */
335
  public static function add_admin_enqueue_scripts() {
336
  $current_screen = get_current_screen();
337
  $the_current_post_type = $current_screen->post_type;
338
  if ( 'sp_wp_carousel' === $the_current_post_type ) {
339
 
340
+ // Check for developer mode.
341
  $min = ( apply_filters( 'spf_dev_mode', false ) || WP_DEBUG ) ? '' : '.min';
342
 
343
+ // Admin utilities.
344
  wp_enqueue_media();
345
 
346
+ // WP color picker.
347
  wp_enqueue_style( 'wp-color-picker' );
348
  wp_enqueue_script( 'wp-color-picker' );
349
 
350
+ // Framework core styles.
351
  wp_enqueue_style( 'spf', WPCAROUSELF_URL . 'admin/views/wpcfree-metabox/assets/css/spf' . $min . '.css', array(), WPCAROUSELF_VERSION, 'all' );
352
 
353
+ // Rtl styles.
354
  if ( is_rtl() ) {
355
  wp_enqueue_style( 'spf-rtl', WPCAROUSELF_URL . 'admin/views/wpcfree-metabox/assets/css/spf-rtl' . $min . '.css', array(), WPCAROUSELF_VERSION, 'all' );
356
  }
357
 
358
+ // Framework core scripts.
359
  wp_enqueue_script( 'spf-plugins', WPCAROUSELF_URL . 'admin/views/wpcfree-metabox/assets/js/spf-plugins' . $min . '.js', array(), WPCAROUSELF_VERSION, true );
360
  wp_enqueue_script( 'spf', WPCAROUSELF_URL . 'admin/views/wpcfree-metabox/assets/js/spf' . $min . '.js', array( 'spf-plugins' ), WPCAROUSELF_VERSION, true );
361
 
396
 
397
  }
398
 
399
+ /**
400
+ * Add a new framework field.
401
+ *
402
+ * @param mixed $field Field.
403
+ * @param mixed $value value.
404
+ * @param mixed $unique unique id.
405
+ * @param mixed $where Where.
406
+ * @param mixed $parent parent.
407
+ * @return void
408
+ */
409
  public static function field( $field = array(), $value = '', $unique = '', $where = '', $parent = '' ) {
410
 
411
+ // Check for disallow fields.
412
  if ( ! empty( $field['_notice'] ) ) {
413
 
414
  $field_type = $field['type'];
437
 
438
  if ( ! empty( $field_type ) ) {
439
 
440
+ echo '<div class="spf-field spf-field-' . esc_attr( $field_type ) . esc_attr( $is_pseudo ) . esc_attr( $class ) . esc_attr( $hidden ) . '"' . $depend . '>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
441
 
442
  if ( ! empty( $field['title'] ) ) {
443
  $subtitle = ( ! empty( $field['subtitle'] ) ) ? '<p class="spf-text-subtitle">' . $field['subtitle'] . '</p>' : '';
444
+ echo '<div class="spf-title"><h4>' . wp_kses_post( $field['title'] ) . '</h4>' . wp_kses_post( $subtitle ) . '</div>';
445
  }
446
 
447
  echo ( ! empty( $field['title'] ) ) ? '<div class="spf-fieldset">' : '';
admin/views/wpcfree-metabox/classes/widgets.class.php CHANGED
@@ -10,9 +10,19 @@
10
  if ( ! class_exists( 'SP_WPCF_Widget' ) ) {
11
  class SP_WPCF_Widget extends WP_Widget {
12
 
13
- // constans
 
 
 
 
 
14
  public $unique = '';
15
- public $args = array(
 
 
 
 
 
16
  'title' => '',
17
  'classname' => '',
18
  'description' => '',
@@ -21,6 +31,13 @@ if ( ! class_exists( 'SP_WPCF_Widget' ) ) {
21
  'fields' => array(),
22
  );
23
 
 
 
 
 
 
 
 
24
  public function __construct( $key, $params ) {
25
 
26
  $widget_ops = array();
@@ -29,12 +46,12 @@ if ( ! class_exists( 'SP_WPCF_Widget' ) ) {
29
  $this->unique = $key;
30
  $this->args = apply_filters( "spf_{$this->unique}_args", wp_parse_args( $params, $this->args ), $this );
31
 
32
- // Set control options
33
  if ( ! empty( $this->args['width'] ) ) {
34
  $control_ops['width'] = $this->args['width'];
35
  }
36
 
37
- // Set widget options
38
  if ( ! empty( $this->args['description'] ) ) {
39
  $widget_ops['description'] = $this->args['description'];
40
  }
@@ -43,7 +60,7 @@ if ( ! class_exists( 'SP_WPCF_Widget' ) ) {
43
  $widget_ops['classname'] = $this->args['classname'];
44
  }
45
 
46
- // Set filters
47
  $widget_ops = apply_filters( "spf_{$this->unique}_widget_ops", $widget_ops, $this );
48
  $control_ops = apply_filters( "spf_{$this->unique}_control_ops", $control_ops, $this );
49
 
@@ -51,17 +68,35 @@ if ( ! class_exists( 'SP_WPCF_Widget' ) ) {
51
 
52
  }
53
 
54
- // Register widget with WordPress
 
 
 
 
 
 
55
  public static function instance( $key, $params = array() ) {
56
  return new self( $key, $params );
57
  }
58
 
59
- // Front-end display of widget.
 
 
 
 
 
 
60
  public function widget( $args, $instance ) {
61
  call_user_func( $this->unique, $args, $instance );
62
  }
63
 
64
- // get default value
 
 
 
 
 
 
65
  public function get_default( $field, $options = array() ) {
66
 
67
  $default = ( isset( $this->args['defaults'][ $field['id'] ] ) ) ? $this->args['defaults'][ $field['id'] ] : '';
@@ -72,7 +107,12 @@ if ( ! class_exists( 'SP_WPCF_Widget' ) ) {
72
 
73
  }
74
 
75
- // Back-end widget form.
 
 
 
 
 
76
  public function form( $instance ) {
77
 
78
  if ( ! empty( $this->args['fields'] ) ) {
@@ -89,7 +129,7 @@ if ( ! class_exists( 'SP_WPCF_Widget' ) ) {
89
  $field_value = $this->get_default( $field, $instance );
90
  $field_unique = 'widget-' . $this->unique . '[' . $this->number . ']';
91
 
92
- if ( $field['id'] === 'title' ) {
93
  $field['attributes']['id'] = 'widget-' . $this->unique . '-' . $this->number . '-title';
94
  }
95
  }
@@ -104,7 +144,13 @@ if ( ! class_exists( 'SP_WPCF_Widget' ) ) {
104
 
105
  }
106
 
107
- // Sanitize widget form values as they are saved.
 
 
 
 
 
 
108
  public function update( $new_instance, $old_instance ) {
109
 
110
  $new_instance = apply_filters( "spf_{$this->unique}_save", $new_instance, $this->args, $this );
10
  if ( ! class_exists( 'SP_WPCF_Widget' ) ) {
11
  class SP_WPCF_Widget extends WP_Widget {
12
 
13
+ // Constants.
14
+ /**
15
+ * Unique
16
+ *
17
+ * @var string
18
+ */
19
  public $unique = '';
20
+ /**
21
+ * Args
22
+ *
23
+ * @var array
24
+ */
25
+ public $args = array(
26
  'title' => '',
27
  'classname' => '',
28
  'description' => '',
31
  'fields' => array(),
32
  );
33
 
34
+ /**
35
+ * Widget construct
36
+ *
37
+ * @param mixed $key key.
38
+ * @param mixed $params params.
39
+ * @return void
40
+ */
41
  public function __construct( $key, $params ) {
42
 
43
  $widget_ops = array();
46
  $this->unique = $key;
47
  $this->args = apply_filters( "spf_{$this->unique}_args", wp_parse_args( $params, $this->args ), $this );
48
 
49
+ // Set control options.
50
  if ( ! empty( $this->args['width'] ) ) {
51
  $control_ops['width'] = $this->args['width'];
52
  }
53
 
54
+ // Set widget options.
55
  if ( ! empty( $this->args['description'] ) ) {
56
  $widget_ops['description'] = $this->args['description'];
57
  }
60
  $widget_ops['classname'] = $this->args['classname'];
61
  }
62
 
63
+ // Set filters.
64
  $widget_ops = apply_filters( "spf_{$this->unique}_widget_ops", $widget_ops, $this );
65
  $control_ops = apply_filters( "spf_{$this->unique}_control_ops", $control_ops, $this );
66
 
68
 
69
  }
70
 
71
+ /**
72
+ * Register widget with WordPress.
73
+ *
74
+ * @param mixed $key key.
75
+ * @param mixed $params params.
76
+ * @return array
77
+ */
78
  public static function instance( $key, $params = array() ) {
79
  return new self( $key, $params );
80
  }
81
 
82
+ /**
83
+ * Front-End display of widget.
84
+ *
85
+ * @param array $args args.
86
+ * @param mixed $instance instance.
87
+ * @return void
88
+ */
89
  public function widget( $args, $instance ) {
90
  call_user_func( $this->unique, $args, $instance );
91
  }
92
 
93
+ /**
94
+ * Get default value
95
+ *
96
+ * @param array $field Field.
97
+ * @param array $options options.
98
+ * @return string
99
+ */
100
  public function get_default( $field, $options = array() ) {
101
 
102
  $default = ( isset( $this->args['defaults'][ $field['id'] ] ) ) ? $this->args['defaults'][ $field['id'] ] : '';
107
 
108
  }
109
 
110
+ /**
111
+ * Back-end widget form.
112
+ *
113
+ * @param mixed $instance instance.
114
+ * @return void
115
+ */
116
  public function form( $instance ) {
117
 
118
  if ( ! empty( $this->args['fields'] ) ) {
129
  $field_value = $this->get_default( $field, $instance );
130
  $field_unique = 'widget-' . $this->unique . '[' . $this->number . ']';
131
 
132
+ if ( 'title' === $field['id'] ) {
133
  $field['attributes']['id'] = 'widget-' . $this->unique . '-' . $this->number . '-title';
134
  }
135
  }
144
 
145
  }
146
 
147
+ /**
148
+ * Sanitize widget form values as they are saved.
149
+ *
150
+ * @param mixed $new_instance instance.
151
+ * @param mixed $old_instance instance.
152
+ * @return statement
153
+ */
154
  public function update( $new_instance, $old_instance ) {
155
 
156
  $new_instance = apply_filters( "spf_{$this->unique}_save", $new_instance, $this->args, $this );
admin/views/wpcfree-metabox/fields/backup/backup.php DELETED
@@ -1,42 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
- /**
3
- *
4
- * Field: backup
5
- *
6
- * @since 1.0.0
7
- * @version 1.0.0
8
- *
9
- */
10
- if( ! class_exists( 'SP_WPCF_Field_backup' ) ) {
11
- class SP_WPCF_Field_backup 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
- $unique = $this->unique;
20
- $nonce = wp_create_nonce( 'spf_backup_nonce' );
21
- $export = add_query_arg( array( 'action' => 'spf-export', 'export' => $unique, 'nonce' => $nonce ), admin_url( 'admin-ajax.php' ) );
22
-
23
- echo $this->field_before();
24
-
25
- echo '<textarea name="spf_transient[spf_import_data]" class="spf-import-data"></textarea>';
26
- echo '<button type="submit" class="button button-primary spf-confirm spf-import" data-unique="'. $unique .'" data-nonce="'. $nonce .'">'. esc_html__( 'Import', 'wp-carousel-free' ) .'</button>';
27
- echo '<small>( '. esc_html__( 'copy-paste your backup string here', 'wp-carousel-free' ).' )</small>';
28
-
29
- echo '<hr />';
30
- echo '<textarea readonly="readonly" class="spf-export-data">'. json_encode( get_option( $unique ) ) .'</textarea>';
31
-
32
- echo '<a href="'. esc_url( $export ) .'" class="button button-primary spf-export" target="_blank">'. esc_html__( 'Export and Download Backup', 'wp-carousel-free' ) .'</a>';
33
- echo '<hr />';
34
- echo '<button type="submit" name="spf_transient[spf_reset_all]" value="spf_reset_all" class="button button-primary spf-warning-primary spf-confirm spf-reset" data-unique="'. $unique .'" data-nonce="'. $nonce .'">'. esc_html__( 'Reset All', 'wp-carousel-free' ) .'</button>';
35
- echo '<small class="spf-text-error">'. esc_html__( 'Please be sure for reset all of options.', 'wp-carousel-free' ) .'</small>';
36
-
37
- echo $this->field_after();
38
-
39
- }
40
-
41
- }
42
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/wpcfree-metabox/fields/border/border.php CHANGED
@@ -10,12 +10,25 @@
10
  if ( ! class_exists( 'SP_WPCF_Field_border' ) ) {
11
  class SP_WPCF_Field_border 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(
@@ -68,40 +81,42 @@ if ( ! class_exists( 'SP_WPCF_Field_border' ) ) {
68
 
69
  $value = wp_parse_args( $this->value, $default_value );
70
 
71
- echo $this->field_before();
72
 
73
- $min = ( isset( $args['min'] ) ) ? ' min="' . $args['min'] . '"' : '';
74
 
75
  if ( ! empty( $args['all'] ) ) {
76
 
77
- $placeholder = ( ! empty( $args['all_placeholder'] ) ) ? ' placeholder="' . $args['all_placeholder'] . '"' : '';
78
 
79
  echo '<div class="spf--left spf--input">';
80
- echo ( ! empty( $args['all_icon'] ) ) ? '<span class="spf--label spf--label-icon">' . $args['all_icon'] . '</span>' : '';
81
- echo '<input type="number" name="' . $this->field_name( '[all]' ) . '" value="' . $value['all'] . '"' . $placeholder . $min . ' class="spf-number" />';
82
- echo ( ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--label-unit">' . $args['unit'] . '</span>' : '';
 
 
83
  echo '</div>';
84
 
85
  } else {
86
 
87
  $properties = array();
88
-
89
  foreach ( array( 'top', 'right', 'bottom', 'left' ) as $prop ) {
90
  if ( ! empty( $args[ $prop ] ) ) {
91
  $properties[] = $prop;
92
  }
93
  }
94
-
95
- $properties = ( $properties === array( 'right', 'left' ) ) ? array_reverse( $properties ) : $properties;
96
 
97
  foreach ( $properties as $property ) {
98
 
99
- $placeholder = ( ! empty( $args[ $property . '_placeholder' ] ) ) ? ' placeholder="' . $args[ $property . '_placeholder' ] . '"' : '';
100
 
101
  echo '<div class="spf--left spf--input">';
102
- echo ( ! empty( $args[ $property . '_icon' ] ) ) ? '<span class="spf--label spf--label-icon">' . $args[ $property . '_icon' ] . '</span>' : '';
103
- echo '<input type="number" name="' . $this->field_name( '[' . $property . ']' ) . '" value="' . $value[ $property ] . '"' . $placeholder . $min . ' class="spf-number" />';
104
- echo ( ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--label-unit">' . $args['unit'] . '</span>' : '';
 
 
105
  echo '</div>';
106
 
107
  }
@@ -109,28 +124,33 @@ if ( ! class_exists( 'SP_WPCF_Field_border' ) ) {
109
 
110
  if ( ! empty( $args['style'] ) ) {
111
  echo '<div class="spf--left spf--input">';
112
- echo '<select name="' . $this->field_name( '[style]' ) . '">';
113
  foreach ( $border_props as $border_prop_key => $border_prop_value ) {
114
  $selected = ( $value['style'] === $border_prop_key ) ? ' selected' : '';
115
- echo '<option value="' . $border_prop_key . '"' . $selected . '>' . $border_prop_value . '</option>';
116
  }
117
  echo '</select>';
118
  echo '</div>';
119
  }
120
 
121
  if ( ! empty( $args['color'] ) ) {
122
- $default_color_attr = ( ! empty( $default_value['color'] ) ) ? ' data-default-color="' . $default_value['color'] . '"' : '';
123
  echo '<div class="spf--left spf-field-color">';
124
- echo '<input type="text" name="' . $this->field_name( '[color]' ) . '" value="' . $value['color'] . '" class="spf-color"' . $default_color_attr . ' />';
125
  echo '</div>';
126
  }
127
 
128
  echo '<div class="clear"></div>';
129
 
130
- echo $this->field_after();
131
 
132
  }
133
 
 
 
 
 
 
134
  public function output() {
135
 
136
  $output = '';
@@ -138,32 +158,32 @@ if ( ! class_exists( 'SP_WPCF_Field_border' ) ) {
138
  $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
139
  $element = ( is_array( $this->field['output'] ) ) ? join( ',', $this->field['output'] ) : $this->field['output'];
140
 
141
- // properties
142
- $top = ( isset( $this->value['top'] ) && $this->value['top'] !== '' ) ? $this->value['top'] : '';
143
- $right = ( isset( $this->value['right'] ) && $this->value['right'] !== '' ) ? $this->value['right'] : '';
144
- $bottom = ( isset( $this->value['bottom'] ) && $this->value['bottom'] !== '' ) ? $this->value['bottom'] : '';
145
- $left = ( isset( $this->value['left'] ) && $this->value['left'] !== '' ) ? $this->value['left'] : '';
146
- $style = ( isset( $this->value['style'] ) && $this->value['style'] !== '' ) ? $this->value['style'] : '';
147
- $color = ( isset( $this->value['color'] ) && $this->value['color'] !== '' ) ? $this->value['color'] : '';
148
- $all = ( isset( $this->value['all'] ) && $this->value['all'] !== '' ) ? $this->value['all'] : '';
149
 
150
- if ( ! empty( $this->field['all'] ) && ( $all !== '' || $color !== '' ) ) {
151
 
152
  $output = $element . '{';
153
- $output .= ( $all !== '' ) ? 'border-width:' . $all . $unit . $important . ';' : '';
154
- $output .= ( $color !== '' ) ? 'border-color:' . $color . $important . ';' : '';
155
- $output .= ( $style !== '' ) ? 'border-style:' . $style . $important . ';' : '';
156
  $output .= '}';
157
 
158
- } elseif ( $top !== '' || $right !== '' || $bottom !== '' || $left !== '' || $color !== '' ) {
159
 
160
  $output = $element . '{';
161
- $output .= ( $top !== '' ) ? 'border-top-width:' . $top . $unit . $important . ';' : '';
162
- $output .= ( $right !== '' ) ? 'border-right-width:' . $right . $unit . $important . ';' : '';
163
- $output .= ( $bottom !== '' ) ? 'border-bottom-width:' . $bottom . $unit . $important . ';' : '';
164
- $output .= ( $left !== '' ) ? 'border-left-width:' . $left . $unit . $important . ';' : '';
165
- $output .= ( $color !== '' ) ? 'border-color:' . $color . $important . ';' : '';
166
- $output .= ( $style !== '' ) ? 'border-style:' . $style . $important . ';' : '';
167
  $output .= '}';
168
 
169
  }
10
  if ( ! class_exists( 'SP_WPCF_Field_border' ) ) {
11
  class SP_WPCF_Field_border extends SP_WPCF_Fields {
12
 
13
+ /**
14
+ * Column field constructor.
15
+ *
16
+ * @param array $field The field type.
17
+ * @param string $value The values of the field.
18
+ * @param string $unique The unique ID for the field.
19
+ * @param string $where To where show the output CSS.
20
+ * @param string $parent The parent args.
21
+ */
22
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
23
  parent::__construct( $field, $value, $unique, $where, $parent );
24
  }
25
 
26
+ /**
27
+ * Render field
28
+ *
29
+ * @return void
30
+ */
31
  public function render() {
 
32
  $args = wp_parse_args(
33
  $this->field,
34
  array(
81
 
82
  $value = wp_parse_args( $this->value, $default_value );
83
 
84
+ echo wp_kses_post( $this->field_before() );
85
 
86
+ $min = ( isset( $args['min'] ) ) ? ' min="' . esc_attr( $args['min'] ) . '"' : '';
87
 
88
  if ( ! empty( $args['all'] ) ) {
89
 
90
+ $placeholder = ( ! empty( $args['all_placeholder'] ) ) ? ' placeholder="' . esc_attr( $args['all_placeholder'] ) . '"' : '';
91
 
92
  echo '<div class="spf--left spf--input">';
93
+ echo ( ! empty( $args['all_icon'] ) ) ? wp_kses_post( '<span class="spf--label spf--label-icon">' . $args['all_icon'] . '</span>' ) : '';
94
+ // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
95
+ echo '<input type="number" name="' . esc_attr( $this->field_name( '[all]' ) ) . '" value="' . esc_attr( $value['all'] ) . '"' . $placeholder . $min . ' class="spf-number" />';
96
+
97
+ echo ( ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--label-unit">' . esc_html( $args['unit'] ) . '</span>' : '';
98
  echo '</div>';
99
 
100
  } else {
101
 
102
  $properties = array();
 
103
  foreach ( array( 'top', 'right', 'bottom', 'left' ) as $prop ) {
104
  if ( ! empty( $args[ $prop ] ) ) {
105
  $properties[] = $prop;
106
  }
107
  }
108
+ $properties = ( array( 'right', 'left' ) === $properties ) ? array_reverse( $properties ) : $properties;
 
109
 
110
  foreach ( $properties as $property ) {
111
 
112
+ $placeholder = ( ! empty( $args[ $property . '_placeholder' ] ) ) ? ' placeholder="' . esc_attr( $args[ $property . '_placeholder' ] ) . '"' : '';
113
 
114
  echo '<div class="spf--left spf--input">';
115
+ echo ( ! empty( $args[ $property . '_icon' ] ) ) ? wp_kses_post( '<span class="spf--label spf--label-icon">' . $args[ $property . '_icon' ] . '</span>' ) : '';
116
+
117
+ // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
118
+ echo '<input type="number" name="' . esc_attr( $this->field_name( '[' . $property . ']' ) ) . '" value="' . esc_attr( $value[ $property ] ) . '"' . $placeholder . $min . ' class="spf-number" />';
119
+ echo ( ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--label-unit">' . esc_html( $args['unit'] ) . '</span>' : '';
120
  echo '</div>';
121
 
122
  }
124
 
125
  if ( ! empty( $args['style'] ) ) {
126
  echo '<div class="spf--left spf--input">';
127
+ echo '<select name="' . esc_attr( $this->field_name( '[style]' ) ) . '">';
128
  foreach ( $border_props as $border_prop_key => $border_prop_value ) {
129
  $selected = ( $value['style'] === $border_prop_key ) ? ' selected' : '';
130
+ echo '<option value="' . esc_attr( $border_prop_key ) . '"' . esc_attr( $selected ) . '>' . esc_html( $border_prop_value ) . '</option>';
131
  }
132
  echo '</select>';
133
  echo '</div>';
134
  }
135
 
136
  if ( ! empty( $args['color'] ) ) {
137
+ $default_color_attr = ( ! empty( $default_value['color'] ) ) ? ' data-default-color="' . esc_attr( $default_value['color'] ) . '"' : '';
138
  echo '<div class="spf--left spf-field-color">';
139
+ echo '<input type="text" name="' . esc_attr( $this->field_name( '[color]' ) ) . '" value="' . esc_attr( $value['color'] ) . '" class="spf-color"' . $default_color_attr . ' />';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
140
  echo '</div>';
141
  }
142
 
143
  echo '<div class="clear"></div>';
144
 
145
+ echo wp_kses_post( $this->field_after() );
146
 
147
  }
148
 
149
+ /**
150
+ * Output
151
+ *
152
+ * @return statement
153
+ */
154
  public function output() {
155
 
156
  $output = '';
158
  $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
159
  $element = ( is_array( $this->field['output'] ) ) ? join( ',', $this->field['output'] ) : $this->field['output'];
160
 
161
+ // Properties.
162
+ $top = ( isset( $this->value['top'] ) && '' !== $this->value['top'] ) ? $this->value['top'] : '';
163
+ $right = ( isset( $this->value['right'] ) && '' !== $this->value['right'] ) ? $this->value['right'] : '';
164
+ $bottom = ( isset( $this->value['bottom'] ) && '' !== $this->value['bottom'] ) ? $this->value['bottom'] : '';
165
+ $left = ( isset( $this->value['left'] ) && '' !== $this->value['left'] ) ? $this->value['left'] : '';
166
+ $style = ( isset( $this->value['style'] ) && '' !== $this->value['style'] ) ? $this->value['style'] : '';
167
+ $color = ( isset( $this->value['color'] ) && '' !== $this->value['color'] ) ? $this->value['color'] : '';
168
+ $all = ( isset( $this->value['all'] ) && '' !== $this->value['all'] ) ? $this->value['all'] : '';
169
 
170
+ if ( ! empty( $this->field['all'] ) && ( '' !== $all || '' !== $color ) ) {
171
 
172
  $output = $element . '{';
173
+ $output .= ( '' !== $all ) ? 'border-width:' . $all . $unit . $important . ';' : '';
174
+ $output .= ( '' !== $color ) ? 'border-color:' . $color . $important . ';' : '';
175
+ $output .= ( '' !== $style ) ? 'border-style:' . $style . $important . ';' : '';
176
  $output .= '}';
177
 
178
+ } elseif ( '' !== $top || '' !== $right || '' !== $bottom || '' !== $left || '' !== $color ) {
179
 
180
  $output = $element . '{';
181
+ $output .= ( '' !== $top ) ? 'border-top-width:' . $top . $unit . $important . ';' : '';
182
+ $output .= ( '' !== $right ) ? 'border-right-width:' . $right . $unit . $important . ';' : '';
183
+ $output .= ( '' !== $bottom ) ? 'border-bottom-width:' . $bottom . $unit . $important . ';' : '';
184
+ $output .= ( '' !== $left ) ? 'border-left-width:' . $left . $unit . $important . ';' : '';
185
+ $output .= ( '' !== $color ) ? 'border-color:' . $color . $important . ';' : '';
186
+ $output .= ( '' !== $style ) ? 'border-style:' . $style . $important . ';' : '';
187
  $output .= '}';
188
 
189
  }
admin/views/wpcfree-metabox/fields/button_set/button_set.php CHANGED
@@ -11,12 +11,24 @@
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(
@@ -29,25 +41,25 @@ if ( ! class_exists( 'SP_WPCF_Field_button_set' ) ) {
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>';
@@ -60,7 +72,7 @@ if ( ! class_exists( 'SP_WPCF_Field_button_set' ) ) {
60
 
61
  echo '<div class="clear"></div>';
62
 
63
- echo $this->field_after();
64
 
65
  }
66
 
11
  if ( ! class_exists( 'SP_WPCF_Field_button_set' ) ) {
12
  class SP_WPCF_Field_button_set extends SP_WPCF_Fields {
13
 
14
+ /**
15
+ * Button set field constructor.
16
+ *
17
+ * @param array $field The field type.
18
+ * @param string $value The values of the field.
19
+ * @param string $unique The unique ID for the field.
20
+ * @param string $where To where show the output CSS.
21
+ * @param string $parent The parent args.
22
+ */
23
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
 
24
  parent::__construct( $field, $value, $unique, $where, $parent );
25
  }
26
 
27
+ /**
28
+ * Render field
29
+ *
30
+ * @return void
31
+ */
32
  public function render() {
33
 
34
  $args = wp_parse_args(
41
 
42
  $value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
43
 
44
+ echo wp_kses_post( $this->field_before() );
45
 
46
  if ( ! empty( $args['options'] ) ) {
47
 
48
+ echo '<div class="spf-siblings spf--button-group" data-multiple="' . esc_attr( $args['multiple'] ) . '">';
49
 
50
  foreach ( $args['options'] as $key => $option ) {
51
 
52
+ $type = ( $args['multiple'] ) ? 'checkbox' : 'radio';
53
+ $extra = ( $args['multiple'] ) ? '[]' : '';
54
+ $active = ( in_array( $key, $value ) ) ? ' spf--active' : '';
55
+ $checked = ( in_array( $key, $value ) ) ? ' checked' : '';
56
+ $pro_only_class = ( isset( $option['pro_only'] ) && $option['pro_only'] ) ? ' spf-pro-only' : '';
57
+ echo '<div class="spf--sibling spf--button' . esc_attr( $active . $pro_only_class ) . '">';
58
+ echo '<input type="' . esc_attr( $type ) . '" name="' . esc_attr( $this->field_name( $extra ) ) . '" value="' . esc_attr( $key ) . '"' . $this->field_attributes() . esc_attr( $checked ) . '/>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
59
  if ( isset( $option['option_name'] ) && ! empty( $option['option_name'] ) ) {
60
+ echo esc_html( $option['option_name'] );
61
  } else {
62
+ echo esc_html( $option );
63
  }
64
 
65
  echo '</div>';
72
 
73
  echo '<div class="clear"></div>';
74
 
75
+ echo wp_kses_post( $this->field_after() );
76
 
77
  }
78
 
admin/views/wpcfree-metabox/fields/carousel_type/carousel_type.php CHANGED
@@ -9,11 +9,24 @@
9
  */
10
  if ( ! class_exists( 'SP_WPCF_Field_carousel_type' ) ) {
11
  class SP_WPCF_Field_carousel_type 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(
@@ -26,7 +39,7 @@ if ( ! class_exists( 'SP_WPCF_Field_carousel_type' ) ) {
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
 
@@ -36,14 +49,15 @@ if ( ! class_exists( 'SP_WPCF_Field_carousel_type' ) ) {
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 = isset( $option['pro_only'] ) ? ' disabled' : '';
44
  $pro_only_text = isset( $option['pro_only'] ) ? '<strong class="ct-pro-only">' . esc_html__( 'PRO', 'wp-carousel-free' ) . '</strong>' : '';
45
- echo '<div class="spf--sibling spf--image' . $active . '">';
46
- echo '<label><input' . $pro_only . ' type="' . $type . '" name="' . $this->field_name( $extra ) . '" value="' . $key . '"' . $this->field_attributes() . $checked . '/>' . $pro_only_text . '<i class="' . $option['icon'] . '"></i><p class="sp-carousel-type">' . $option['text'] . '</p></label>';
 
47
  echo '</div>';
48
 
49
  }
@@ -54,10 +68,15 @@ if ( ! class_exists( 'SP_WPCF_Field_carousel_type' ) ) {
54
 
55
  echo '<div class="clear"></div>';
56
 
57
- echo $this->field_after();
58
 
59
  }
60
 
 
 
 
 
 
61
  public function output() {
62
 
63
  $output = '';
9
  */
10
  if ( ! class_exists( 'SP_WPCF_Field_carousel_type' ) ) {
11
  class SP_WPCF_Field_carousel_type extends SP_WPCF_Fields {
12
+ /**
13
+ * Carousel type field constructor.
14
+ *
15
+ * @param array $field The field type.
16
+ * @param string $value The values of the field.
17
+ * @param string $unique The unique ID for the field.
18
+ * @param string $where To where show the output CSS.
19
+ * @param string $parent The parent args.
20
+ */
21
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
22
  parent::__construct( $field, $value, $unique, $where, $parent );
23
  }
24
 
25
+ /**
26
+ * Render field
27
+ *
28
+ * @return void
29
+ */
30
  public function render() {
31
 
32
  $args = wp_parse_args(
39
 
40
  $value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
41
 
42
+ echo wp_kses_post( $this->field_before() );
43
 
44
  if ( ! empty( $args['options'] ) ) {
45
 
49
 
50
  foreach ( $args['options'] as $key => $option ) {
51
 
52
+ $type = ( $args['multiple'] ) ? 'checkbox' : 'radio';
53
+ $extra = ( $args['multiple'] ) ? '[]' : '';
54
+ $active = ( in_array( $key, $value ) ) ? ' spf--active' : '';
55
+ $checked = ( in_array( $key, $value ) ) ? ' checked' : '';
56
  $pro_only = isset( $option['pro_only'] ) ? ' disabled' : '';
57
  $pro_only_text = isset( $option['pro_only'] ) ? '<strong class="ct-pro-only">' . esc_html__( 'PRO', 'wp-carousel-free' ) . '</strong>' : '';
58
+ echo '<div class="spf--sibling spf--image' . esc_attr( $active ). '">';
59
+ echo '<label><input' . esc_attr( $pro_only ) . ' type="' . $type . '" name="' . esc_attr( $this->field_name( $extra ) ) . '" value="' . $key . '"' . $this->field_attributes() . esc_attr( $checked ) . '/>' . $pro_only_text . '<i class="' . esc_attr( $option['icon'] ) . '"></i><p class="sp-carousel-type">' . wp_kses_post( $option['text'] ) . '</p></label>';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
60
+
61
  echo '</div>';
62
 
63
  }
68
 
69
  echo '<div class="clear"></div>';
70
 
71
+ echo wp_kses_post( $this->field_after() );
72
 
73
  }
74
 
75
+ /**
76
+ * Output
77
+ *
78
+ * @return statement
79
+ */
80
  public function output() {
81
 
82
  $output = '';
admin/views/wpcfree-metabox/fields/checkbox/checkbox.php CHANGED
@@ -1,61 +1,73 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
 
2
  /**
3
  *
4
  * Field: checkbox
5
  *
6
  * @since 1.0.0
7
  * @version 1.0.0
8
- *
9
  */
10
- if( ! class_exists( 'SP_WPCF_Field_checkbox' ) ) {
11
- class SP_WPCF_Field_checkbox 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
- 'inline' => false,
21
- ) );
22
-
23
- $inline_class = ( $args['inline'] ) ? ' class="spf--inline-list"' : '';
24
-
25
- echo $this->field_before();
26
-
27
- if( ! empty( $this->field['options'] ) ) {
28
-
29
- $value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
30
- $options = $this->field['options'];
31
- $options = ( is_array( $options ) ) ? $options : array_filter( $this->field_data( $options ) );
32
-
33
- if( ! empty( $options ) ) {
34
-
35
- echo '<ul'. $inline_class .'>';
36
- foreach ( $options as $option_key => $option_value ) {
37
- $checked = ( in_array( $option_key, $value ) ) ? ' checked' : '';
38
- echo '<li><label><input type="checkbox" name="'. $this->field_name( '[]' ) .'" value="'. $option_key .'"'. $this->field_attributes() . $checked .'/> '. $option_value .'</label></li>';
39
- }
40
- echo '</ul>';
41
-
42
- } else {
43
-
44
- echo ( ! empty( $this->field['empty_message'] ) ) ? $this->field['empty_message'] : esc_html__( 'No data provided for this option type.', 'wp-carousel-free' );
45
-
46
- }
47
-
48
- } else {
49
- echo '<label class="spf-checkbox">';
50
- echo '<input type="hidden" name="'. $this->field_name() .'" value="'. $this->value .'" class="spf--input"'. $this->field_attributes() .'/>';
51
- echo '<input type="checkbox" class="spf--checkbox"'. checked( $this->value, 1, false ) .'/>';
52
- echo ( ! empty( $this->field['label'] ) ) ? ' '. $this->field['label'] : '';
53
- echo '</label>';
54
- }
55
-
56
- echo $this->field_after();
57
-
58
- }
59
-
60
- }
 
 
 
 
 
 
 
 
 
 
 
 
61
  }
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
  /**
4
  *
5
  * Field: checkbox
6
  *
7
  * @since 1.0.0
8
  * @version 1.0.0
 
9
  */
10
+ if ( ! class_exists( 'SP_WPCF_Field_checkbox' ) ) {
11
+ class SP_WPCF_Field_checkbox extends SP_WPCF_Fields {
12
+
13
+ /**
14
+ * Checkbox field constructor.
15
+ *
16
+ * @param array $field The field type.
17
+ * @param string $value The values of the field.
18
+ * @param string $unique The unique ID for the field.
19
+ * @param string $where To where show the output CSS.
20
+ * @param string $parent The parent args.
21
+ */
22
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
23
+ parent::__construct( $field, $value, $unique, $where, $parent );
24
+ }
25
+
26
+ /**
27
+ * Render field
28
+ *
29
+ * @return void
30
+ */
31
+ public function render() {
32
+ $args = wp_parse_args(
33
+ $this->field,
34
+ array(
35
+ 'inline' => false,
36
+ )
37
+ );
38
+
39
+ $inline_class = ( $args['inline'] ) ? ' class="spf--inline-list"' : '';
40
+
41
+ echo wp_kses_post( $this->field_before() );
42
+
43
+ if ( ! empty( $this->field['options'] ) ) {
44
+
45
+ $value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
46
+ $options = $this->field['options'];
47
+ $options = ( is_array( $options ) ) ? $options : array_filter( $this->field_data( $options ) );
48
+
49
+ if ( ! empty( $options ) ) {
50
+ echo ( $args['inline'] ) ? '<ul class="spf--inline-list">' : '<ul>';
51
+ foreach ( $options as $option_key => $option_value ) {
52
+ $checked = ( in_array( $option_key, $value ) ) ? ' checked' : '';
53
+ echo wp_kses_post( '<li><label><input type="checkbox" name="' . $this->field_name( '[]' ) . '" value="' . $option_key . '"' . $this->field_attributes() . $checked . '/> ' . $option_value . '</label></li>' );
54
+ }
55
+ echo '</ul>';
56
+
57
+ } else {
58
+ echo ! empty( $this->field['empty_message'] ) ? esc_html( $this->field['empty_message'] ) : esc_html__( 'No data provided for this option type.', 'wp-carousel-free' );
59
+ }
60
+ } else {
61
+ echo '<label class="spf-checkbox">';
62
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name() ) . '" value="' . esc_attr( $this->value ) . '" class="spf--input"' . $this->field_attributes() . '/>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
63
+ echo '<input type="checkbox" class="spf--checkbox"' . esc_attr( checked( $this->value, 1, false ) ) . '/>';
64
+ echo ( ! empty( $this->field['label'] ) ) ? ' ' . esc_html( $this->field['label'] ) : '';
65
+ echo '</label>';
66
+ }
67
+
68
+ echo wp_kses_post( $this->field_after() );
69
+
70
+ }
71
+
72
+ }
73
  }
admin/views/wpcfree-metabox/fields/code_editor/code_editor.php CHANGED
@@ -1,57 +1,87 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
 
2
  /**
3
  *
4
  * Field: code_editor
5
  *
6
  * @since 1.0.0
7
  * @version 1.0.0
8
- *
9
  */
10
- if( ! class_exists( 'SP_WPCF_Field_code_editor' ) ) {
11
- class SP_WPCF_Field_code_editor extends SP_WPCF_Fields {
12
 
13
- public $version = '5.41.0';
14
- public $cdn_url = 'https://cdn.jsdelivr.net/npm/codemirror@';
 
 
 
 
 
 
 
 
 
 
15
 
16
- public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
17
- parent::__construct( $field, $value, $unique, $where, $parent );
18
- }
 
 
 
 
 
 
 
 
 
19
 
20
- public function render() {
 
 
 
 
 
21
 
22
- $default_settings = array(
23
- 'tabSize' => 2,
24
- 'lineNumbers' => true,
25
- 'theme' => 'default',
26
- 'mode' => 'htmlmixed',
27
- 'cdnURL' => $this->cdn_url . $this->version,
28
- );
29
 
30
- $settings = ( ! empty( $this->field['settings'] ) ) ? $this->field['settings'] : array();
31
- $settings = wp_parse_args( $settings, $default_settings );
32
- $encoded = htmlspecialchars( json_encode( $settings ) );
33
 
34
- echo $this->field_before();
35
- echo '<textarea name="'. $this->field_name() .'"'. $this->field_attributes() .' data-editor="'. $encoded .'">'. $this->value .'</textarea>';
36
- echo $this->field_after();
37
 
38
- }
39
 
40
- public function enqueue() {
 
 
 
 
 
41
 
42
- // Do not loads CodeMirror in revslider page.
43
- if( in_array( spf_get_var( 'page' ), array( 'revslider' ) ) ) { return; }
 
44
 
45
- if( ! wp_script_is( 'spf-codemirror' ) ) {
46
- wp_enqueue_script( 'spf-codemirror', $this->cdn_url . $this->version .'/lib/codemirror.min.js', array( 'spf' ), $this->version, true );
47
- wp_enqueue_script( 'spf-codemirror-loadmode', $this->cdn_url . $this->version .'/addon/mode/loadmode.min.js', array( 'spf-codemirror' ), $this->version, true );
48
- }
49
 
50
- if( ! wp_style_is( 'spf-codemirror' ) ) {
51
- wp_enqueue_style( 'spf-codemirror', $this->cdn_url . $this->version .'/lib/codemirror.min.css', array(), $this->version );
52
- }
53
 
54
- }
55
 
56
- }
57
  }
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
  /**
4
  *
5
  * Field: code_editor
6
  *
7
  * @since 1.0.0
8
  * @version 1.0.0
 
9
  */
10
+ if ( ! class_exists( 'SP_WPCF_Field_code_editor' ) ) {
11
+ class SP_WPCF_Field_code_editor extends SP_WPCF_Fields {
12
 
13
+ /**
14
+ * Version
15
+ *
16
+ * @var string
17
+ */
18
+ public $version = '5.41.0';
19
+ /**
20
+ * Cdn_url
21
+ *
22
+ * @var string
23
+ */
24
+ public $cdn_url = 'https://cdn.jsdelivr.net/npm/codemirror@';
25
 
26
+ /**
27
+ * Code_editor field constructor.
28
+ *
29
+ * @param array $field The field type.
30
+ * @param string $value The values of the field.
31
+ * @param string $unique The unique ID for the field.
32
+ * @param string $where To where show the output CSS.
33
+ * @param string $parent The parent args.
34
+ */
35
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
36
+ parent::__construct( $field, $value, $unique, $where, $parent );
37
+ }
38
 
39
+ /**
40
+ * Render field
41
+ *
42
+ * @return void
43
+ */
44
+ public function render() {
45
 
46
+ $default_settings = array(
47
+ 'tabSize' => 2,
48
+ 'lineNumbers' => true,
49
+ 'theme' => 'default',
50
+ 'mode' => 'htmlmixed',
51
+ 'cdnURL' => $this->cdn_url . $this->version,
52
+ );
53
 
54
+ $settings = ( ! empty( $this->field['settings'] ) ) ? $this->field['settings'] : array();
55
+ $settings = wp_parse_args( $settings, $default_settings );
56
+ $encoded = htmlspecialchars( wp_json_encode( $settings ) );
57
 
58
+ echo wp_kses_post( $this->field_before() );
59
+ echo '<textarea name="' . esc_attr( $this->field_name() ) . '"' . $this->field_attributes() . ' data-editor="' . esc_attr( $encoded ) . '">' . wp_kses_post( $this->value ) . '</textarea>';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
60
+ echo wp_kses_post( $this->field_after() );
61
 
62
+ }
63
 
64
+ /**
65
+ * Enqueue
66
+ *
67
+ * @return void
68
+ */
69
+ public function enqueue() {
70
 
71
+ // Do not loads CodeMirror in revslider page.
72
+ if ( in_array( spf_get_var( 'page' ), array( 'revslider' ) ) ) {
73
+ return; }
74
 
75
+ if ( ! wp_script_is( 'spf-codemirror' ) ) {
76
+ wp_enqueue_script( 'spf-codemirror', $this->cdn_url . $this->version . '/lib/codemirror.min.js', array( 'spf' ), $this->version, true );
77
+ wp_enqueue_script( 'spf-codemirror-loadmode', $this->cdn_url . $this->version . '/addon/mode/loadmode.min.js', array( 'spf-codemirror' ), $this->version, true );
78
+ }
79
 
80
+ if ( ! wp_style_is( 'spf-codemirror' ) ) {
81
+ wp_enqueue_style( 'spf-codemirror', $this->cdn_url . $this->version . '/lib/codemirror.min.css', array(), $this->version );
82
+ }
83
 
84
+ }
85
 
86
+ }
87
  }
admin/views/wpcfree-metabox/fields/color/color.php CHANGED
@@ -1,52 +1,69 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
 
2
  /**
3
  *
4
  * Field: color
5
  *
6
  * @since 1.0.0
7
  * @version 1.0.0
8
- *
9
  */
10
- if( ! class_exists( 'SP_WPCF_Field_color' ) ) {
11
- class SP_WPCF_Field_color 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
- $default_attr = ( ! empty( $this->field['default'] ) ) ? ' data-default-color="'. $this->field['default'] .'"' : '';
 
 
 
 
 
 
 
 
 
 
 
20
 
21
- echo $this->field_before();
22
- echo '<input type="text" name="'. $this->field_name() .'" value="'. $this->value .'" class="spf-color"'. $default_attr . $this->field_attributes() .'/>';
23
- echo $this->field_after();
 
 
 
24
 
25
- }
26
 
27
- public function output() {
 
 
28
 
29
- $output = '';
30
- $elements = ( is_array( $this->field['output'] ) ) ? $this->field['output'] : array_filter( (array) $this->field['output'] );
31
- $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
32
- $mode = ( ! empty( $this->field['output_mode'] ) ) ? $this->field['output_mode'] : 'color';
33
 
34
- if( ! empty( $elements ) && isset( $this->value ) && $this->value !== '' ) {
35
- foreach( $elements as $key_property => $element ) {
36
- if( is_numeric( $key_property ) ) {
37
- $output = implode( ',', $elements ) .'{'. $mode .':'. $this->value . $important .';}';
38
- break;
39
- } else {
40
- $output .= $element .'{'. $key_property .':'. $this->value . $important .'}';
41
- }
42
- }
43
- }
44
 
45
- $this->parent->output_css .= $output;
 
 
 
46
 
47
- return $output;
 
 
 
 
 
 
 
 
 
48
 
49
- }
 
 
50
 
51
- }
52
  }
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
  /**
4
  *
5
  * Field: color
6
  *
7
  * @since 1.0.0
8
  * @version 1.0.0
 
9
  */
10
+ if ( ! class_exists( 'SP_WPCF_Field_color' ) ) {
11
+ class SP_WPCF_Field_color extends SP_WPCF_Fields {
 
 
 
 
 
 
12
 
13
+ /**
14
+ * Color field constructor.
15
+ *
16
+ * @param array $field The field type.
17
+ * @param string $value The values of the field.
18
+ * @param string $unique The unique ID for the field.
19
+ * @param string $where To where show the output CSS.
20
+ * @param string $parent The parent args.
21
+ */
22
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
23
+ parent::__construct( $field, $value, $unique, $where, $parent );
24
+ }
25
 
26
+ /**
27
+ * Render field
28
+ *
29
+ * @return void
30
+ */
31
+ public function render() {
32
 
33
+ $default_attr = ( ! empty( $this->field['default'] ) ) ? ' data-default-color="' . esc_attr( $this->field['default'] ) . '"' : '';
34
 
35
+ echo wp_kses_post( $this->field_before() );
36
+ echo '<input type="text" name="' . esc_attr( $this->field_name() ) . '" value="' . esc_attr( $this->value ) . '" class="spf-color"' . $default_attr . $this->field_attributes() . '/>';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
37
+ echo wp_kses_post( $this->field_after() );
38
 
39
+ }
 
 
 
40
 
41
+ /**
42
+ * Output
43
+ *
44
+ * @return statement
45
+ */
46
+ public function output() {
 
 
 
 
47
 
48
+ $output = '';
49
+ $elements = ( is_array( $this->field['output'] ) ) ? $this->field['output'] : array_filter( (array) $this->field['output'] );
50
+ $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
51
+ $mode = ( ! empty( $this->field['output_mode'] ) ) ? $this->field['output_mode'] : 'color';
52
 
53
+ if ( ! empty( $elements ) && isset( $this->value ) && '' !== $this->value ) {
54
+ foreach ( $elements as $key_property => $element ) {
55
+ if ( is_numeric( $key_property ) ) {
56
+ $output = implode( ',', $elements ) . '{' . $mode . ':' . $this->value . $important . ';}';
57
+ break;
58
+ } else {
59
+ $output .= $element . '{' . $key_property . ':' . $this->value . $important . '}';
60
+ }
61
+ }
62
+ }
63
 
64
+ $this->parent->output_css .= $output;
65
+ return $output;
66
+ }
67
 
68
+ }
69
  }
admin/views/wpcfree-metabox/fields/color_group/color_group.php CHANGED
@@ -1,44 +1,59 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
 
2
  /**
3
  *
4
  * Field: color_group
5
  *
6
  * @since 1.0.0
7
  * @version 1.0.0
8
- *
9
  */
10
- if( ! class_exists( 'SP_WPCF_Field_color_group' ) ) {
11
- class SP_WPCF_Field_color_group 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
- $options = ( ! empty( $this->field['options'] ) ) ? $this->field['options'] : array();
20
 
21
- echo $this->field_before();
22
 
23
- if( ! empty( $options ) ) {
24
- foreach( $options as $key => $option ) {
25
 
26
- $color_value = ( ! empty( $this->value[$key] ) ) ? $this->value[$key] : '';
27
- $default_attr = ( ! empty( $this->field['default'][$key] ) ) ? ' data-default-color="'. $this->field['default'][$key] .'"' : '';
28
 
29
- echo '<div class="spf--left spf-field-color">';
30
- echo '<div class="spf--title">'. $option .'</div>';
31
- echo '<input type="text" name="'. $this->field_name('['. $key .']') .'" value="'. $color_value .'" class="spf-color"'. $default_attr . $this->field_attributes() .'/>';
32
- echo '</div>';
33
 
34
- }
35
- }
36
 
37
- echo '<div class="clear"></div>';
38
 
39
- echo $this->field_after();
40
 
41
- }
42
 
43
- }
44
  }
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
  /**
4
  *
5
  * Field: color_group
6
  *
7
  * @since 1.0.0
8
  * @version 1.0.0
 
9
  */
10
+ if ( ! class_exists( 'SP_WPCF_Field_color_group' ) ) {
11
+ class SP_WPCF_Field_color_group extends SP_WPCF_Fields {
12
+
13
 
14
+ /**
15
+ * Color_group field constructor.
16
+ *
17
+ * @param array $field The field type.
18
+ * @param string $value The values of the field.
19
+ * @param string $unique The unique ID for the field.
20
+ * @param string $where To where show the output CSS.
21
+ * @param string $parent The parent args.
22
+ */
23
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
24
+ parent::__construct( $field, $value, $unique, $where, $parent );
25
+ }
26
 
27
+ /**
28
+ * Render field
29
+ *
30
+ * @return void
31
+ */
32
+ public function render() {
33
 
34
+ $options = ( ! empty( $this->field['options'] ) ) ? $this->field['options'] : array();
35
 
36
+ echo wp_kses_post( $this->field_before() );
37
 
38
+ if ( ! empty( $options ) ) {
39
+ foreach ( $options as $key => $option ) {
40
 
41
+ $color_value = ( ! empty( $this->value[ $key ] ) ) ? $this->value[ $key ] : '';
42
+ $default_attr = ( ! empty( $this->field['default'][ $key ] ) ) ? ' data-default-color="' . esc_attr( $this->field['default'][ $key ] ) . '"' : '';
43
 
44
+ echo '<div class="spf--left spf-field-color">';
45
+ echo '<div class="spf--title">' . esc_html( $option ) . '</div>';
46
+ echo '<input type="text" name="' . esc_attr( $this->field_name( '[' . $key . ']' ) ) . '" value="' . $color_value . '" class="spf-color"' . $default_attr . $this->field_attributes() . '/>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
47
+ echo '</div>';
48
 
49
+ }
50
+ }
51
 
52
+ echo '<div class="clear"></div>';
53
 
54
+ echo wp_kses_post( $this->field_after() );
55
 
56
+ }
57
 
58
+ }
59
  }
admin/views/wpcfree-metabox/fields/column/column.php CHANGED
@@ -32,6 +32,11 @@ if ( ! class_exists( 'SP_WPCF_Field_column' ) ) {
32
  *
33
  * @return void
34
  */
 
 
 
 
 
35
  public function render() {
36
 
37
  $args = wp_parse_args(
@@ -43,12 +48,12 @@ if ( ! class_exists( 'SP_WPCF_Field_column' ) ) {
43
  'tablet_icon' => '<i class="fa fa-tablet"></i>',
44
  'mobile_icon' => '<i class="fa fa-mobile"></i>',
45
  'all_text' => '<i class="fa fa-arrows"></i>',
46
- 'lg_desktop_placeholder' => esc_html__( 'Large Desktop', 'wp-carousel-free' ),
47
- 'desktop_placeholder' => esc_html__( 'Desktop', 'wp-carousel-free' ),
48
- 'laptop_placeholder' => esc_html__( 'Small Desktop', 'wp-carousel-free' ),
49
- 'tablet_placeholder' => esc_html__( 'Tablet', 'wp-carousel-free' ),
50
- 'mobile_placeholder' => esc_html__( 'Mobile', 'wp-carousel-free' ),
51
- 'all_placeholder' => esc_html__( 'all', 'wp-carousel-free' ),
52
  'lg_desktop' => true,
53
  'desktop' => true,
54
  'laptop' => true,
@@ -74,17 +79,17 @@ if ( ! class_exists( 'SP_WPCF_Field_column' ) ) {
74
 
75
  $value = wp_parse_args( $this->value, $default_values );
76
 
77
- echo $this->field_before();
78
 
79
- $min = ( isset( $args['min'] ) ) ? ' min="' . $args['min'] . '"' : '';
80
  if ( ! empty( $args['all'] ) ) {
81
 
82
- $placeholder = ( ! empty( $args['all_placeholder'] ) ) ? ' placeholder="' . $args['all_placeholder'] . '"' : '';
83
 
84
  echo '<div class="spf--input">';
85
- echo ( ! empty( $args['all_text'] ) ) ? '<span class="spf--label spf--label-icon">' . $args['all_text'] . '</span>' : '';
86
- echo '<input type="number" name="' . $this->field_name( '[all]' ) . '" value="' . $value['all'] . '"' . $placeholder . $min . ' class="spf-number" />';
87
- echo ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--label-unit">' . $args['units'][0] . '</span>' : '';
88
  echo '</div>';
89
 
90
  } else {
@@ -97,40 +102,40 @@ if ( ! class_exists( 'SP_WPCF_Field_column' ) ) {
97
  }
98
  }
99
 
100
- $properties = ( $properties === array( 'laptop', 'mobile' ) ) ? array_reverse( $properties ) : $properties;
101
 
102
  foreach ( $properties as $property ) {
103
 
104
- $placeholder = ( ! empty( $args[ $property . '_placeholder' ] ) ) ? ' placeholder="' . $args[ $property . '_placeholder' ] . '"' : '';
105
 
106
  echo '<div class="spf--input">';
107
- echo ( ! empty( $args[ $property . '_icon' ] ) ) ? '<span class="spf--label spf--label-icon">' . $args[ $property . '_icon' ] . '</span>' : '';
108
- echo '<input type="number" name="' . $this->field_name( '[' . $property . ']' ) . '" value="' . $value[ $property ] . '"' . $placeholder . $min . ' class="spf-number" />';
109
- echo ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--label-unit">' . $args['units'][0] . '</span>' : '';
110
  echo '</div>';
111
 
112
  }
113
  }
114
 
115
  if ( ! empty( $args['unit'] ) && count( $args['units'] ) > 1 ) {
116
- echo '<select name="' . $this->field_name( '[unit]' ) . '">';
117
  foreach ( $args['units'] as $unit ) {
118
  $selected = ( $value['unit'] === $unit ) ? ' selected' : '';
119
- echo '<option value="' . $unit . '"' . $selected . '>' . $unit . '</option>';
120
  }
121
  echo '</select>';
122
  }
123
 
124
- echo '<div class="clear"></div>';
125
 
126
- echo $this->field_after();
127
 
128
  }
129
 
130
  /**
131
  * The output function.
132
  *
133
- * @return void
134
  */
135
  public function output() {
136
 
@@ -140,10 +145,10 @@ if ( ! class_exists( 'SP_WPCF_Field_column' ) ) {
140
  $unit = ( ! empty( $this->value['unit'] ) ) ? $this->value['unit'] : 'px';
141
 
142
  $mode = ( ! empty( $this->field['output_mode'] ) ) ? $this->field['output_mode'] : 'padding';
143
- $mode = ( $mode === 'relative' || $mode === 'absolute' || $mode === 'none' ) ? '' : $mode;
144
  $mode = ( ! empty( $mode ) ) ? $mode . '-' : '';
145
 
146
- if ( ! empty( $this->field['all'] ) && isset( $this->value['all'] ) && $this->value['all'] !== '' ) {
147
 
148
  $output = $element . '{';
149
  $output .= $mode . 'lg_desktop:' . $this->value['all'] . $unit . $important . ';';
@@ -155,13 +160,13 @@ if ( ! class_exists( 'SP_WPCF_Field_column' ) ) {
155
 
156
  } else {
157
 
158
- $lg_desktop = ( isset( $this->value['lg_desktop'] ) && $this->value['lg_desktop'] !== '' ) ? $mode . 'lg_desktop:' . $this->value['lg_desktop'] . $unit . $important . ';' : '';
159
- $desktop = ( isset( $this->value['desktop'] ) && $this->value['desktop'] !== '' ) ? $mode . 'desktop:' . $this->value['desktop'] . $unit . $important . ';' : '';
160
- $laptop = ( isset( $this->value['laptop'] ) && $this->value['laptop'] !== '' ) ? $mode . 'laptop:' . $this->value['laptop'] . $unit . $important . ';' : '';
161
- $tablet = ( isset( $this->value['tablet'] ) && $this->value['tablet'] !== '' ) ? $mode . 'tablet:' . $this->value['tablet'] . $unit . $important . ';' : '';
162
- $mobile = ( isset( $this->value['mobile'] ) && $this->value['mobile'] !== '' ) ? $mode . 'mobile:' . $this->value['mobile'] . $unit . $important . ';' : '';
163
 
164
- if ( $lg_desktop !== '' || $desktop !== '' || $laptop !== '' || $tablet !== '' || $mobile !== '' ) {
165
  $output = $element . '{' . $lg_desktop . $desktop . $laptop . $tablet . $mobile . '}';
166
  }
167
  }
32
  *
33
  * @return void
34
  */
35
+ /**
36
+ * Render field
37
+ *
38
+ * @return void
39
+ */
40
  public function render() {
41
 
42
  $args = wp_parse_args(
48
  'tablet_icon' => '<i class="fa fa-tablet"></i>',
49
  'mobile_icon' => '<i class="fa fa-mobile"></i>',
50
  'all_text' => '<i class="fa fa-arrows"></i>',
51
+ 'lg_desktop_placeholder' => __( 'Large Desktop', 'wp-carousel-free' ),
52
+ 'desktop_placeholder' => __( 'Desktop', 'wp-carousel-free' ),
53
+ 'laptop_placeholder' => __( 'Small Desktop', 'wp-carousel-free' ),
54
+ 'tablet_placeholder' => __( 'Tablet', 'wp-carousel-free' ),
55
+ 'mobile_placeholder' => __( 'Mobile', 'wp-carousel-free' ),
56
+ 'all_placeholder' => __( 'all', 'wp-carousel-free' ),
57
  'lg_desktop' => true,
58
  'desktop' => true,
59
  'laptop' => true,
79
 
80
  $value = wp_parse_args( $this->value, $default_values );
81
 
82
+ echo wp_kses_post( $this->field_before() );
83
 
84
+ $min = ( isset( $args['min'] ) ) ? ' min="' . esc_attr( $args['min'] ) . '"' : '';
85
  if ( ! empty( $args['all'] ) ) {
86
 
87
+ $placeholder = ( ! empty( $args['all_placeholder'] ) ) ? ' placeholder="' . esc_attr( $args['all_placeholder'] ) . '"' : '';
88
 
89
  echo '<div class="spf--input">';
90
+ echo ( ! empty( $args['all_text'] ) ) ? wp_kses_post( '<span class="spf--label spf--label-icon">' . $args['all_text'] . '</span>' ) : '';
91
+ echo '<input type="number" name="' . esc_attr( $this->field_name( '[all]' ) ) . '" value="' . esc_attr( $value['all'] ) . '"' . $placeholder . $min . ' class="spf-number" />';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
92
+ echo ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--label-unit">' . esc_html( $args['units'][0] ) . '</span>' : '';
93
  echo '</div>';
94
 
95
  } else {
102
  }
103
  }
104
 
105
+ $properties = ( array( 'laptop', 'mobile' ) === $properties ) ? array_reverse( $properties ) : $properties;
106
 
107
  foreach ( $properties as $property ) {
108
 
109
+ $placeholder = ( ! empty( $args[ $property . '_placeholder' ] ) ) ? ' placeholder="' . esc_attr( $args[ $property . '_placeholder' ] ) . '"' : '';
110
 
111
  echo '<div class="spf--input">';
112
+ echo ( ! empty( $args[ $property . '_icon' ] ) ) ? wp_kses_post( '<span class="spf--label spf--label-icon">' . $args[ $property . '_icon' ] . '</span>' ) : '';
113
+ echo '<input type="number" name="' . esc_attr( $this->field_name( '[' . $property . ']' ) ) . '" value="' . esc_attr( $value[ $property ] ) . '"' . $placeholder . $min . ' class="spf-number" />'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
114
+ echo ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--label-unit">' . esc_html( $args['units'][0] ) . '</span>' : '';
115
  echo '</div>';
116
 
117
  }
118
  }
119
 
120
  if ( ! empty( $args['unit'] ) && count( $args['units'] ) > 1 ) {
121
+ echo '<select name="' . esc_attr( $this->field_name( '[unit]' ) ) . '">';
122
  foreach ( $args['units'] as $unit ) {
123
  $selected = ( $value['unit'] === $unit ) ? ' selected' : '';
124
+ echo '<option value="' . esc_attr( $unit ) . '"' . esc_attr( $selected ) . '>' . esc_html( $unit ) . '</option>';
125
  }
126
  echo '</select>';
127
  }
128
 
129
+ // echo '<div class="clear"></div>';
130
 
131
+ echo wp_kses_post( $this->field_after() );
132
 
133
  }
134
 
135
  /**
136
  * The output function.
137
  *
138
+ * @return statement
139
  */
140
  public function output() {
141
 
145
  $unit = ( ! empty( $this->value['unit'] ) ) ? $this->value['unit'] : 'px';
146
 
147
  $mode = ( ! empty( $this->field['output_mode'] ) ) ? $this->field['output_mode'] : 'padding';
148
+ $mode = ( 'relative' === $mode || 'absolute' === $mode || 'none' === $mode ) ? '' : $mode;
149
  $mode = ( ! empty( $mode ) ) ? $mode . '-' : '';
150
 
151
+ if ( ! empty( $this->field['all'] ) && isset( $this->value['all'] ) && '' !== $this->value['all'] ) {
152
 
153
  $output = $element . '{';
154
  $output .= $mode . 'lg_desktop:' . $this->value['all'] . $unit . $important . ';';
160
 
161
  } else {
162
 
163
+ $lg_desktop = ( isset( $this->value['lg_desktop'] ) && '' !== $this->value['lg_desktop'] ) ? $mode . 'lg_desktop:' . $this->value['lg_desktop'] . $unit . $important . ';' : '';
164
+ $desktop = ( isset( $this->value['desktop'] ) && '' !== $this->value['desktop'] ) ? $mode . 'desktop:' . $this->value['desktop'] . $unit . $important . ';' : '';
165
+ $laptop = ( isset( $this->value['laptop'] ) && '' !== $this->value['laptop'] ) ? $mode . 'laptop:' . $this->value['laptop'] . $unit . $important . ';' : '';
166
+ $tablet = ( isset( $this->value['tablet'] ) && '' !== $this->value['tablet'] ) ? $mode . 'tablet:' . $this->value['tablet'] . $unit . $important . ';' : '';
167
+ $mobile = ( isset( $this->value['mobile'] ) && '' !== $this->value['mobile'] ) ? $mode . 'mobile:' . $this->value['mobile'] . $unit . $important . ';' : '';
168
 
169
+ if ( '' !== $lg_desktop || '' !== $desktop || '' !== $laptop || '' !== $tablet || '' !== $mobile ) {
170
  $output = $element . '{' . $lg_desktop . $desktop . $laptop . $tablet . $mobile . '}';
171
  }
172
  }
admin/views/wpcfree-metabox/fields/custom_import/custom_import.php CHANGED
@@ -1,25 +1,40 @@
1
  <?php if ( ! defined( 'ABSPATH' ) ) {
2
  die; } // Cannot access directly.
3
- /**
4
- *
5
- * Field: Custom_import
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
  if ( ! class_exists( 'SP_WPCF_Field_custom_import' ) ) {
 
 
 
 
 
 
 
11
  class SP_WPCF_Field_custom_import extends SP_WPCF_Fields {
12
 
 
 
 
 
 
 
 
 
 
13
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
  parent::__construct( $field, $value, $unique, $where, $parent );
15
  }
 
 
 
 
 
16
  public function render() {
17
- echo $this->field_before();
18
  $wpcp_shortcodelink = admin_url( 'edit.php?post_type=sp_wp_carousel' );
19
  echo '<p><input type="file" id="import" accept=".json"></p>';
20
  echo '<p><button type="button" class="import">Import</button></p>';
21
- echo '<a id="wpcp_shortcode_link_redirect" href="' . $wpcp_shortcodelink . '"></a>';
22
- echo $this->field_after();
23
  }
24
  }
25
  }
1
  <?php if ( ! defined( 'ABSPATH' ) ) {
2
  die; } // Cannot access directly.
3
+
 
 
 
 
 
 
4
  if ( ! class_exists( 'SP_WPCF_Field_custom_import' ) ) {
5
+ /**
6
+ *
7
+ * Field: Custom_import
8
+ *
9
+ * @since 1.0.0
10
+ * @version 1.0.0
11
+ */
12
  class SP_WPCF_Field_custom_import extends SP_WPCF_Fields {
13
 
14
+ /**
15
+ * Custom import field constructor.
16
+ *
17
+ * @param array $field The field type.
18
+ * @param string $value The values of the field.
19
+ * @param string $unique The unique ID for the field.
20
+ * @param string $where To where show the output CSS.
21
+ * @param string $parent The parent args.
22
+ */
23
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
24
  parent::__construct( $field, $value, $unique, $where, $parent );
25
  }
26
+ /**
27
+ * Render field.
28
+ *
29
+ * @return void
30
+ */
31
  public function render() {
32
+ echo wp_kses_post( $this->field_before() );
33
  $wpcp_shortcodelink = admin_url( 'edit.php?post_type=sp_wp_carousel' );
34
  echo '<p><input type="file" id="import" accept=".json"></p>';
35
  echo '<p><button type="button" class="import">Import</button></p>';
36
+ echo '<a id="wpcp_shortcode_link_redirect" href="' . esc_url( $wpcp_shortcodelink ) . '"></a>';
37
+ echo wp_kses_post( $this->field_after() );
38
  }
39
  }
40
  }
admin/views/wpcfree-metabox/fields/gallery/gallery.php CHANGED
@@ -1,34 +1,49 @@
1
  <?php if ( ! defined( 'ABSPATH' ) ) {
2
  die; } // Cannot access directly.
3
- /**
4
- *
5
- * Field: gallery
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
  if ( ! class_exists( 'SP_WPCF_Field_gallery' ) ) {
 
 
 
 
 
 
 
11
  class SP_WPCF_Field_gallery 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
- 'add_title' => esc_html__( 'Add Gallery', 'wp-carousel-free' ),
23
- 'edit_title' => esc_html__( 'Edit Gallery', 'wp-carousel-free' ),
24
- 'clear_title' => esc_html__( 'Clear', 'wp-carousel-free' ),
25
  )
26
  );
27
 
28
  $hidden = ( empty( $this->value ) ) ? ' hidden' : '';
29
 
30
- echo $this->field_before();
31
- echo '<a href="#" class="button button-primary spf-button"><i class="fa fa-plus-circle"></i>' . $args['add_title'] . '</a>';
32
  echo '<ul class="sp-gallery-images">';
33
  if ( ! empty( $this->value ) ) {
34
 
@@ -36,19 +51,17 @@ if ( ! class_exists( 'SP_WPCF_Field_gallery' ) ) {
36
 
37
  foreach ( $values as $id ) {
38
  $attachment = wp_get_attachment_image_src( $id, 'thumbnail' );
39
- echo '<li><img src="' . $attachment[0] . '" alt="" /></li>';
40
  }
41
  }
42
 
43
  echo '</ul>';
44
 
45
- // echo '<a href="#" class="button spf-edit-gallery' . $hidden . '"><i class="fa fa-pencil-square-o"></i>' . $args['edit_title'] . '</a>';
46
- // echo '<a href="#" class="button spf-warning-primary spf-clear-gallery' . $hidden . '"><i class="fa fa-trash"></i>' . $args['clear_title'] . '</a>';
47
- echo '<ul><li><a href="#" class="button spf-edit-gallery' . $hidden . '"><i class="fa fa-pencil-square-o"></i>' . $args['edit_title'] . '</a></li></ul>';
48
- echo '<ul><li><a href="#" class="button spf-warning-primary spf-clear-gallery' . $hidden . '"><i class="fa fa-trash"></i>' . $args['clear_title'] . '</a></li></ul>';
49
- echo '<input type="text" name="' . $this->field_name() . '" value="' . $this->value . '"' . $this->field_attributes() . '/></span>';
50
 
51
- echo $this->field_after();
52
 
53
  }
54
 
1
  <?php if ( ! defined( 'ABSPATH' ) ) {
2
  die; } // Cannot access directly.
3
+
 
 
 
 
 
 
4
  if ( ! class_exists( 'SP_WPCF_Field_gallery' ) ) {
5
+ /**
6
+ *
7
+ * Field: gallery
8
+ *
9
+ * @since 1.0.0
10
+ * @version 1.0.0
11
+ */
12
  class SP_WPCF_Field_gallery extends SP_WPCF_Fields {
13
 
14
+ /**
15
+ * Gallery field constructor.
16
+ *
17
+ * @param array $field The field type.
18
+ * @param string $value The values of the field.
19
+ * @param string $unique The unique ID for the field.
20
+ * @param string $where To where show the output CSS.
21
+ * @param string $parent The parent args.
22
+ */
23
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
24
  parent::__construct( $field, $value, $unique, $where, $parent );
25
  }
26
 
27
+ /**
28
+ * Render field
29
+ *
30
+ * @return void
31
+ */
32
  public function render() {
33
 
34
  $args = wp_parse_args(
35
  $this->field,
36
  array(
37
+ 'add_title' => __( 'Add Gallery', 'wp-carousel-free' ),
38
+ 'edit_title' => __( 'Edit Gallery', 'wp-carousel-free' ),
39
+ 'clear_title' => __( 'Clear', 'wp-carousel-free' ),
40
  )
41
  );
42
 
43
  $hidden = ( empty( $this->value ) ) ? ' hidden' : '';
44
 
45
+ echo wp_kses_post( $this->field_before() );
46
+ echo '<a href="#" class="button button-primary spf-button"><i class="fa fa-plus-circle"></i>' . esc_html( $args['add_title'] ) . '</a>';
47
  echo '<ul class="sp-gallery-images">';
48
  if ( ! empty( $this->value ) ) {
49
 
51
 
52
  foreach ( $values as $id ) {
53
  $attachment = wp_get_attachment_image_src( $id, 'thumbnail' );
54
+ echo '<li><img src="' . esc_url( $attachment[0] ) . '" alt="" /></li>';
55
  }
56
  }
57
 
58
  echo '</ul>';
59
 
60
+ echo '<ul><li><a href="#" class="button spf-edit-gallery' . esc_attr( $hidden ) . '"><i class="fa fa-pencil-square-o"></i>' . esc_html( $args['edit_title'] ) . '</a></li></ul>';
61
+ echo '<ul><li><a href="#" class="button spf-warning-primary spf-clear-gallery' . esc_attr( $hidden ) . '"><i class="fa fa-trash"></i>' . esc_html( $args['clear_title'] ) . '</a></li></ul>';
62
+ echo '<input type="text" name="' . esc_attr( $this->field_name() ) . '" value="' . esc_attr( $this->value ) . '"' . $this->field_attributes() . '/></span>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
 
 
63
 
64
+ echo wp_kses_post( $this->field_after() );
65
 
66
  }
67
 
admin/views/wpcfree-metabox/fields/heading/heading.php CHANGED
@@ -10,16 +10,30 @@
10
  if ( ! class_exists( 'SP_WPCF_Field_heading' ) ) {
11
  class SP_WPCF_Field_heading 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
- echo ( ! empty( $this->field['content'] ) ) ? $this->field['content'] : '';
20
- echo ( ! empty( $this->field['image'] ) ) ? '<img src="' . $this->field['image'] . '">' : '';
21
 
22
- echo ( ! empty( $this->field['after'] ) && ! empty( $this->field['link'] ) ) ? '<span class="spacer"></span><span class="support"><a target="_blank" href="' . $this->field['link'] . '">' . $this->field['after'] . '</a></span>' : '';
23
  }
24
 
25
  }
10
  if ( ! class_exists( 'SP_WPCF_Field_heading' ) ) {
11
  class SP_WPCF_Field_heading extends SP_WPCF_Fields {
12
 
13
+ /**
14
+ * Heading field constructor.
15
+ *
16
+ * @param array $field The field type.
17
+ * @param string $value The values of the field.
18
+ * @param string $unique The unique ID for the field.
19
+ * @param string $where To where show the output CSS.
20
+ * @param string $parent The parent args.
21
+ */
22
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
23
  parent::__construct( $field, $value, $unique, $where, $parent );
24
  }
25
 
26
+ /**
27
+ * Render field
28
+ *
29
+ * @return void
30
+ */
31
  public function render() {
32
 
33
+ echo ( ! empty( $this->field['content'] ) ) ? wp_kses_post( $this->field['content'] ) : '';
34
+ echo ( ! empty( $this->field['image'] ) ) ? '<img src="' . esc_url( $this->field['image'] ) . '">' : '';
35
 
36
+ echo ( ! empty( $this->field['after'] ) && ! empty( $this->field['link'] ) ) ? '<span class="spacer"></span><span class="support"><a target="_blank" href="' . esc_url( $this->field['link'] ) . '">' . wp_kses_post( $this->field['after'] ) . '</a></span>' : '';
37
  }
38
 
39
  }
admin/views/wpcfree-metabox/fields/image_select/image_select.php CHANGED
@@ -10,10 +10,24 @@
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(
@@ -26,11 +40,11 @@ if ( ! class_exists( 'SP_WPCF_Field_image_select' ) ) {
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
 
@@ -41,10 +55,10 @@ if ( ! class_exists( 'SP_WPCF_Field_image_select' ) ) {
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
  }
@@ -54,10 +68,15 @@ if ( ! class_exists( 'SP_WPCF_Field_image_select' ) ) {
54
 
55
  echo '<div class="clear"></div>';
56
 
57
- echo $this->field_after();
58
 
59
  }
60
 
 
 
 
 
 
61
  public function output() {
62
 
63
  $output = '';
@@ -65,7 +84,7 @@ if ( ! class_exists( 'SP_WPCF_Field_image_select' ) ) {
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
 
10
  if ( ! class_exists( 'SP_WPCF_Field_image_select' ) ) {
11
  class SP_WPCF_Field_image_select extends SP_WPCF_Fields {
12
 
13
+ /**
14
+ * Image select field constructor.
15
+ *
16
+ * @param array $field The field type.
17
+ * @param string $value The values of the field.
18
+ * @param string $unique The unique ID for the field.
19
+ * @param string $where To where show the output CSS.
20
+ * @param string $parent The parent args.
21
+ */
22
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
23
  parent::__construct( $field, $value, $unique, $where, $parent );
24
  }
25
 
26
+ /**
27
+ * Render field
28
+ *
29
+ * @return void
30
+ */
31
  public function render() {
32
 
33
  $args = wp_parse_args(
40
 
41
  $value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
42
 
43
+ echo wp_kses_post( $this->field_before() );
44
 
45
  if ( ! empty( $args['options'] ) ) {
46
 
47
+ echo '<div class="spf-siblings spf--image-group" data-multiple="' . esc_attr( $args['multiple'] ) . '">';
48
 
49
  $num = 1;
50
 
55
  $active = ( in_array( $key, $value ) ) ? ' spf--active' : '';
56
  $checked = ( in_array( $key, $value ) ) ? ' checked' : '';
57
  $pro_only_class = isset( $option['pro_only'] ) ? ' spf-pro-only' : '';
58
+ echo '<div class="spf--sibling spf--image' . esc_attr( $active . $pro_only_class ) . '">';
59
+ echo '<img src="' . esc_url( $option['image'] ) . '" alt="img-' . esc_attr( $num++ ) . '" />';
60
+ echo '<input type="' . esc_attr( $type ) . '" name="' . esc_attr( $this->field_name( $extra ) ) . '" value="' . esc_attr( $key ) . '"' . $this->field_attributes() . $checked . '/>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
61
+ echo '<span>' . esc_html( $option['text'] ) . '</p>';
62
  echo '</div>';
63
 
64
  }
68
 
69
  echo '<div class="clear"></div>';
70
 
71
+ echo wp_kses_post( $this->field_after() );
72
 
73
  }
74
 
75
+ /**
76
+ * Field output
77
+ *
78
+ * @return statement
79
+ */
80
  public function output() {
81
 
82
  $output = '';
84
  $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
85
  $elements = ( is_array( $this->field['output'] ) ) ? join( ',', $this->field['output'] ) : $this->field['output'];
86
 
87
+ if ( ! empty( $elements ) && isset( $this->value ) && '' !== $this->value ) {
88
  $output = $elements . '{background-image:url(' . $this->value . ')' . $important . ';}';
89
  }
90
 
admin/views/wpcfree-metabox/fields/image_sizes/image_sizes.php CHANGED
@@ -1,19 +1,34 @@
1
  <?php if ( ! defined( 'ABSPATH' ) ) {
2
  die; } // Cannot access directly.
3
- /**
4
- *
5
- * Field: Image sizes.
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
  if ( ! class_exists( 'SP_WPCF_Field_image_sizes' ) ) {
 
 
 
 
 
 
 
11
  class SP_WPCF_Field_image_sizes 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(
@@ -27,7 +42,7 @@ if ( ! class_exists( 'SP_WPCF_Field_image_sizes' ) ) {
27
 
28
  $this->value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
29
 
30
- echo $this->field_before();
31
 
32
  // Get the image sizes.
33
  global $_wp_additional_image_sizes;
@@ -62,18 +77,18 @@ if ( ! class_exists( 'SP_WPCF_Field_image_sizes' ) ) {
62
  $multiple_name = ( $args['multiple'] ) ? '[]' : '';
63
  $multiple_attr = ( $args['multiple'] ) ? ' multiple="multiple"' : '';
64
  $chosen_rtl = ( is_rtl() ) ? ' chosen-rtl' : '';
65
- $chosen_attr = ( $args['chosen'] ) ? ' class="spf-chosen' . $chosen_rtl . '"' : '';
66
  $placeholder_attr = ( $args['chosen'] && $args['placeholder'] ) ? ' data-placeholder="' . $args['placeholder'] . '"' : '';
67
 
68
  if ( ! empty( $sizes ) ) {
69
-
70
- echo '<select name="' . $this->field_name( $multiple_name ) . '"' . $multiple_attr . $chosen_attr . $placeholder_attr . $this->field_attributes() . '>';
71
 
72
  if ( $args['placeholder'] && empty( $args['multiple'] ) ) {
73
  if ( ! empty( $args['chosen'] ) ) {
74
  echo '<option value=""></option>';
75
  } else {
76
- echo '<option value="">' . $args['placeholder'] . '</option>';
77
  }
78
  }
79
 
@@ -81,18 +96,17 @@ if ( ! class_exists( 'SP_WPCF_Field_image_sizes' ) ) {
81
 
82
  if ( is_array( $option ) && ! empty( $option ) ) {
83
 
84
- echo '<optgroup label="' . $option_key . '">';
85
 
86
  foreach ( $option as $sub_key => $sub_value ) {
87
  $selected = ( in_array( $sub_key, $this->value ) ) ? ' selected' : '';
88
- echo '<option value="' . $sub_key . '" ' . $selected . '>' . $sub_value . '</option>';
89
  }
90
-
91
  echo '</optgroup>';
92
 
93
  } else {
94
  $selected = ( in_array( $option_key, $this->value ) ) ? ' selected' : '';
95
- echo '<option value="' . $option_key . '" ' . $selected . '>' . $option . '</option>';
96
  }
97
  }
98
  echo '<option disabled value="custom">Set custom size (Pro)</option>';
@@ -100,12 +114,12 @@ if ( ! class_exists( 'SP_WPCF_Field_image_sizes' ) ) {
100
 
101
  } else {
102
 
103
- echo ( ! empty( $this->field['empty_message'] ) ) ? $this->field['empty_message'] : esc_html__( 'No image sizes found.', 'wp-carousel-free' );
104
 
105
  }
106
  }
107
 
108
- echo $this->field_after();
109
 
110
  }
111
 
1
  <?php if ( ! defined( 'ABSPATH' ) ) {
2
  die; } // Cannot access directly.
3
+
 
 
 
 
 
 
4
  if ( ! class_exists( 'SP_WPCF_Field_image_sizes' ) ) {
5
+ /**
6
+ *
7
+ * Field: Image sizes.
8
+ *
9
+ * @since 1.0.0
10
+ * @version 1.0.0
11
+ */
12
  class SP_WPCF_Field_image_sizes extends SP_WPCF_Fields {
13
 
14
+ /**
15
+ * Image sizes field constructor.
16
+ *
17
+ * @param array $field The field type.
18
+ * @param string $value The values of the field.
19
+ * @param string $unique The unique ID for the field.
20
+ * @param string $where To where show the output CSS.
21
+ * @param string $parent The parent args.
22
+ */
23
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
24
  parent::__construct( $field, $value, $unique, $where, $parent );
25
  }
26
 
27
+ /**
28
+ * Render field
29
+ *
30
+ * @return void
31
+ */
32
  public function render() {
33
 
34
  $args = wp_parse_args(
42
 
43
  $this->value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
44
 
45
+ echo wp_kses_post( $this->field_before() );
46
 
47
  // Get the image sizes.
48
  global $_wp_additional_image_sizes;
77
  $multiple_name = ( $args['multiple'] ) ? '[]' : '';
78
  $multiple_attr = ( $args['multiple'] ) ? ' multiple="multiple"' : '';
79
  $chosen_rtl = ( is_rtl() ) ? ' chosen-rtl' : '';
80
+ $chosen_attr = ( $args['chosen'] ) ? ' class="spf-chosen' . esc_attr( $chosen_rtl ) . '"' : '';
81
  $placeholder_attr = ( $args['chosen'] && $args['placeholder'] ) ? ' data-placeholder="' . $args['placeholder'] . '"' : '';
82
 
83
  if ( ! empty( $sizes ) ) {
84
+ // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
85
+ echo '<select name="' . esc_attr( $this->field_name( $multiple_name ) ) . '"' . $multiple_attr . $chosen_attr . $placeholder_attr . $this->field_attributes() . '>';
86
 
87
  if ( $args['placeholder'] && empty( $args['multiple'] ) ) {
88
  if ( ! empty( $args['chosen'] ) ) {
89
  echo '<option value=""></option>';
90
  } else {
91
+ echo '<option value="">' . esc_html( $args['placeholder'] ) . '</option>';
92
  }
93
  }
94
 
96
 
97
  if ( is_array( $option ) && ! empty( $option ) ) {
98
 
99
+ echo '<optgroup label="' . esc_html( $option_key ) . '">';
100
 
101
  foreach ( $option as $sub_key => $sub_value ) {
102
  $selected = ( in_array( $sub_key, $this->value ) ) ? ' selected' : '';
103
+ echo '<option value="' . esc_attr( $sub_key ) . '" ' . esc_attr( $selected ) . '>' . esc_html( $sub_value ) . '</option>';
104
  }
 
105
  echo '</optgroup>';
106
 
107
  } else {
108
  $selected = ( in_array( $option_key, $this->value ) ) ? ' selected' : '';
109
+ echo '<option value="' . esc_attr( $option_key ) . '" ' . esc_attr( $selected ) . '>' . esc_html( $option ) . '</option>';
110
  }
111
  }
112
  echo '<option disabled value="custom">Set custom size (Pro)</option>';
114
 
115
  } else {
116
 
117
+ echo ! empty( $this->field['empty_message'] ) ? esc_html( $this->field['empty_message'] ) : esc_html__( 'No image sizes found.', 'wp-carousel-free' );
118
 
119
  }
120
  }
121
 
122
+ echo wp_kses_post( $this->field_after() );
123
 
124
  }
125
 
admin/views/wpcfree-metabox/fields/index.php CHANGED
@@ -1 +1 @@
1
- <?php // Silence is golden.
1
+ <?php /* Silence is golden. */
admin/views/wpcfree-metabox/fields/media/media.php CHANGED
@@ -1,83 +1,101 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
- /**
3
- *
4
- * Field: media
5
- *
6
- * @since 1.0.0
7
- * @version 1.0.0
8
- *
9
- */
10
- if( ! class_exists( 'SP_WPCF_Field_media' ) ) {
11
- class SP_WPCF_Field_media 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
- 'url' => true,
21
- 'preview' => true,
22
- 'library' => array(),
23
- 'button_title' => esc_html__( 'Upload', 'wp-carousel-free' ),
24
- 'remove_title' => esc_html__( 'Remove', 'wp-carousel-free' ),
25
- 'preview_size' => 'thumbnail',
26
- ) );
 
 
 
 
27
 
28
- $default_values = array(
29
- 'url' => '',
30
- 'id' => '',
31
- 'width' => '',
32
- 'height' => '',
33
- 'thumbnail' => '',
34
- 'alt' => '',
35
- 'title' => '',
36
- 'description' => ''
37
- );
 
 
 
 
 
 
 
38
 
39
- // fallback
40
- if( is_numeric( $this->value ) ) {
41
- $this->value = array(
42
- 'id' => $this->value,
43
- 'url' => wp_get_attachment_url( $this->value ),
44
- 'thumbnail' => wp_get_attachment_image_src( $this->value, 'thumbnail', true )[0],
45
- );
46
- }
47
- $this->value = wp_parse_args( $this->value, $default_values );
 
48
 
49
- $library = ( is_array( $args['library'] ) ) ? $args['library'] : array_filter( (array) $args['library'] );
50
- $library = ( ! empty( $library ) ) ? implode(',', $library ) : '';
51
- $preview_src = ( $args['preview_size'] !== 'thumbnail' ) ? $this->value['url'] : $this->value['thumbnail'];
52
- $hidden_url = ( empty( $args['url'] ) ) ? ' hidden' : '';
53
- $hidden_auto = ( empty( $this->value['url'] ) ) ? ' hidden' : '';
54
- $placeholder = ( empty( $this->field['placeholder'] ) ) ? ' placeholder="'. esc_html__( 'No media selected', 'wp-carousel-free' ) .'"' : '';
 
 
 
55
 
56
- echo $this->field_before();
 
 
 
 
 
57
 
58
- if( ! empty( $args['preview'] ) ) {
59
- echo '<div class="spf--preview'. $hidden_auto .'">';
60
- echo '<div class="spf-image-preview"><a href="#" class="spf--remove fa fa-times"></a><img src="'. $preview_src .'" class="spf--src" alt=""/></div>';
61
- echo '</div>';
62
- }
63
 
64
- echo '<div class="spf--placeholder">';
65
- echo '<input type="text" name="'. $this->field_name('[url]') .'" value="'. $this->value['url'] .'" class="spf--url'. $hidden_url .'" readonly="readonly"'. $this->field_attributes() . $placeholder .' />';
66
- echo '<a href="#" class="button button-primary spf--button" data-library="'. esc_attr( $library ) .'" data-preview-size="'. esc_attr( $args['preview_size'] ) .'">'. $args['button_title'] .'</a>';
67
- echo ( empty( $args['preview'] ) ) ? '<a href="#" class="button button-secondary spf-warning-primary spf--remove'. $hidden_auto .'">'. $args['remove_title'] .'</a>' : '';
68
- echo '</div>';
69
 
70
- echo '<input type="hidden" name="'. $this->field_name('[id]') .'" value="'. $this->value['id'] .'" class="spf--id"/>';
71
- echo '<input type="hidden" name="'. $this->field_name('[width]') .'" value="'. $this->value['width'] .'" class="spf--width"/>';
72
- echo '<input type="hidden" name="'. $this->field_name('[height]') .'" value="'. $this->value['height'] .'" class="spf--height"/>';
73
- echo '<input type="hidden" name="'. $this->field_name('[thumbnail]') .'" value="'. $this->value['thumbnail'] .'" class="spf--thumbnail"/>';
74
- echo '<input type="hidden" name="'. $this->field_name('[alt]') .'" value="'. $this->value['alt'] .'" class="spf--alt"/>';
75
- echo '<input type="hidden" name="'. $this->field_name('[title]') .'" value="'. $this->value['title'] .'" class="spf--title"/>';
76
- echo '<input type="hidden" name="'. $this->field_name('[description]') .'" value="'. $this->value['description'] .'" class="spf--description"/>';
77
 
78
- echo $this->field_after();
 
 
 
 
 
 
79
 
80
- }
81
 
82
- }
 
 
83
  }
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
 
 
 
 
 
 
 
 
 
3
 
4
+ if ( ! class_exists( 'SP_WPCF_Field_media' ) ) {
 
 
5
 
6
+ /**
7
+ *
8
+ * Field: media
9
+ *
10
+ * @since 1.0.0
11
+ * @version 1.0.0
12
+ */
13
+ class SP_WPCF_Field_media extends SP_WPCF_Fields {
14
 
15
+ /**
16
+ * Gallery field constructor.
17
+ *
18
+ * @param array $field The field type.
19
+ * @param string $value The values of the field.
20
+ * @param string $unique The unique ID for the field.
21
+ * @param string $where To where show the output CSS.
22
+ * @param string $parent The parent args.
23
+ */
24
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
25
+ parent::__construct( $field, $value, $unique, $where, $parent );
26
+ }
27
 
28
+ /**
29
+ * Render field
30
+ *
31
+ * @return void
32
+ */
33
+ public function render() {
34
+ $args = wp_parse_args(
35
+ $this->field,
36
+ array(
37
+ 'url' => true,
38
+ 'preview' => true,
39
+ 'library' => array(),
40
+ 'button_title' => esc_html__( 'Upload', 'wp-carousel-free' ),
41
+ 'remove_title' => esc_html__( 'Remove', 'wp-carousel-free' ),
42
+ 'preview_size' => 'thumbnail',
43
+ )
44
+ );
45
 
46
+ $default_values = array(
47
+ 'url' => '',
48
+ 'id' => '',
49
+ 'width' => '',
50
+ 'height' => '',
51
+ 'thumbnail' => '',
52
+ 'alt' => '',
53
+ 'title' => '',
54
+ 'description' => '',
55
+ );
56
 
57
+ // fallback.
58
+ if ( is_numeric( $this->value ) ) {
59
+ $this->value = array(
60
+ 'id' => $this->value,
61
+ 'url' => wp_get_attachment_url( $this->value ),
62
+ 'thumbnail' => wp_get_attachment_image_src( $this->value, 'thumbnail', true )[0],
63
+ );
64
+ }
65
+ $this->value = wp_parse_args( $this->value, $default_values );
66
 
67
+ $library = ( is_array( $args['library'] ) ) ? $args['library'] : array_filter( (array) $args['library'] );
68
+ $library = ( ! empty( $library ) ) ? implode( ',', $library ) : '';
69
+ $preview_src = ( 'thumbnail' !== $args['preview_size'] ) ? $this->value['url'] : $this->value['thumbnail'];
70
+ $hidden_url = ( empty( $args['url'] ) ) ? ' hidden' : '';
71
+ $hidden_auto = ( empty( $this->value['url'] ) ) ? ' hidden' : '';
72
+ $placeholder = ( empty( $this->field['placeholder'] ) ) ? ' placeholder="' . esc_html__( 'No media selected', 'wp-carousel-free' ) . '"' : '';
73
 
74
+ echo wp_kses_post( $this->field_before() );
 
 
 
 
75
 
76
+ if ( ! empty( $args['preview'] ) ) {
77
+ echo '<div class="spf--preview' . esc_attr( $hidden_auto ) . '">';
78
+ echo '<div class="spf-image-preview"><a href="#" class="spf--remove fa fa-times"></a><img src="' . esc_url( $preview_src ) . '" class="spf--src" alt=""/></div>';
79
+ echo '</div>';
80
+ }
81
 
82
+ echo '<div class="spf--placeholder">';
83
+ echo '<input type="text" name="' . $this->field_name( '[url]' ) . '" value="' . $this->value['url'] . '" class="spf--url' . $hidden_url . '" readonly="readonly"' . $this->field_attributes() . $placeholder . ' />';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
84
+ echo wp_kses_post( '<a href="#" class="button button-primary spf--button" data-library="' . esc_attr( $library ) . '" data-preview-size="' . esc_attr( $args['preview_size'] ) . '">' . $args['button_title'] . '</a>' );
85
+ echo ( empty( $args['preview'] ) ) ? wp_kses_post( '<a href="#" class="button button-secondary spf-warning-primary spf--remove' . $hidden_auto . '">' . $args['remove_title'] . '</a>' ) : '';
86
+ echo '</div>';
 
 
87
 
88
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name( '[id]' ) ) . '" value="' . esc_attr( $this->value['id'] ) . '" class="spf--id"/>';
89
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name( '[width]' ) ) . '" value="' . esc_attr( $this->value['width'] ) . '" class="spf--width"/>';
90
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name( '[height]' ) ) . '" value="' . esc_attr( $this->value['height'] ) . '" class="spf--height"/>';
91
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name( '[thumbnail]' ) ) . '" value="' . esc_attr( $this->value['thumbnail'] ) . '" class="spf--thumbnail"/>';
92
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name( '[alt]' ) ) . '" value="' . esc_attr( $this->value['alt'] ) . '" class="spf--alt"/>';
93
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name( '[title]' ) ) . '" value="' . esc_attr( $this->value['title'] ) . '" class="spf--title"/>';
94
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name( '[description]' ) ) . '" value="' . esc_attr( $this->value['description'] ) . '" class="spf--description"/>';
95
 
96
+ echo wp_kses_post( $this->field_after() );
97
 
98
+ }
99
+
100
+ }
101
  }
admin/views/wpcfree-metabox/fields/notice/notice.php CHANGED
@@ -10,15 +10,29 @@
10
  if ( ! class_exists( 'SP_WPCF_Field_notice' ) ) {
11
  class SP_WPCF_Field_notice 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
  $style = ( ! empty( $this->field['style'] ) ) ? $this->field['style'] : 'normal';
20
 
21
- echo ( ! empty( $this->field['content'] ) ) ? '<div class="spf-notice spf-notice-' . $style . '">' . $this->field['content'] . '</div>' : '';
22
 
23
  }
24
 
10
  if ( ! class_exists( 'SP_WPCF_Field_notice' ) ) {
11
  class SP_WPCF_Field_notice extends SP_WPCF_Fields {
12
 
13
+ /**
14
+ * Notice field constructor.
15
+ *
16
+ * @param array $field The field type.
17
+ * @param string $value The values of the field.
18
+ * @param string $unique The unique ID for the field.
19
+ * @param string $where To where show the output CSS.
20
+ * @param string $parent The parent args.
21
+ */
22
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
23
  parent::__construct( $field, $value, $unique, $where, $parent );
24
  }
25
 
26
+ /**
27
+ * Render field
28
+ *
29
+ * @return void
30
+ */
31
  public function render() {
32
 
33
  $style = ( ! empty( $this->field['style'] ) ) ? $this->field['style'] : 'normal';
34
 
35
+ echo ( ! empty( $this->field['content'] ) ) ? '<div class="spf-notice spf-notice-' . esc_attr( $style ) . '">' . wp_kses_post( $this->field['content'] ) . '</div>' : '';
36
 
37
  }
38
 
admin/views/wpcfree-metabox/fields/radio/radio.php CHANGED
@@ -10,10 +10,24 @@
10
  if ( ! class_exists( 'SP_WPCF_Field_radio' ) ) {
11
  class SP_WPCF_Field_radio 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(
@@ -25,7 +39,7 @@ if ( ! class_exists( 'SP_WPCF_Field_radio' ) ) {
25
 
26
  $inline_class = ( $args['inline'] ) ? ' class="spf--inline-list"' : '';
27
 
28
- echo $this->field_before();
29
 
30
  if ( isset( $this->field['options'] ) ) {
31
 
@@ -37,21 +51,20 @@ if ( ! class_exists( 'SP_WPCF_Field_radio' ) ) {
37
  echo '<ul' . $inline_class . '>';
38
  foreach ( $options as $option_key => $option_value ) {
39
  $checked = ( $option_key === $this->value ) ? ' checked' : '';
40
- echo '<li><label><input type="radio" name="' . $this->field_name() . '" value="' . $option_key . '"' . $this->field_attributes() . $checked . '/> ' . $option_value . '</label></li>';
41
  }
42
  echo '</ul>';
43
 
44
  } else {
45
 
46
- echo ( ! empty( $this->field['empty_message'] ) ) ? $this->field['empty_message'] : esc_html__( 'No data provided for this option type.', 'wp-carousel-free' );
47
-
48
  }
49
  } else {
50
- $label = ( isset( $this->field['label'] ) ) ? $this->field['label'] : '';
51
- echo '<label><input type="radio" name="' . $this->field_name() . '" value="1"' . $this->field_attributes() . checked( $this->value, 1, false ) . '/> ' . $label . '</label>';
52
  }
53
 
54
- echo $this->field_after();
55
 
56
  }
57
 
10
  if ( ! class_exists( 'SP_WPCF_Field_radio' ) ) {
11
  class SP_WPCF_Field_radio extends SP_WPCF_Fields {
12
 
13
+ /**
14
+ * Radio field constructor.
15
+ *
16
+ * @param array $field The field type.
17
+ * @param string $value The values of the field.
18
+ * @param string $unique The unique ID for the field.
19
+ * @param string $where To where show the output CSS.
20
+ * @param string $parent The parent args.
21
+ */
22
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
23
  parent::__construct( $field, $value, $unique, $where, $parent );
24
  }
25
 
26
+ /**
27
+ * Render field
28
+ *
29
+ * @return void
30
+ */
31
  public function render() {
32
 
33
  $args = wp_parse_args(
39
 
40
  $inline_class = ( $args['inline'] ) ? ' class="spf--inline-list"' : '';
41
 
42
+ echo wp_kses_post( $this->field_before() );
43
 
44
  if ( isset( $this->field['options'] ) ) {
45
 
51
  echo '<ul' . $inline_class . '>';
52
  foreach ( $options as $option_key => $option_value ) {
53
  $checked = ( $option_key === $this->value ) ? ' checked' : '';
54
+ echo '<li><label><input type="radio" name="' . esc_attr( $this->field_name() ) . '" value="' . esc_attr( $option_key ) . '"' . $this->field_attributes() . $checked . '/> ' . esc_html( $option_value ) . '</label></li>';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
55
  }
56
  echo '</ul>';
57
 
58
  } else {
59
 
60
+ echo ! empty( $this->field['empty_message'] ) ? wp_kses_post( $this->field['empty_message'] ) : esc_html__( 'No data provided for this option type.', 'wp-carousel-free' );
 
61
  }
62
  } else {
63
+ $label = ( isset( $this->field['label'] ) ) ? $this->field['label'] : '';
64
+ echo '<label><input type="radio" name="' . esc_attr( $this->field_name() ) . '" value="1"' . $this->field_attributes() . checked( $this->value, 1, false ) . '/> ' . esc_html( $label ) . '</label>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
65
  }
66
 
67
+ echo wp_kses_post( $this->field_after() );
68
 
69
  }
70
 
admin/views/wpcfree-metabox/fields/select/select.php CHANGED
@@ -10,10 +10,24 @@
10
  if ( ! class_exists( 'SP_WPCF_Field_select' ) ) {
11
  class SP_WPCF_Field_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(
@@ -27,7 +41,7 @@ if ( ! class_exists( 'SP_WPCF_Field_select' ) ) {
27
 
28
  $this->value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
29
 
30
- echo $this->field_before();
31
 
32
  if ( ! empty( $this->field['options'] ) ) {
33
 
@@ -46,7 +60,7 @@ if ( ! class_exists( 'SP_WPCF_Field_select' ) ) {
46
  if ( ! empty( $args['chosen'] ) ) {
47
  echo '<option value=""></option>';
48
  } else {
49
- echo '<option value="">' . $args['placeholder'] . '</option>';
50
  }
51
  }
52
 
@@ -54,18 +68,17 @@ if ( ! class_exists( 'SP_WPCF_Field_select' ) ) {
54
 
55
  if ( is_array( $option ) && ! empty( $option ) ) {
56
 
57
- echo '<optgroup label="' . $option_key . '">';
58
 
59
  foreach ( $option as $sub_key => $sub_value ) {
60
  $selected = ( in_array( $sub_key, $this->value ) ) ? ' selected' : '';
61
- echo '<option value="' . $sub_key . '" ' . $selected . '>' . $sub_value . '</option>';
62
  }
63
-
64
  echo '</optgroup>';
65
 
66
  } else {
67
  $selected = ( in_array( $option_key, $this->value ) ) ? ' selected' : '';
68
- echo '<option value="' . $option_key . '" ' . $selected . '>' . $option . '</option>';
69
  }
70
  }
71
 
@@ -73,12 +86,12 @@ if ( ! class_exists( 'SP_WPCF_Field_select' ) ) {
73
 
74
  } else {
75
 
76
- echo ( ! empty( $this->field['empty_message'] ) ) ? $this->field['empty_message'] : esc_html__( 'No data provided for this option type.', 'wp-carousel-free' );
77
 
78
  }
79
  }
80
 
81
- echo $this->field_after();
82
 
83
  }
84
 
10
  if ( ! class_exists( 'SP_WPCF_Field_select' ) ) {
11
  class SP_WPCF_Field_select extends SP_WPCF_Fields {
12
 
13
+ /**
14
+ * Select field constructor.
15
+ *
16
+ * @param array $field The field type.
17
+ * @param string $value The values of the field.
18
+ * @param string $unique The unique ID for the field.
19
+ * @param string $where To where show the output CSS.
20
+ * @param string $parent The parent args.
21
+ */
22
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
23
  parent::__construct( $field, $value, $unique, $where, $parent );
24
  }
25
 
26
+ /**
27
+ * Render field
28
+ *
29
+ * @return void
30
+ */
31
  public function render() {
32
 
33
  $args = wp_parse_args(
41
 
42
  $this->value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
43
 
44
+ echo wp_kses_post( $this->field_before() );
45
 
46
  if ( ! empty( $this->field['options'] ) ) {
47
 
60
  if ( ! empty( $args['chosen'] ) ) {
61
  echo '<option value=""></option>';
62
  } else {
63
+ echo '<option value="">' . esc_html( $args['placeholder'] ) . '</option>';
64
  }
65
  }
66
 
68
 
69
  if ( is_array( $option ) && ! empty( $option ) ) {
70
 
71
+ echo '<optgroup label="' . esc_attr( $option_key ) . '">';
72
 
73
  foreach ( $option as $sub_key => $sub_value ) {
74
  $selected = ( in_array( $sub_key, $this->value ) ) ? ' selected' : '';
75
+ echo '<option value="' . esc_attr( $sub_key ) . '" ' . esc_attr( $selected ) . '>' . esc_html( $sub_value ) . '</option>';
76
  }
 
77
  echo '</optgroup>';
78
 
79
  } else {
80
  $selected = ( in_array( $option_key, $this->value ) ) ? ' selected' : '';
81
+ echo '<option value="' . esc_attr( $option_key ) . '" ' . esc_attr( $selected ) . '>' . esc_html( $option ) . '</option>';
82
  }
83
  }
84
 
86
 
87
  } else {
88
 
89
+ echo ! empty( $this->field['empty_message'] ) ? wp_kses_post( $this->field['empty_message'] ) : esc_html__( 'No data provided for this option type.', 'wp-carousel-free' );
90
 
91
  }
92
  }
93
 
94
+ echo wp_kses_post( $this->field_after() );
95
 
96
  }
97
 
admin/views/wpcfree-metabox/fields/selectf/selectf.php CHANGED
@@ -10,10 +10,24 @@
10
  if ( ! class_exists( 'SP_WPCF_Field_selectf' ) ) {
11
  class SP_WPCF_Field_selectf 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(
@@ -27,7 +41,7 @@ if ( ! class_exists( 'SP_WPCF_Field_selectf' ) ) {
27
 
28
  $this->value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
29
 
30
- echo $this->field_before();
31
 
32
  if ( ! empty( $this->field['options'] ) ) {
33
 
@@ -46,27 +60,26 @@ if ( ! class_exists( 'SP_WPCF_Field_selectf' ) ) {
46
  if ( ! empty( $args['chosen'] ) ) {
47
  echo '<option value=""></option>';
48
  } else {
49
- echo '<option value="">' . $args['placeholder'] . '</option>';
50
  }
51
  }
52
 
53
  foreach ( $options as $option_key => $option ) {
54
  $pro_only_value = isset( $option['pro_only'] ) ? $option['pro_only'] : '';
55
- $pro_only = true == $pro_only_value ? ' disabled' : '';
56
  $selected = ( in_array( $option_key, $this->value ) ) ? ' selected' : '';
57
- echo '<option' . $pro_only . ' value="' . $option_key . '" ' . $selected . '>' . $option['text'] . '</option>';
58
  }
59
 
60
  echo '</select>';
61
 
62
  } else {
63
 
64
- echo ( ! empty( $this->field['empty_message'] ) ) ? $this->field['empty_message'] : esc_html__( 'No data provided for this option type.', 'wp-carousel-free' );
65
-
66
  }
67
  }
68
 
69
- echo $this->field_after();
70
 
71
  }
72
 
10
  if ( ! class_exists( 'SP_WPCF_Field_selectf' ) ) {
11
  class SP_WPCF_Field_selectf extends SP_WPCF_Fields {
12
 
13
+ /**
14
+ * Selectf field constructor.
15
+ *
16
+ * @param array $field The field type.
17
+ * @param string $value The values of the field.
18
+ * @param string $unique The unique ID for the field.
19
+ * @param string $where To where show the output CSS.
20
+ * @param string $parent The parent args.
21
+ */
22
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
23
  parent::__construct( $field, $value, $unique, $where, $parent );
24
  }
25
 
26
+ /**
27
+ * Render field
28
+ *
29
+ * @return void
30
+ */
31
  public function render() {
32
 
33
  $args = wp_parse_args(
41
 
42
  $this->value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
43
 
44
+ echo wp_kses_post( $this->field_before() );
45
 
46
  if ( ! empty( $this->field['options'] ) ) {
47
 
60
  if ( ! empty( $args['chosen'] ) ) {
61
  echo '<option value=""></option>';
62
  } else {
63
+ echo '<option value="">' . esc_html( $args['placeholder'] ) . '</option>';
64
  }
65
  }
66
 
67
  foreach ( $options as $option_key => $option ) {
68
  $pro_only_value = isset( $option['pro_only'] ) ? $option['pro_only'] : '';
69
+ $pro_only = $pro_only_value ? ' disabled' : '';
70
  $selected = ( in_array( $option_key, $this->value ) ) ? ' selected' : '';
71
+ echo '<option' . esc_attr( $pro_only ) . ' value="' . esc_attr( $option_key ) . '" ' . esc_attr( $selected ) . '>' . esc_html( $option['text'] ) . '</option>';
72
  }
73
 
74
  echo '</select>';
75
 
76
  } else {
77
 
78
+ echo ! empty( $this->field['empty_message'] ) ? esc_html( $this->field['empty_message'] ) : esc_html__( 'No data provided for this option type.', 'wp-carousel-free' );
 
79
  }
80
  }
81
 
82
+ echo wp_kses_post( $this->field_after() );
83
 
84
  }
85
 
admin/views/wpcfree-metabox/fields/shortcode/shortcode.php CHANGED
@@ -10,16 +10,30 @@
10
  if ( ! class_exists( 'SP_WPCF_Field_shortcode' ) ) {
11
  class SP_WPCF_Field_shortcode 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
  // Get the Post ID.
20
  $post_id = get_the_ID();
21
 
22
- echo ( ! empty( $post_id ) ) ? '<div class="wpcp-scode-wrap"><span class="wpcp-sc-title">Shortcode:</span><span class="wpcp-shortcode-selectable">[sp_wpcarousel id="' . $post_id . '"]</span></div><div class="wpcp-scode-wrap"><span class="wpcp-sc-title">Template Include:</span><span class="wpcp-shortcode-selectable">&lt;?php echo do_shortcode(\'[sp_wpcarousel id="' . $post_id . '"]\'); ?&gt;</span></div><div class="spwpc-after-copy-text"><i class="fa fa-check-circle"></i> Shortcode Copied to Clipboard! </div>' : '';
23
  }
24
 
25
  }
10
  if ( ! class_exists( 'SP_WPCF_Field_shortcode' ) ) {
11
  class SP_WPCF_Field_shortcode extends SP_WPCF_Fields {
12
 
13
+ /**
14
+ * Shortcode field constructor.
15
+ *
16
+ * @param array $field The field type.
17
+ * @param string $value The values of the field.
18
+ * @param string $unique The unique ID for the field.
19
+ * @param string $where To where show the output CSS.
20
+ * @param string $parent The parent args.
21
+ */
22
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
23
  parent::__construct( $field, $value, $unique, $where, $parent );
24
  }
25
 
26
+ /**
27
+ * Render field
28
+ *
29
+ * @return void
30
+ */
31
  public function render() {
32
 
33
  // Get the Post ID.
34
  $post_id = get_the_ID();
35
 
36
+ echo ( ! empty( $post_id ) ) ? '<div class="wpcp-scode-wrap"><span class="wpcp-sc-title">Shortcode:</span><span class="wpcp-shortcode-selectable">[sp_wpcarousel id="' . esc_attr( $post_id ) . '"]</span></div><div class="wpcp-scode-wrap"><span class="wpcp-sc-title">Template Include:</span><span class="wpcp-shortcode-selectable">&lt;?php echo do_shortcode(\'[sp_wpcarousel id="' . esc_attr( $post_id ). '"]\'); ?&gt;</span></div><div class="spwpc-after-copy-text"><i class="fa fa-check-circle"></i> Shortcode Copied to Clipboard! </div>' : '';
37
  }
38
 
39
  }
admin/views/wpcfree-metabox/fields/spacing/spacing.php CHANGED
@@ -23,8 +23,9 @@ if ( ! class_exists( 'SP_WPCF_Field_spacing' ) ) {
23
  parent::__construct( $field, $value, $unique, $where, $parent );
24
  }
25
 
 
26
  /**
27
- * Function to render the field.
28
  *
29
  * @return void
30
  */
@@ -61,12 +62,12 @@ if ( ! class_exists( 'SP_WPCF_Field_spacing' ) ) {
61
  'left' => '',
62
  'all' => '',
63
  'unit' => 'px',
64
- 'min' => '',
65
  );
66
 
67
  $value = wp_parse_args( $this->value, $default_values );
68
 
69
- echo $this->field_before();
70
 
71
  $min = ( isset( $args['min'] ) ) ? ' min="' . $args['min'] . '"' : '';
72
  if ( ! empty( $args['all'] ) ) {
@@ -74,9 +75,9 @@ if ( ! class_exists( 'SP_WPCF_Field_spacing' ) ) {
74
  $placeholder = ( ! empty( $args['all_placeholder'] ) ) ? ' placeholder="' . $args['all_placeholder'] . '"' : '';
75
 
76
  echo '<div class="spf--input">';
77
- echo ( ! empty( $args['all_text'] ) ) ? '<span class="spf--label spf--label-icon">' . $args['all_text'] . '</span>' : '';
78
  echo '<input type="number" name="' . $this->field_name( '[all]' ) . '" value="' . $value['all'] . '"' . $placeholder . $min . ' class="spf-number" />';
79
- echo ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--label-unit">' . $args['units'][0] . '</span>' : '';
80
  echo '</div>';
81
 
82
  } else {
@@ -89,36 +90,41 @@ if ( ! class_exists( 'SP_WPCF_Field_spacing' ) ) {
89
  }
90
  }
91
 
92
- $properties = ( $properties === array( 'right', 'left' ) ) ? array_reverse( $properties ) : $properties;
93
 
94
  foreach ( $properties as $property ) {
95
 
96
- $placeholder = ( ! empty( $args[ $property . '_placeholder' ] ) ) ? ' placeholder="' . $args[ $property . '_placeholder' ] . '"' : '';
97
 
98
  echo '<div class="spf--input">';
99
- echo ( ! empty( $args[ $property . '_icon' ] ) ) ? '<span class="spf--label spf--label-icon">' . $args[ $property . '_icon' ] . '</span>' : '';
100
- echo '<input type="number" name="' . $this->field_name( '[' . $property . ']' ) . '" value="' . $value[ $property ] . '"' . $placeholder . $min . ' class="spf-number" />';
101
- echo ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--label-unit">' . $args['units'][0] . '</span>' : '';
102
  echo '</div>';
103
 
104
  }
105
  }
106
 
107
  if ( ! empty( $args['unit'] ) && count( $args['units'] ) > 1 ) {
108
- echo '<select name="' . $this->field_name( '[unit]' ) . '">';
109
  foreach ( $args['units'] as $unit ) {
110
  $selected = ( $value['unit'] === $unit ) ? ' selected' : '';
111
- echo '<option value="' . $unit . '"' . $selected . '>' . $unit . '</option>';
112
  }
113
  echo '</select>';
114
  }
115
 
116
  echo '<div class="clear"></div>';
117
 
118
- echo $this->field_after();
119
 
120
  }
121
 
 
 
 
 
 
122
  public function output() {
123
 
124
  $output = '';
@@ -127,10 +133,10 @@ if ( ! class_exists( 'SP_WPCF_Field_spacing' ) ) {
127
  $unit = ( ! empty( $this->value['unit'] ) ) ? $this->value['unit'] : 'px';
128
 
129
  $mode = ( ! empty( $this->field['output_mode'] ) ) ? $this->field['output_mode'] : 'padding';
130
- $mode = ( $mode === 'relative' || $mode === 'absolute' || $mode === 'none' ) ? '' : $mode;
131
  $mode = ( ! empty( $mode ) ) ? $mode . '-' : '';
132
 
133
- if ( ! empty( $this->field['all'] ) && isset( $this->value['all'] ) && $this->value['all'] !== '' ) {
134
 
135
  $output = $element . '{';
136
  $output .= $mode . 'top:' . $this->value['all'] . $unit . $important . ';';
@@ -140,13 +146,12 @@ if ( ! class_exists( 'SP_WPCF_Field_spacing' ) ) {
140
  $output .= '}';
141
 
142
  } else {
 
 
 
 
143
 
144
- $top = ( isset( $this->value['top'] ) && $this->value['top'] !== '' ) ? $mode . 'top:' . $this->value['top'] . $unit . $important . ';' : '';
145
- $right = ( isset( $this->value['right'] ) && $this->value['right'] !== '' ) ? $mode . 'right:' . $this->value['right'] . $unit . $important . ';' : '';
146
- $bottom = ( isset( $this->value['bottom'] ) && $this->value['bottom'] !== '' ) ? $mode . 'bottom:' . $this->value['bottom'] . $unit . $important . ';' : '';
147
- $left = ( isset( $this->value['left'] ) && $this->value['left'] !== '' ) ? $mode . 'left:' . $this->value['left'] . $unit . $important . ';' : '';
148
-
149
- if ( $top !== '' || $right !== '' || $bottom !== '' || $left !== '' ) {
150
  $output = $element . '{' . $top . $right . $bottom . $left . '}';
151
  }
152
  }
23
  parent::__construct( $field, $value, $unique, $where, $parent );
24
  }
25
 
26
+
27
  /**
28
+ * Render field
29
  *
30
  * @return void
31
  */
62
  'left' => '',
63
  'all' => '',
64
  'unit' => 'px',
65
+ 'min' => '',
66
  );
67
 
68
  $value = wp_parse_args( $this->value, $default_values );
69
 
70
+ echo wp_kses_post( $this->field_before() );
71
 
72
  $min = ( isset( $args['min'] ) ) ? ' min="' . $args['min'] . '"' : '';
73
  if ( ! empty( $args['all'] ) ) {
75
  $placeholder = ( ! empty( $args['all_placeholder'] ) ) ? ' placeholder="' . $args['all_placeholder'] . '"' : '';
76
 
77
  echo '<div class="spf--input">';
78
+ echo ( ! empty( $args['all_text'] ) ) ? wp_kses_post( '<span class="spf--label spf--label-icon">' . $args['all_text'] . '</span>' ) : '';
79
  echo '<input type="number" name="' . $this->field_name( '[all]' ) . '" value="' . $value['all'] . '"' . $placeholder . $min . ' class="spf-number" />';
80
+ echo ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--label-unit">' . esc_attr( $args['units'][0] ) . '</span>' : '';
81
  echo '</div>';
82
 
83
  } else {
90
  }
91
  }
92
 
93
+ $properties = ( array( 'right', 'left' ) === $properties ) ? array_reverse( $properties ) : $properties;
94
 
95
  foreach ( $properties as $property ) {
96
 
97
+ $placeholder = ( ! empty( $args[ $property . '_placeholder' ] ) ) ? ' placeholder="' . esc_attr( $args[ $property . '_placeholder' ] ) . '"' : '';
98
 
99
  echo '<div class="spf--input">';
100
+ echo ( ! empty( $args[ $property . '_icon' ] ) ) ? wp_kses_post( '<span class="spf--label spf--label-icon">' . $args[ $property . '_icon' ] . '</span>' ) : '';
101
+ echo '<input type="number" name="' . esc_attr( $this->field_name( '[' . $property . ']' ) ) . '" value="' . esc_attr( $value[ $property ] ) . '"' . $placeholder . $min . ' class="spf-number" />';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
102
+ echo ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--label-unit">' . esc_html( $args['units'][0] ) . '</span>' : '';
103
  echo '</div>';
104
 
105
  }
106
  }
107
 
108
  if ( ! empty( $args['unit'] ) && count( $args['units'] ) > 1 ) {
109
+ echo '<select name="' . esc_attr( $this->field_name( '[unit]' ) ) . '">';
110
  foreach ( $args['units'] as $unit ) {
111
  $selected = ( $value['unit'] === $unit ) ? ' selected' : '';
112
+ echo '<option value="' . esc_attr( $unit ) . '"' . esc_attr( $selected ) . '>' . esc_html( $unit ) . '</option>';
113
  }
114
  echo '</select>';
115
  }
116
 
117
  echo '<div class="clear"></div>';
118
 
119
+ echo wp_kses_post( $this->field_after() );
120
 
121
  }
122
 
123
+ /**
124
+ * Field output
125
+ *
126
+ * @return statement
127
+ */
128
  public function output() {
129
 
130
  $output = '';
133
  $unit = ( ! empty( $this->value['unit'] ) ) ? $this->value['unit'] : 'px';
134
 
135
  $mode = ( ! empty( $this->field['output_mode'] ) ) ? $this->field['output_mode'] : 'padding';
136
+ $mode = ( 'relative' === $mode || 'absolute' === $mode || 'none' === $mode ) ? '' : $mode;
137
  $mode = ( ! empty( $mode ) ) ? $mode . '-' : '';
138
 
139
+ if ( ! empty( $this->field['all'] ) && isset( $this->value['all'] ) && '' !== $this->value['all'] ) {
140
 
141
  $output = $element . '{';
142
  $output .= $mode . 'top:' . $this->value['all'] . $unit . $important . ';';
146
  $output .= '}';
147
 
148
  } else {
149
+ $top = ( isset( $this->value['top'] ) && '' !== $this->value['top'] ) ? $mode . 'top:' . $this->value['top'] . $unit . $important . ';' : '';
150
+ $right = ( isset( $this->value['right'] ) && '' !== $this->value['right'] ) ? $mode . 'right:' . $this->value['right'] . $unit . $important . ';' : '';
151
+ $bottom = ( isset( $this->value['bottom'] ) && '' !== $this->value['bottom'] ) ? $mode . 'bottom:' . $this->value['bottom'] . $unit . $important . ';' : '';
152
+ $left = ( isset( $this->value['left'] ) && '' !== $this->value['left'] ) ? $mode . 'left:' . $this->value['left'] . $unit . $important . ';' : '';
153
 
154
+ if ( '' !== $top || '' !== $right || '' !== $bottom || '' !== $left ) {
 
 
 
 
 
155
  $output = $element . '{' . $top . $right . $bottom . $left . '}';
156
  }
157
  }
admin/views/wpcfree-metabox/fields/spinner/spinner.php CHANGED
@@ -1,19 +1,34 @@
1
  <?php if ( ! defined( 'ABSPATH' ) ) {
2
  die; } // Cannot access directly.
3
- /**
4
- *
5
- * Field: spinner
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
  if ( ! class_exists( 'SP_WPCF_Field_spinner' ) ) {
 
 
 
 
 
 
 
11
  class SP_WPCF_Field_spinner 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(
@@ -26,16 +41,21 @@ if ( ! class_exists( 'SP_WPCF_Field_spinner' ) ) {
26
  )
27
  );
28
 
29
- echo $this->field_before();
30
  echo '<div class="spf--spin">';
31
- echo '<input type="text" name="' . $this->field_name() . '" value="' . $this->value . '"' . $this->field_attributes( array( 'class' => 'spf-number' ) ) . ' data-max="' . $args['max'] . '" data-min="' . $args['min'] . '" data-step="' . $args['step'] . '"/>';
32
- echo ( ! empty( $args['unit'] ) ) ? '<div class="spf--unit">' . $args['unit'] . '</div>' : '';
33
  echo '</div>';
34
  echo '<div class="clear"></div>';
35
- echo $this->field_after();
36
 
37
  }
38
 
 
 
 
 
 
39
  public function enqueue() {
40
 
41
  if ( ! wp_script_is( 'jquery-ui-spinner' ) ) {
@@ -44,6 +64,11 @@ if ( ! class_exists( 'SP_WPCF_Field_spinner' ) ) {
44
 
45
  }
46
 
 
 
 
 
 
47
  public function output() {
48
 
49
  $output = '';
@@ -52,7 +77,7 @@ if ( ! class_exists( 'SP_WPCF_Field_spinner' ) ) {
52
  $mode = ( ! empty( $this->field['output_mode'] ) ) ? $this->field['output_mode'] : 'width';
53
  $unit = ( ! empty( $this->field['unit'] ) ) ? $this->field['unit'] : 'px';
54
 
55
- if ( ! empty( $elements ) && isset( $this->value ) && $this->value !== '' ) {
56
  foreach ( $elements as $key_property => $element ) {
57
  if ( is_numeric( $key_property ) ) {
58
  if ( $mode ) {
1
  <?php if ( ! defined( 'ABSPATH' ) ) {
2
  die; } // Cannot access directly.
3
+
 
 
 
 
 
 
4
  if ( ! class_exists( 'SP_WPCF_Field_spinner' ) ) {
5
+ /**
6
+ *
7
+ * Field: spinner
8
+ *
9
+ * @since 1.0.0
10
+ * @version 1.0.0
11
+ */
12
  class SP_WPCF_Field_spinner extends SP_WPCF_Fields {
13
 
14
+ /**
15
+ * Spinner field constructor.
16
+ *
17
+ * @param array $field The field type.
18
+ * @param string $value The values of the field.
19
+ * @param string $unique The unique ID for the field.
20
+ * @param string $where To where show the output CSS.
21
+ * @param string $parent The parent args.
22
+ */
23
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
24
  parent::__construct( $field, $value, $unique, $where, $parent );
25
  }
26
 
27
+ /**
28
+ * Render field
29
+ *
30
+ * @return void
31
+ */
32
  public function render() {
33
 
34
  $args = wp_parse_args(
41
  )
42
  );
43
 
44
+ echo wp_kses_post( $this->field_before() );
45
  echo '<div class="spf--spin">';
46
+ echo '<input type="text" name="' . esc_attr( $this->field_name() ) . '" value="' . esc_attr( $this->value ) . '"' . $this->field_attributes( array( 'class' => 'spf-number' ) ) . ' data-max="' . esc_attr( $args['max'] ) . '" data-min="' . esc_attr( $args['min'] ) . '" data-step="' . esc_attr( $args['step'] ) . '"/>';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
47
+ echo ( ! empty( $args['unit'] ) ) ? '<div class="spf--unit">' . esc_html( $args['unit'] ) . '</div>' : '';
48
  echo '</div>';
49
  echo '<div class="clear"></div>';
50
+ echo wp_kses_post( $this->field_after() );
51
 
52
  }
53
 
54
+ /**
55
+ * Field script enqueue
56
+ *
57
+ * @return void
58
+ */
59
  public function enqueue() {
60
 
61
  if ( ! wp_script_is( 'jquery-ui-spinner' ) ) {
64
 
65
  }
66
 
67
+ /**
68
+ * Field output
69
+ *
70
+ * @return statement
71
+ */
72
  public function output() {
73
 
74
  $output = '';
77
  $mode = ( ! empty( $this->field['output_mode'] ) ) ? $this->field['output_mode'] : 'width';
78
  $unit = ( ! empty( $this->field['unit'] ) ) ? $this->field['unit'] : 'px';
79
 
80
+ if ( ! empty( $elements ) && isset( $this->value ) && '' !== $this->value ) {
81
  foreach ( $elements as $key_property => $element ) {
82
  if ( is_numeric( $key_property ) ) {
83
  if ( $mode ) {
admin/views/wpcfree-metabox/fields/subheading/subheading.php CHANGED
@@ -1,24 +1,37 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
 
2
  /**
3
  *
4
  * Field: subheading
5
  *
6
  * @since 1.0.0
7
  * @version 1.0.0
8
- *
9
  */
10
- if( ! class_exists( 'SP_WPCF_Field_subheading' ) ) {
11
- class SP_WPCF_Field_subheading 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
- echo ( ! empty( $this->field['content'] ) ) ? $this->field['content'] : '';
 
 
 
 
 
 
 
 
 
 
 
20
 
21
- }
 
 
 
 
 
 
 
22
 
23
- }
24
  }
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
  /**
4
  *
5
  * Field: subheading
6
  *
7
  * @since 1.0.0
8
  * @version 1.0.0
 
9
  */
10
+ if ( ! class_exists( 'SP_WPCF_Field_subheading' ) ) {
11
+ class SP_WPCF_Field_subheading extends SP_WPCF_Fields {
 
 
 
 
12
 
 
13
 
14
+ /**
15
+ * Subheading field constructor.
16
+ *
17
+ * @param array $field The field type.
18
+ * @param string $value The values of the field.
19
+ * @param string $unique The unique ID for the field.
20
+ * @param string $where To where show the output CSS.
21
+ * @param string $parent The parent args.
22
+ */
23
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
24
+ parent::__construct( $field, $value, $unique, $where, $parent );
25
+ }
26
 
27
+ /**
28
+ * Render field
29
+ *
30
+ * @return void
31
+ */
32
+ public function render() {
33
+ echo ( ! empty( $this->field['content'] ) ) ? wp_kses_post( $this->field['content'] ) : '';
34
+ }
35
 
36
+ }
37
  }
admin/views/wpcfree-metabox/fields/switcher/switcher.php CHANGED
@@ -10,31 +10,46 @@
10
  if ( ! class_exists( 'SP_WPCF_Field_switcher' ) ) {
11
  class SP_WPCF_Field_switcher 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
  $active = ( ! empty( $this->value ) ) ? ' spf--active' : '';
20
- $text_on = ( ! empty( $this->field['text_on'] ) ) ? $this->field['text_on'] : esc_html__( 'On', 'wp-carousel-free' );
21
- $text_off = ( ! empty( $this->field['text_off'] ) ) ? $this->field['text_off'] : esc_html__( 'Off', 'wp-carousel-free' );
22
- $text_width = ( ! empty( $this->field['text_width'] ) ) ? ' style="width: ' . $this->field['text_width'] . 'px;"' : '';
23
 
24
- echo $this->field_before();
25
 
26
- echo '<div class="spf--switcher' . $active . '"' . $text_width . '>';
27
- echo '<span class="spf--on">' . $text_on . '</span>';
28
- echo '<span class="spf--off">' . $text_off . '</span>';
29
  echo '<span class="spf--ball"></span>';
30
- echo '<input type="text" name="' . $this->field_name() . '" value="' . $this->value . '"' . $this->field_attributes() . ' />';
31
  echo '</div>';
32
 
33
- echo ( ! empty( $this->field['label'] ) ) ? '<span class="spf--label">' . $this->field['label'] . '</span>' : '';
34
 
35
  echo '<div class="clear"></div>';
36
 
37
- echo $this->field_after();
38
 
39
  }
40
 
10
  if ( ! class_exists( 'SP_WPCF_Field_switcher' ) ) {
11
  class SP_WPCF_Field_switcher extends SP_WPCF_Fields {
12
 
13
+
14
+ /**
15
+ * Switcher field constructor.
16
+ *
17
+ * @param array $field The field type.
18
+ * @param string $value The values of the field.
19
+ * @param string $unique The unique ID for the field.
20
+ * @param string $where To where show the output CSS.
21
+ * @param string $parent The parent args.
22
+ */
23
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
24
  parent::__construct( $field, $value, $unique, $where, $parent );
25
  }
26
 
27
+ /**
28
+ * Render field
29
+ *
30
+ * @return void
31
+ */
32
  public function render() {
33
 
34
  $active = ( ! empty( $this->value ) ) ? ' spf--active' : '';
35
+ $text_on = ( ! empty( $this->field['text_on'] ) ) ? $this->field['text_on'] : __( 'On', 'wp-carousel-free' );
36
+ $text_off = ( ! empty( $this->field['text_off'] ) ) ? $this->field['text_off'] : __( 'Off', 'wp-carousel-free' );
37
+ $text_width = ( ! empty( $this->field['text_width'] ) ) ? $this->field['text_width'] . 'px;"' : '';
38
 
39
+ echo wp_kses_post( $this->field_before() );
40
 
41
+ echo '<div class="spf--switcher' . esc_attr( $active ) . '" style="width: ' . esc_attr( $text_width ) . '">';
42
+ echo '<span class="spf--on">' . esc_html( $text_on ) . '</span>';
43
+ echo '<span class="spf--off">' . esc_html( $text_off ) . '</span>';
44
  echo '<span class="spf--ball"></span>';
45
+ echo '<input type="text" name="' . esc_attr( $this->field_name() ) . '" value="' . esc_attr( $this->value ) . '"' . $this->field_attributes() . ' />'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
46
  echo '</div>';
47
 
48
+ echo ( ! empty( $this->field['label'] ) ) ? '<span class="spf--label">' . esc_html( $this->field['label'] ) . '</span>' : '';
49
 
50
  echo '<div class="clear"></div>';
51
 
52
+ echo wp_kses_post( $this->field_after() );
53
 
54
  }
55
 
admin/views/wpcfree-metabox/fields/switcherf/switcherf.php CHANGED
@@ -10,28 +10,42 @@
10
  if ( ! class_exists( 'SP_WPCF_Field_switcherf' ) ) {
11
  class SP_WPCF_Field_switcherf 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
  $text_off = ( ! empty( $this->field['text_off'] ) ) ? $this->field['text_off'] : esc_html__( 'Off', 'wp-carousel-free' );
20
  $text_width = ( ! empty( $this->field['text_width'] ) ) ? ' style="width: ' . $this->field['text_width'] . 'px;"' : '';
21
 
22
- echo $this->field_before();
23
 
24
- echo '<div class="spf--switcher"' . $text_width . '>';
25
- echo '<span class="spf--off">' . $text_off . '</span>';
26
  echo '<span class="spf--ball"></span>';
27
- echo '<input type="text" name="' . $this->field_name() . '" value="' . $this->value . '"' . $this->field_attributes() . ' />';
28
  echo '</div>';
29
 
30
- echo ( ! empty( $this->field['label'] ) ) ? '<span class="spf--label">' . $this->field['label'] . '</span>' : '';
31
 
32
  echo '<div class="clear"></div>';
33
 
34
- echo $this->field_after();
35
 
36
  }
37
 
10
  if ( ! class_exists( 'SP_WPCF_Field_switcherf' ) ) {
11
  class SP_WPCF_Field_switcherf extends SP_WPCF_Fields {
12
 
13
+ /**
14
+ * Switcherf field constructor.
15
+ *
16
+ * @param array $field The field type.
17
+ * @param string $value The values of the field.
18
+ * @param string $unique The unique ID for the field.
19
+ * @param string $where To where show the output CSS.
20
+ * @param string $parent The parent args.
21
+ */
22
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
23
  parent::__construct( $field, $value, $unique, $where, $parent );
24
  }
25
 
26
+ /**
27
+ * Render field
28
+ *
29
+ * @return void
30
+ */
31
  public function render() {
32
 
33
  $text_off = ( ! empty( $this->field['text_off'] ) ) ? $this->field['text_off'] : esc_html__( 'Off', 'wp-carousel-free' );
34
  $text_width = ( ! empty( $this->field['text_width'] ) ) ? ' style="width: ' . $this->field['text_width'] . 'px;"' : '';
35
 
36
+ echo wp_kses_post( $this->field_before() );
37
 
38
+ echo wp_kses_post( '<div class="spf--switcher"' . $text_width . '>' );
39
+ echo '<span class="spf--off">' . esc_html( $text_off ) . '</span>';
40
  echo '<span class="spf--ball"></span>';
41
+ echo '<input type="text" name="' . esc_attr( $this->field_name() ) . '" value="' . esc_attr( $this->value ) . '"' . $this->field_attributes() . ' />'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
42
  echo '</div>';
43
 
44
+ echo ( ! empty( $this->field['label'] ) ) ? '<span class="spf--label">' . esc_html( $this->field['label'] ) . '</span>' : '';
45
 
46
  echo '<div class="clear"></div>';
47
 
48
+ echo wp_kses_post( $this->field_after() );
49
 
50
  }
51
 
admin/views/wpcfree-metabox/fields/text/text.php CHANGED
@@ -1,30 +1,46 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
- /**
3
- *
4
- * Field: text
5
- *
6
- * @since 1.0.0
7
- * @version 1.0.0
8
- *
9
- */
10
- if( ! class_exists( 'SP_WPCF_Field_text' ) ) {
11
- class SP_WPCF_Field_text 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
- $type = ( ! empty( $this->field['attributes']['type'] ) ) ? $this->field['attributes']['type'] : 'text';
20
-
21
- echo $this->field_before();
22
-
23
- echo '<input type="'. $type .'" name="'. $this->field_name() .'" value="'. $this->value .'"'. $this->field_attributes() .' />';
24
-
25
- echo $this->field_after();
26
-
27
- }
28
-
29
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  }
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+
4
+ if ( ! class_exists( 'SP_WPCF_Field_text' ) ) {
5
+
6
+ /**
7
+ *
8
+ * Field: text
9
+ *
10
+ * @since 1.0.0
11
+ * @version 1.0.0
12
+ */
13
+ class SP_WPCF_Field_text extends SP_WPCF_Fields {
14
+
15
+ /**
16
+ * Text field constructor.
17
+ *
18
+ * @param array $field The field type.
19
+ * @param string $value The values of the field.
20
+ * @param string $unique The unique ID for the field.
21
+ * @param string $where To where show the output CSS.
22
+ * @param string $parent The parent args.
23
+ */
24
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
25
+ parent::__construct( $field, $value, $unique, $where, $parent );
26
+ }
27
+
28
+ /**
29
+ * Render field
30
+ *
31
+ * @return void
32
+ */
33
+ public function render() {
34
+
35
+ $type = ( ! empty( $this->field['attributes']['type'] ) ) ? $this->field['attributes']['type'] : 'text';
36
+
37
+ echo wp_kses_post( $this->field_before() );
38
+
39
+ echo '<input type="' . esc_attr( $type ) . '" name="' . esc_attr( $this->field_name() ) . '" value="' . esc_attr( $this->value ) . '"' . $this->field_attributes() . ' />';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
40
+
41
+ echo wp_kses_post( $this->field_after() );
42
+
43
+ }
44
+
45
+ }
46
  }
admin/views/wpcfree-metabox/fields/typography/typography.php CHANGED
@@ -10,17 +10,41 @@
10
  if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
11
  class SP_WPCF_Field_typography extends SP_WPCF_Fields {
12
 
 
 
 
 
 
13
  public $chosen = false;
14
 
 
 
 
 
 
15
  public $value = array();
16
 
 
 
 
 
 
 
 
 
 
17
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
18
  parent::__construct( $field, $value, $unique, $where, $parent );
19
  }
20
 
 
 
 
 
 
21
  public function render() {
22
 
23
- echo $this->field_before();
24
 
25
  $args = wp_parse_args(
26
  $this->field,
@@ -77,7 +101,7 @@ if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
77
  $this->chosen = $args['chosen'];
78
  $chosen_class = ( $this->chosen ) ? ' spf--chosen' : '';
79
 
80
- echo '<div class="spf--typography' . $chosen_class . '" data-unit="' . $args['unit'] . '" data-exclude="' . $args['exclude'] . '">';
81
 
82
  echo '<div class="spf--blocks spf--blocks-selects">';
83
 
@@ -97,26 +121,28 @@ if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
97
  if ( ! empty( $args['backup_font_family'] ) ) {
98
  echo '<div class="spf--block spf--block-backup-font-family hidden">';
99
  echo '<div class="spf--title">' . esc_html__( 'Backup Font Family', 'wp-carousel-free' ) . '</div>';
100
- echo $this->create_select(
101
- apply_filters(
102
- 'spf_field_typography_backup_font_family',
103
- array(
104
- 'Arial, Helvetica, sans-serif',
105
- "'Arial Black', Gadget, sans-serif",
106
- "'Comic Sans MS', cursive, sans-serif",
107
- 'Impact, Charcoal, sans-serif',
108
- "'Lucida Sans Unicode', 'Lucida Grande', sans-serif",
109
- 'Tahoma, Geneva, sans-serif',
110
- "'Trebuchet MS', Helvetica, sans-serif'",
111
- 'Verdana, Geneva, sans-serif',
112
- "'Courier New', Courier, monospace",
113
- "'Lucida Console', Monaco, monospace",
114
- 'Georgia, serif',
115
- 'Palatino Linotype',
116
- )
117
- ),
118
- 'backup-font-family',
119
- esc_html__( 'Default', 'wp-carousel-free' )
 
 
120
  );
121
  echo '</div>';
122
  }
@@ -130,13 +156,13 @@ if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
130
  echo '<div class="spf--block spf--block-font-style hidden">';
131
  echo '<div class="spf--title">' . esc_html__( 'Font Style', 'wp-carousel-free' ) . '</div>';
132
  echo '<select disabled class="spf--font-style-select" data-placeholder="Default">';
133
- echo '<option disabled value="">' . ( ! $this->chosen ? esc_html__( 'Default', 'wp-carousel-free' ) : '' ) . '</option>';
134
  if ( ! empty( $this->value['font-weight'] ) || ! empty( $this->value['font-style'] ) ) {
135
- echo '<option disabled value="' . strtolower( $this->value['font-weight'] . $this->value['font-style'] ) . '" selected></option>';
136
  }
137
  echo '</select>';
138
- echo '<input disabled type="hidden" name="' . $this->field_name( '[font-weight]' ) . '" class="spf--font-weight" value="' . $this->value['font-weight'] . '" />';
139
- echo '<input disabled type="hidden" name="' . $this->field_name( '[font-style]' ) . '" class="spf--font-style" value="' . $this->value['font-style'] . '" />';
140
 
141
  //
142
  // Extra Font Style Select.
@@ -144,7 +170,7 @@ if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
144
  echo '<div class="spf--block-extra-styles hidden">';
145
  echo ( ! $this->chosen ) ? '<div class="spf--title">' . esc_html__( 'Load Extra Styles', 'wp-carousel-free' ) . '</div>' : '';
146
  $placeholder = ( $this->chosen ) ? esc_html__( 'Load Extra Styles', 'wp-carousel-free' ) : esc_html__( 'Default', 'wp-carousel-free' );
147
- echo $this->create_select( $this->value['extra-styles'], 'extra-styles', $placeholder, true );
148
  echo '</div>';
149
  }
150
 
@@ -176,14 +202,16 @@ if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
176
  if ( ! empty( $args['font_variant'] ) ) {
177
  echo '<div class="spf--block">';
178
  echo '<div class="spf--title">' . esc_html__( 'Font Variant', 'wp-carousel-free' ) . '</div>';
179
- echo $this->create_select(
180
- array(
181
- 'normal' => esc_html__( 'Normal', 'wp-carousel-free' ),
182
- 'small-caps' => esc_html__( 'Small Caps', 'wp-carousel-free' ),
183
- 'all-small-caps' => esc_html__( 'All Small Caps', 'wp-carousel-free' ),
184
- ),
185
- 'font-variant',
186
- esc_html__( 'Default', 'wp-carousel-free' )
 
 
187
  );
188
  echo '</div>';
189
  }
@@ -202,19 +230,21 @@ if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
202
  if ( ! empty( $args['text_decoration'] ) ) {
203
  echo '<div class="spf--block">';
204
  echo '<div class="spf--title">' . esc_html__( 'Text Decoration', 'wp-carousel-free' ) . '</div>';
205
- echo $this->create_select(
206
- array(
207
- 'none' => esc_html__( 'None', 'wp-carousel-free' ),
208
- 'underline' => esc_html__( 'Solid', 'wp-carousel-free' ),
209
- 'underline double' => esc_html__( 'Double', 'wp-carousel-free' ),
210
- 'underline dotted' => esc_html__( 'Dotted', 'wp-carousel-free' ),
211
- 'underline dashed' => esc_html__( 'Dashed', 'wp-carousel-free' ),
212
- 'underline wavy' => esc_html__( 'Wavy', 'wp-carousel-free' ),
213
- 'underline overline' => esc_html__( 'Overline', 'wp-carousel-free' ),
214
- 'line-through' => esc_html__( 'Line-through', 'wp-carousel-free' ),
215
- ),
216
- 'text-decoration',
217
- esc_html__( 'Default', 'wp-carousel-free' )
 
 
218
  );
219
  echo '</div>';
220
  }
@@ -224,13 +254,13 @@ if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
224
  echo '<div class="spf--blocks spf--blocks-inputs">';
225
 
226
  //
227
- // Font Size
228
  if ( ! empty( $args['font_size'] ) ) {
229
  echo '<div class="spf--block">';
230
  echo '<div class="spf--title">' . esc_html__( 'Font Size', 'wp-carousel-free' ) . '</div>';
231
  echo '<div class="spf--blocks">';
232
- echo '<div class="spf--block"><input disabled type="text" name="' . $this->field_name( '[font-size]' ) . '" class="spf--font-size spf--input spf-number" value="' . $this->value['font-size'] . '" /></div>';
233
- echo '<div class="spf--block spf--unit">' . $args['unit'] . '</div>';
234
  echo '</div>';
235
  echo '</div>';
236
  }
@@ -241,8 +271,8 @@ if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
241
  echo '<div class="spf--block">';
242
  echo '<div class="spf--title">' . esc_html__( 'Line Height', 'wp-carousel-free' ) . '</div>';
243
  echo '<div class="spf--blocks">';
244
- echo '<div class="spf--block"><input disabled type="text" name="' . $this->field_name( '[line-height]' ) . '" class="spf--line-height spf--input spf-number" value="' . $this->value['line-height'] . '" /></div>';
245
- echo '<div class="spf--block spf--unit">' . $args['unit'] . '</div>';
246
  echo '</div>';
247
  echo '</div>';
248
  }
@@ -253,8 +283,8 @@ if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
253
  echo '<div class="spf--block">';
254
  echo '<div class="spf--title">' . esc_html__( 'Letter Spacing', 'wp-carousel-free' ) . '</div>';
255
  echo '<div class="spf--blocks">';
256
- echo '<div class="spf--block"><input disabled type="text" name="' . $this->field_name( '[letter-spacing]' ) . '" class="spf--letter-spacing spf--input spf-number" value="' . $this->value['letter-spacing'] . '" /></div>';
257
- echo '<div class="spf--block spf--unit">' . $args['unit'] . '</div>';
258
  echo '</div>';
259
  echo '</div>';
260
  }
@@ -265,8 +295,8 @@ if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
265
  echo '<div class="spf--block">';
266
  echo '<div class="spf--title">' . esc_html__( 'Word Spacing', 'wp-carousel-free' ) . '</div>';
267
  echo '<div class="spf--blocks">';
268
- echo '<div class="spf--block"><input disabled type="text" name="' . $this->field_name( '[word-spacing]' ) . '" class="spf--word-spacing spf--input spf-number" value="' . $this->value['word-spacing'] . '" /></div>';
269
- echo '<div class="spf--block spf--unit">' . $args['unit'] . '</div>';
270
  echo '</div>';
271
  echo '</div>';
272
  }
@@ -281,22 +311,22 @@ if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
281
  echo '<div class="spf--block spf--block-font-color">';
282
  echo '<div class="spf--title">' . esc_html__( 'Font Color', 'wp-carousel-free' ) . '</div>';
283
  echo '<div class="spf-field-color">';
284
- echo '<input disabled type="text" name="' . $this->field_name( '[color]' ) . '" class="spf-color spf--color" value="' . $this->value['color'] . '"' . $default_color_attr . ' />';
285
  echo '</div>';
286
  echo '</div>';
287
 
288
  //
289
  // Font Hover Color.
290
  if ( ! empty( $args['hover_color'] ) ) {
291
- $default_hover_color_attr = ( ! empty( $default_value['hover_color'] ) ) ? ' data-default-color="' . $default_value['hover_color'] . '"' : '';
292
  echo '<div class="spf--block spf--block-font-color">';
293
  echo '<div class="spf--title">' . esc_html__( 'Font Hover Color', 'wp-carousel-free' ) . '</div>';
294
  echo '<div class="spf-field-color">';
295
- echo '<input disabled type="text" name="' . $this->field_name( '[hover_color]' ) . '" class="spf-color spf--color" value="' . $this->value['hover_color'] . '"' . $default_hover_color_attr . ' />';
296
  echo '</div>';
297
  echo '</div>';
298
  }
299
- echo '</div>'; // End of spf--blocks-color
300
  }
301
 
302
  //
@@ -304,30 +334,39 @@ if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
304
  if ( ! empty( $args['custom_style'] ) ) {
305
  echo '<div class="spf--block spf--block-custom-style">';
306
  echo '<div class="spf--title">' . esc_html__( 'Custom Style', 'wp-carousel-free' ) . '</div>';
307
- echo '<textarea name="' . $this->field_name( '[custom-style]' ) . '" class="spf--custom-style">' . $this->value['custom-style'] . '</textarea>';
308
  echo '</div>';
309
  }
310
 
311
  //
312
  // Preview.
313
- $always_preview = ( $args['preview'] !== 'always' ) ? ' hidden' : '';
314
 
315
  if ( ! empty( $args['preview'] ) ) {
316
- echo '<div class="spf--block spf--block-preview' . $always_preview . '">';
317
  echo '<div class="spf--toggle fa fa-toggle-off"></div>';
318
- echo '<div class="spf--preview">' . $args['preview_text'] . '</div>';
319
  echo '</div>';
320
  }
321
 
322
- echo '<input type="hidden" name="' . $this->field_name( '[type]' ) . '" class="spf--type" value="' . $this->value['type'] . '" />';
323
- echo '<input type="hidden" name="' . $this->field_name( '[unit]' ) . '" class="spf--unit-save" value="' . $args['unit'] . '" />';
324
 
325
  echo '</div>';
326
 
327
- echo $this->field_after();
328
 
329
  }
330
 
 
 
 
 
 
 
 
 
 
331
  public function create_select( $options, $name, $placeholder = '', $is_multiple = false ) {
332
 
333
  $multiple_name = ( $is_multiple ) ? '[]' : '';
@@ -340,7 +379,7 @@ if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
340
  if ( ! empty( $options ) ) {
341
  foreach ( $options as $option_key => $option_value ) {
342
  if ( $is_multiple ) {
343
- $selected = ( in_array( $option_value, $this->value[ $name ] ) ) ? ' selected' : '';
344
  $output .= '<option disabled value="' . $option_value . '"' . $selected . '>' . $option_value . '</option>';
345
  } else {
346
  $option_key = ( is_numeric( $option_key ) ) ? $option_value : $option_key;
@@ -356,6 +395,11 @@ if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
356
 
357
  }
358
 
 
 
 
 
 
359
  public function enqueue() {
360
 
361
  if ( ! wp_style_is( 'spf-webfont-loader' ) ) {
@@ -443,6 +487,11 @@ if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
443
 
444
  }
445
 
 
 
 
 
 
446
  public function enqueue_google_fonts() {
447
 
448
  $value = $this->value;
@@ -450,7 +499,7 @@ if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
450
  $is_google = false;
451
 
452
  if ( ! empty( $this->value['type'] ) ) {
453
- $is_google = ( $this->value['type'] === 'google' ) ? true : false;
454
  } else {
455
  SP_WPCF::include_plugin_file( 'fields/typography/google-fonts.php' );
456
  $is_google = ( array_key_exists( $this->value['font-family'], spf_get_google_fonts() ) ) ? true : false;
@@ -458,7 +507,7 @@ if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
458
 
459
  if ( $is_google ) {
460
 
461
- // set style
462
  $font_weight = ( ! empty( $value['font-weight'] ) ) ? $value['font-weight'] : '';
463
  $font_style = ( ! empty( $value['font-style'] ) ) ? $value['font-style'] : '';
464
 
@@ -467,14 +516,14 @@ if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
467
  $families['style'][ $style ] = $style;
468
  }
469
 
470
- // set extra styles
471
  if ( ! empty( $value['extra-styles'] ) ) {
472
  foreach ( $value['extra-styles'] as $extra_style ) {
473
  $families['style'][ $extra_style ] = $extra_style;
474
  }
475
  }
476
 
477
- // set subsets
478
  if ( ! empty( $value['subset'] ) ) {
479
  $value['subset'] = ( is_array( $value['subset'] ) ) ? $value['subset'] : array_filter( (array) $value['subset'] );
480
  foreach ( $value['subset'] as $subset ) {
10
  if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
11
  class SP_WPCF_Field_typography extends SP_WPCF_Fields {
12
 
13
+ /**
14
+ * Chosen
15
+ *
16
+ * @var bool
17
+ */
18
  public $chosen = false;
19
 
20
+ /**
21
+ * Value
22
+ *
23
+ * @var array
24
+ */
25
  public $value = array();
26
 
27
+ /**
28
+ * Typography field constructor.
29
+ *
30
+ * @param array $field The field type.
31
+ * @param string $value The values of the field.
32
+ * @param string $unique The unique ID for the field.
33
+ * @param string $where To where show the output CSS.
34
+ * @param string $parent The parent args.
35
+ */
36
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
37
  parent::__construct( $field, $value, $unique, $where, $parent );
38
  }
39
 
40
+ /**
41
+ * Render field
42
+ *
43
+ * @return void
44
+ */
45
  public function render() {
46
 
47
+ echo wp_kses_post( $this->field_before() );
48
 
49
  $args = wp_parse_args(
50
  $this->field,
101
  $this->chosen = $args['chosen'];
102
  $chosen_class = ( $this->chosen ) ? ' spf--chosen' : '';
103
 
104
+ echo '<div class="spf--typography' . esc_attr( $chosen_class ) . '" data-unit="' . esc_attr( $args['unit'] ) . '" data-exclude="' . esc_attr( $args['exclude'] ) . '">';
105
 
106
  echo '<div class="spf--blocks spf--blocks-selects">';
107
 
121
  if ( ! empty( $args['backup_font_family'] ) ) {
122
  echo '<div class="spf--block spf--block-backup-font-family hidden">';
123
  echo '<div class="spf--title">' . esc_html__( 'Backup Font Family', 'wp-carousel-free' ) . '</div>';
124
+ echo wp_kses_post(
125
+ $this->create_select(
126
+ apply_filters(
127
+ 'spf_field_typography_backup_font_family',
128
+ array(
129
+ 'Arial, Helvetica, sans-serif',
130
+ "'Arial Black', Gadget, sans-serif",
131
+ "'Comic Sans MS', cursive, sans-serif",
132
+ 'Impact, Charcoal, sans-serif',
133
+ "'Lucida Sans Unicode', 'Lucida Grande', sans-serif",
134
+ 'Tahoma, Geneva, sans-serif',
135
+ "'Trebuchet MS', Helvetica, sans-serif'",
136
+ 'Verdana, Geneva, sans-serif',
137
+ "'Courier New', Courier, monospace",
138
+ "'Lucida Console', Monaco, monospace",
139
+ 'Georgia, serif',
140
+ 'Palatino Linotype',
141
+ )
142
+ ),
143
+ 'backup-font-family',
144
+ esc_html__( 'Default', 'wp-carousel-free' )
145
+ )
146
  );
147
  echo '</div>';
148
  }
156
  echo '<div class="spf--block spf--block-font-style hidden">';
157
  echo '<div class="spf--title">' . esc_html__( 'Font Style', 'wp-carousel-free' ) . '</div>';
158
  echo '<select disabled class="spf--font-style-select" data-placeholder="Default">';
159
+ echo wp_kses_post( '<option disabled value="">' . ( ! $this->chosen ? esc_html__( 'Default', 'wp-carousel-free' ) : '' ) . '</option>' );
160
  if ( ! empty( $this->value['font-weight'] ) || ! empty( $this->value['font-style'] ) ) {
161
+ echo wp_kses_post( '<option disabled value="' . strtolower( $this->value['font-weight'] . $this->value['font-style'] ) . '" selected></option>' );
162
  }
163
  echo '</select>';
164
+ echo '<input disabled type="hidden" name="' . esc_attr( $this->field_name( '[font-weight]' ) ) . '" class="spf--font-weight" value="' . esc_attr( $this->value['font-weight'] ) . '" />';
165
+ echo '<input disabled type="hidden" name="' . esc_attr( $this->field_name( '[font-style]' ) ) . '" class="spf--font-style" value="' . esc_attr( $this->value['font-style'] ) . '" />';
166
 
167
  //
168
  // Extra Font Style Select.
170
  echo '<div class="spf--block-extra-styles hidden">';
171
  echo ( ! $this->chosen ) ? '<div class="spf--title">' . esc_html__( 'Load Extra Styles', 'wp-carousel-free' ) . '</div>' : '';
172
  $placeholder = ( $this->chosen ) ? esc_html__( 'Load Extra Styles', 'wp-carousel-free' ) : esc_html__( 'Default', 'wp-carousel-free' );
173
+ echo wp_kses_post( $this->create_select( $this->value['extra-styles'], 'extra-styles', $placeholder, true ) );
174
  echo '</div>';
175
  }
176
 
202
  if ( ! empty( $args['font_variant'] ) ) {
203
  echo '<div class="spf--block">';
204
  echo '<div class="spf--title">' . esc_html__( 'Font Variant', 'wp-carousel-free' ) . '</div>';
205
+ echo wp_kses_post(
206
+ $this->create_select(
207
+ array(
208
+ 'normal' => esc_html__( 'Normal', 'wp-carousel-free' ),
209
+ 'small-caps' => esc_html__( 'Small Caps', 'wp-carousel-free' ),
210
+ 'all-small-caps' => esc_html__( 'All Small Caps', 'wp-carousel-free' ),
211
+ ),
212
+ 'font-variant',
213
+ __( 'Default', 'wp-carousel-free' )
214
+ )
215
  );
216
  echo '</div>';
217
  }
230
  if ( ! empty( $args['text_decoration'] ) ) {
231
  echo '<div class="spf--block">';
232
  echo '<div class="spf--title">' . esc_html__( 'Text Decoration', 'wp-carousel-free' ) . '</div>';
233
+ echo wp_kses_post(
234
+ $this->create_select(
235
+ array(
236
+ 'none' => esc_html__( 'None', 'wp-carousel-free' ),
237
+ 'underline' => esc_html__( 'Solid', 'wp-carousel-free' ),
238
+ 'underline double' => esc_html__( 'Double', 'wp-carousel-free' ),
239
+ 'underline dotted' => esc_html__( 'Dotted', 'wp-carousel-free' ),
240
+ 'underline dashed' => esc_html__( 'Dashed', 'wp-carousel-free' ),
241
+ 'underline wavy' => esc_html__( 'Wavy', 'wp-carousel-free' ),
242
+ 'underline overline' => esc_html__( 'Overline', 'wp-carousel-free' ),
243
+ 'line-through' => esc_html__( 'Line-through', 'wp-carousel-free' ),
244
+ ),
245
+ 'text-decoration',
246
+ esc_html__( 'Default', 'wp-carousel-free' )
247
+ )
248
  );
249
  echo '</div>';
250
  }
254
  echo '<div class="spf--blocks spf--blocks-inputs">';
255
 
256
  //
257
+ // Font Size.
258
  if ( ! empty( $args['font_size'] ) ) {
259
  echo '<div class="spf--block">';
260
  echo '<div class="spf--title">' . esc_html__( 'Font Size', 'wp-carousel-free' ) . '</div>';
261
  echo '<div class="spf--blocks">';
262
+ echo '<div class="spf--block"><input disabled type="text" name="' . esc_attr( $this->field_name( '[font-size]' ) ) . '" class="spf--font-size spf--input spf-number" value="' . esc_attr( $this->value['font-size'] ) . '" /></div>';
263
+ echo '<div class="spf--block spf--unit">' . esc_html( $args['unit'] ) . '</div>';
264
  echo '</div>';
265
  echo '</div>';
266
  }
271
  echo '<div class="spf--block">';
272
  echo '<div class="spf--title">' . esc_html__( 'Line Height', 'wp-carousel-free' ) . '</div>';
273
  echo '<div class="spf--blocks">';
274
+ echo '<div class="spf--block"><input disabled type="text" name="' . esc_attr( $this->field_name( '[line-height]' ) ) . '" class="spf--line-height spf--input spf-number" value="' . esc_attr( $this->value['line-height'] ) . '" /></div>';
275
+ echo '<div class="spf--block spf--unit">' . esc_attr( $args['unit'] ) . '</div>';
276
  echo '</div>';
277
  echo '</div>';
278
  }
283
  echo '<div class="spf--block">';
284
  echo '<div class="spf--title">' . esc_html__( 'Letter Spacing', 'wp-carousel-free' ) . '</div>';
285
  echo '<div class="spf--blocks">';
286
+ echo '<div class="spf--block"><input disabled type="text" name="' . esc_attr( $this->field_name( '[letter-spacing]' ) ) . '" class="spf--letter-spacing spf--input spf-number" value="' . esc_attr( $this->value['letter-spacing'] ) . '" /></div>';
287
+ echo '<div class="spf--block spf--unit">' . esc_html( $args['unit'] ) . '</div>';
288
  echo '</div>';
289
  echo '</div>';
290
  }
295
  echo '<div class="spf--block">';
296
  echo '<div class="spf--title">' . esc_html__( 'Word Spacing', 'wp-carousel-free' ) . '</div>';
297
  echo '<div class="spf--blocks">';
298
+ echo '<div class="spf--block"><input disabled type="text" name="' . esc_attr( $this->field_name( '[word-spacing]' ) ) . '" class="spf--word-spacing spf--input spf-number" value="' . esc_attr( $this->value['word-spacing'] ) . '" /></div>';
299
+ echo '<div class="spf--block spf--unit">' . esc_html( $args['unit'] ) . '</div>';
300
  echo '</div>';
301
  echo '</div>';
302
  }
311
  echo '<div class="spf--block spf--block-font-color">';
312
  echo '<div class="spf--title">' . esc_html__( 'Font Color', 'wp-carousel-free' ) . '</div>';
313
  echo '<div class="spf-field-color">';
314
+ echo '<input disabled type="text" name="' . esc_attr( $this->field_name( '[color]' ) ) . '" class="spf-color spf--color" value="' . esc_attr( $this->value['color'] ) . '"' . $default_color_attr . ' />';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
315
  echo '</div>';
316
  echo '</div>';
317
 
318
  //
319
  // Font Hover Color.
320
  if ( ! empty( $args['hover_color'] ) ) {
321
+ $default_hover_color_attr = ( ! empty( $default_value['hover_color'] ) ) ? ' data-default-color="' . esc_attr( $default_value['hover_color'] ) . '"' : '';
322
  echo '<div class="spf--block spf--block-font-color">';
323
  echo '<div class="spf--title">' . esc_html__( 'Font Hover Color', 'wp-carousel-free' ) . '</div>';
324
  echo '<div class="spf-field-color">';
325
+ echo '<input disabled type="text" name="' . esc_attr( $this->field_name( '[hover_color]' ) ) . '" class="spf-color spf--color" value="' . esc_attr( $this->value['hover_color'] ) . '"' . $default_hover_color_attr . ' />';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
326
  echo '</div>';
327
  echo '</div>';
328
  }
329
+ echo '</div>'; // End of spf--blocks-color.
330
  }
331
 
332
  //
334
  if ( ! empty( $args['custom_style'] ) ) {
335
  echo '<div class="spf--block spf--block-custom-style">';
336
  echo '<div class="spf--title">' . esc_html__( 'Custom Style', 'wp-carousel-free' ) . '</div>';
337
+ echo '<textarea name="' . $this->field_name( '[custom-style]' ) . '" class="spf--custom-style">' . $this->value['custom-style'] . '</textarea>';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
338
  echo '</div>';
339
  }
340
 
341
  //
342
  // Preview.
343
+ $always_preview = ( 'always' !== $args['preview'] ) ? ' hidden' : '';
344
 
345
  if ( ! empty( $args['preview'] ) ) {
346
+ echo '<div class="spf--block spf--block-preview' . esc_attr( $always_preview ) . '">';
347
  echo '<div class="spf--toggle fa fa-toggle-off"></div>';
348
+ echo '<div class="spf--preview">' . esc_html( $args['preview_text'] ) . '</div>';
349
  echo '</div>';
350
  }
351
 
352
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name( '[type]' ) ) . '" class="spf--type" value="' . esc_attr( $this->value['type'] ) . '" />';
353
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name( '[unit]' ) ) . '" class="spf--unit-save" value="' . esc_attr( $args['unit'] ) . '" />';
354
 
355
  echo '</div>';
356
 
357
+ echo wp_kses_post( $this->field_after() );
358
 
359
  }
360
 
361
+ /**
362
+ * Create select
363
+ *
364
+ * @param array $options options.
365
+ * @param string $name name.
366
+ * @param mixed $placeholder placeholder.
367
+ * @param bool $is_multiple is_multiple.
368
+ * @return statement
369
+ */
370
  public function create_select( $options, $name, $placeholder = '', $is_multiple = false ) {
371
 
372
  $multiple_name = ( $is_multiple ) ? '[]' : '';
379
  if ( ! empty( $options ) ) {
380
  foreach ( $options as $option_key => $option_value ) {
381
  if ( $is_multiple ) {
382
+ $selected = ( in_array( $option_value, $this->value[ $name ], true ) ) ? ' selected' : '';
383
  $output .= '<option disabled value="' . $option_value . '"' . $selected . '>' . $option_value . '</option>';
384
  } else {
385
  $option_key = ( is_numeric( $option_key ) ) ? $option_value : $option_key;
395
 
396
  }
397
 
398
+ /**
399
+ * Field enqueue script.
400
+ *
401
+ * @return void
402
+ */
403
  public function enqueue() {
404
 
405
  if ( ! wp_style_is( 'spf-webfont-loader' ) ) {
487
 
488
  }
489
 
490
+ /**
491
+ * Enqueue google fonts
492
+ *
493
+ * @return mixed
494
+ */
495
  public function enqueue_google_fonts() {
496
 
497
  $value = $this->value;
499
  $is_google = false;
500
 
501
  if ( ! empty( $this->value['type'] ) ) {
502
+ $is_google = ( 'google' === $this->value['type'] ) ? true : false;
503
  } else {
504
  SP_WPCF::include_plugin_file( 'fields/typography/google-fonts.php' );
505
  $is_google = ( array_key_exists( $this->value['font-family'], spf_get_google_fonts() ) ) ? true : false;
507
 
508
  if ( $is_google ) {
509
 
510
+ // set style.
511
  $font_weight = ( ! empty( $value['font-weight'] ) ) ? $value['font-weight'] : '';
512
  $font_style = ( ! empty( $value['font-style'] ) ) ? $value['font-style'] : '';
513
 
516
  $families['style'][ $style ] = $style;
517
  }
518
 
519
+ // set extra styles.
520
  if ( ! empty( $value['extra-styles'] ) ) {
521
  foreach ( $value['extra-styles'] as $extra_style ) {
522
  $families['style'][ $extra_style ] = $extra_style;
523
  }
524
  }
525
 
526
+ // set subsets.
527
  if ( ! empty( $value['subset'] ) ) {
528
  $value['subset'] = ( is_array( $value['subset'] ) ) ? $value['subset'] : array_filter( (array) $value['subset'] );
529
  foreach ( $value['subset'] as $subset ) {
admin/views/wpcfree-metabox/functions/actions.php CHANGED
@@ -1,4 +1,12 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
 
 
 
 
 
 
 
 
2
  die; } // Cannot access directly.
3
 
4
 
@@ -17,153 +25,16 @@ if ( ! function_exists( 'wpcf_get_option' ) ) {
17
  }
18
 
19
 
20
- /**
21
- * Populate the taxonomy name list to he select option.
22
- *
23
- * @return void
24
- */
25
- function wpcf_get_taxonomies() {
26
- extract( $_REQUEST );
27
- $taxonomy_names = get_object_taxonomies( array( 'post_type' => $wpcp_post_type ), 'names' );
28
- foreach ( $taxonomy_names as $key => $label ) {
29
- echo '<option value="' . $label . '">' . $label . '</option>';
30
- }
31
- die( 0 );
32
- }
33
- add_action( 'wp_ajax_wpcf_get_taxonomies', 'wpcf_get_taxonomies' );
34
-
35
- /**
36
- * Populate the taxonomy terms list to the select option.
37
- *
38
- * @return void
39
- */
40
- function wpcf_get_terms() {
41
- extract( $_REQUEST );
42
- $terms = get_terms( $wpcp_post_taxonomy );
43
- foreach ( $terms as $key => $value ) {
44
- echo '<option value="' . $value->term_id . '">' . $value->name . '</option>';
45
- }
46
- die( 0 );
47
- }
48
- add_action( 'wp_ajax_wpcf_get_terms', 'wpcf_get_terms' );
49
-
50
- /**
51
- * Get specific post to the select box.
52
- *
53
- * @return void
54
- */
55
- function wpcf_get_posts() {
56
- extract( $_REQUEST );
57
- $all_posts = get_posts(
58
- array(
59
- 'post_type' => $wpcp_post_type,
60
- 'posts_per_page' => -1,
61
- )
62
- );
63
- foreach ( $all_posts as $key => $post_obj ) {
64
- echo '<option value="' . $post_obj->ID . '">' . $post_obj->post_title . '</option>';
65
- }
66
- die( 0 );
67
- }
68
- add_action( 'wp_ajax_wpcf_get_posts', 'wpcf_get_posts' );
69
-
70
- /**
71
- *
72
- * Export
73
- *
74
- * @since 1.0.0
75
- * @version 1.0.0
76
- */
77
- if ( ! function_exists( 'spf_export' ) ) {
78
- function spf_export() {
79
-
80
- if ( ! empty( $_GET['export'] ) && ! empty( $_GET['nonce'] ) && wp_verify_nonce( $_GET['nonce'], 'spf_backup_nonce' ) ) {
81
-
82
- header( 'Content-Type: application/json' );
83
- header( 'Content-disposition: attachment; filename=backup-' . gmdate( 'd-m-Y' ) . '.json' );
84
- header( 'Content-Transfer-Encoding: binary' );
85
- header( 'Pragma: no-cache' );
86
- header( 'Expires: 0' );
87
-
88
- echo json_encode( get_option( wp_unslash( $_GET['export'] ) ) );
89
-
90
- }
91
-
92
- die();
93
- }
94
- add_action( 'wp_ajax_spf-export', 'spf_export' );
95
- }
96
-
97
-
98
- /**
99
- *
100
- * Import Ajax
101
- *
102
- * @since 1.0.0
103
- * @version 1.0.0
104
- */
105
- if ( ! function_exists( 'spf_import_ajax' ) ) {
106
- function spf_import_ajax() {
107
-
108
- if ( ! empty( $_POST['import_data'] ) && ! empty( $_POST['unique'] ) && ! empty( $_POST['nonce'] ) && wp_verify_nonce( $_POST['nonce'], 'spf_backup_nonce' ) ) {
109
-
110
- // $import_data = unserialize( stripslashes( trim( $_POST['import_data'] ) ) );
111
- $import_data = json_decode( wp_unslash( trim( $_POST['import_data'] ) ), true );
112
-
113
- if ( is_array( $import_data ) ) {
114
-
115
- update_option( wp_unslash( $_POST['unique'] ), wp_unslash( $import_data ) );
116
- wp_send_json_success( array( 'success' => true ) );
117
 
118
- }
119
- }
120
-
121
- wp_send_json_error(
122
- array(
123
- 'success' => false,
124
- 'error' => esc_html__( 'Error while saving.', 'wp-carousel-free' ),
125
- 'debug' => $_REQUEST,
126
- )
127
- );
128
-
129
- }
130
- add_action( 'wp_ajax_spf-import', 'spf_import_ajax' );
131
- }
132
-
133
- /**
134
- *
135
- * Reset Ajax
136
- *
137
- * @since 1.0.0
138
- * @version 1.0.0
139
- */
140
- if ( ! function_exists( 'spf_reset_ajax' ) ) {
141
- function spf_reset_ajax() {
142
-
143
- if ( ! empty( $_POST['unique'] ) && ! empty( $_POST['nonce'] ) && wp_verify_nonce( $_POST['nonce'], 'spf_backup_nonce' ) ) {
144
- delete_option( wp_unslash( $_POST['unique'] ) );
145
- wp_send_json_success( array( 'success' => true ) );
146
- }
147
-
148
- wp_send_json_error(
149
- array(
150
- 'success' => false,
151
- 'error' => esc_html__( 'Error while saving.', 'wp-carousel-free' ),
152
- 'debug' => $_REQUEST,
153
- )
154
- );
155
- }
156
- add_action( 'wp_ajax_spf-reset', 'spf_reset_ajax' );
157
- }
158
-
159
- /**
160
- *
161
- * Set icons for wp dialog
162
- *
163
- * @since 1.0.0
164
- * @version 1.0.0
165
- */
166
  if ( ! function_exists( 'spf_set_icons' ) ) {
 
 
 
 
 
 
 
 
167
  function spf_set_icons() {
168
  global $post_type;
169
  if ( 'sp_wp_carousel' === $post_type ) {
@@ -190,7 +61,6 @@ if ( ! function_exists( 'spf_set_icons' ) ) {
190
  </div>
191
  <?php
192
  }
193
-
194
  }
195
  add_action( 'admin_footer', 'spf_set_icons' );
196
  add_action( 'customize_controls_print_footer_scripts', 'spf_set_icons' );
1
+ <?php
2
+ /**
3
+ * Framework Actions
4
+ *
5
+ * @package WP Carousel
6
+ * @subpackage wp-carousel-free/admin/views
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
  die; } // Cannot access directly.
11
 
12
 
25
  }
26
 
27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  if ( ! function_exists( 'spf_set_icons' ) ) {
30
+
31
+ /**
32
+ *
33
+ * Set icons for wp dialog
34
+ *
35
+ * @since 1.0.0
36
+ * @version 1.0.0
37
+ */
38
  function spf_set_icons() {
39
  global $post_type;
40
  if ( 'sp_wp_carousel' === $post_type ) {
61
  </div>
62
  <?php
63
  }
 
64
  }
65
  add_action( 'admin_footer', 'spf_set_icons' );
66
  add_action( 'customize_controls_print_footer_scripts', 'spf_set_icons' );
admin/views/wpcfree-metabox/functions/customize.php DELETED
@@ -1,115 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
- /**
3
- *
4
- * WP Customize custom panel
5
- *
6
- * @since 1.0.0
7
- * @version 1.0.0
8
- *
9
- */
10
- if( ! class_exists( 'WP_Customize_Panel_SP_WPCF' ) && class_exists( 'WP_Customize_Panel' ) ) {
11
- class WP_Customize_Panel_SP_WPCF extends WP_Customize_Panel {
12
- public $type = 'spf';
13
- }
14
- }
15
-
16
- /**
17
- *
18
- * WP Customize custom section
19
- *
20
- * @since 1.0.0
21
- * @version 1.0.0
22
- *
23
- */
24
- if( ! class_exists( 'WP_Customize_Section_SP_WPCF' ) && class_exists( 'WP_Customize_Section' ) ) {
25
- class WP_Customize_Section_SP_WPCF extends WP_Customize_Section {
26
- public $type = 'spf';
27
- }
28
- }
29
-
30
- /**
31
- *
32
- * WP Customize custom control
33
- *
34
- * @since 1.0.0
35
- * @version 1.0.0
36
- *
37
- */
38
- if( ! class_exists( 'WP_Customize_Control_SP_WPCF' ) && class_exists( 'WP_Customize_Control' ) ) {
39
- class WP_Customize_Control_SP_WPCF extends WP_Customize_Control {
40
-
41
- public $type = 'spf';
42
- public $field = '';
43
- public $unique = '';
44
-
45
- protected function render() {
46
-
47
- $depend = '';
48
- $hidden = '';
49
-
50
- if ( ! empty( $this->field['dependency'] ) ) {
51
- $hidden = ' spf-dependency-control hidden';
52
- $depend .= ' data-controller="'. $this->field['dependency'][0] .'"';
53
- $depend .= ' data-condition="'. $this->field['dependency'][1] .'"';
54
- $depend .= ' data-value="'. $this->field['dependency'][2] .'"';
55
- }
56
-
57
- $id = 'customize-control-' . str_replace( array( '[', ']' ), array( '-', '' ), $this->id );
58
- $class = 'customize-control customize-control-' . $this->type . $hidden;
59
-
60
- echo '<li id="'. $id .'" class="'. $class .'"'. $depend .'>';
61
- $this->render_content();
62
- echo '</li>';
63
-
64
- }
65
-
66
- public function render_content() {
67
-
68
- $complex = array(
69
- 'accordion',
70
- 'background',
71
- 'backup',
72
- 'border',
73
- 'button_set',
74
- 'checkbox',
75
- 'color_group',
76
- 'date',
77
- 'dimensions',
78
- 'fieldset',
79
- 'group',
80
- 'image_select',
81
- 'link_color',
82
- 'media',
83
- 'palette',
84
- 'repeater',
85
- 'sortable',
86
- 'sorter',
87
- 'switcher',
88
- 'tabbed',
89
- 'typography'
90
- );
91
-
92
- $field_id = ( ! empty( $this->field['id'] ) ) ? $this->field['id'] : '';
93
- $custom = ( ! empty( $this->field['customizer'] ) ) ? true : false;
94
- $is_complex = ( in_array( $this->field['type'], $complex ) ) ? true : false;
95
- $class = ( $is_complex || $custom ) ? ' spf-customize-complex' : '';
96
- $atts = ( $is_complex || $custom ) ? ' data-unique-id="'. $this->unique .'" data-option-id="'. $field_id .'"' : '';
97
-
98
- if( ! $is_complex && ! $custom ) {
99
- $this->field['attributes']['data-customize-setting-link'] = $this->settings['default']->id;
100
- }
101
-
102
- $this->field['name'] = $this->settings['default']->id;
103
-
104
- $this->field['dependency'] = array();
105
-
106
- echo '<div class="spf-customize-field'. $class .'"'. $atts .'>';
107
-
108
- SP_WPCF::field( $this->field, $this->value(), $this->unique, 'customize' );
109
-
110
- echo '</div>';
111
-
112
- }
113
-
114
- }
115
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/wpcfree-metabox/functions/deprecated.php DELETED
@@ -1,7 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
- /**
3
- *
4
- * Deprecated framework functions from past framework versions. You shouldn't use these
5
- * functions and look for the alternatives instead. The functions will be removed in a later version.
6
- *
7
- */
 
 
 
 
 
 
 
admin/views/wpcfree-metabox/functions/helpers.php CHANGED
@@ -1,13 +1,23 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access directly.
3
  /**
 
4
  *
5
- * Array search key & value
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
  */
 
 
 
 
10
  if ( ! function_exists( 'spf_array_search' ) ) {
 
 
 
 
 
 
 
 
11
  function spf_array_search( $array, $key, $value ) {
12
 
13
  $results = array();
@@ -27,22 +37,22 @@ if ( ! function_exists( 'spf_array_search' ) ) {
27
  }
28
  }
29
 
30
- /**
31
- *
32
- * Getting POST Var
33
- *
34
- * @since 1.0.0
35
- * @version 1.0.0
36
- */
37
  if ( ! function_exists( 'spf_get_var' ) ) {
 
 
 
 
 
 
 
38
  function spf_get_var( $var, $default = '' ) {
39
 
40
- if ( isset( $_POST[ $var ] ) ) {
41
- return $_POST[ $var ];
42
  }
43
 
44
- if ( isset( $_GET[ $var ] ) ) {
45
- return $_GET[ $var ];
46
  }
47
 
48
  return $default;
@@ -58,14 +68,22 @@ if ( ! function_exists( 'spf_get_var' ) ) {
58
  * @version 1.0.0
59
  */
60
  if ( ! function_exists( 'spf_get_vars' ) ) {
 
 
 
 
 
 
 
 
61
  function spf_get_vars( $var, $depth, $default = '' ) {
62
 
63
- if ( isset( $_POST[ $var ][ $depth ] ) ) {
64
- return $_POST[ $var ][ $depth ];
65
  }
66
 
67
- if ( isset( $_GET[ $var ][ $depth ] ) ) {
68
- return $_GET[ $var ][ $depth ];
69
  }
70
 
71
  return $default;
@@ -81,6 +99,14 @@ if ( ! function_exists( 'spf_get_vars' ) ) {
81
  * @version 1.0.0
82
  */
83
  if ( ! function_exists( 'spwf_timeout' ) ) {
 
 
 
 
 
 
 
 
84
  function spwf_timeout( $timenow, $starttime, $timeout = 30 ) {
85
 
86
  return ( ( $timenow - $starttime ) < $timeout ) ? true : false;
@@ -88,14 +114,15 @@ if ( ! function_exists( 'spwf_timeout' ) ) {
88
  }
89
  }
90
 
91
- /**
92
- *
93
- * Check for wp editor api
94
- *
95
- * @since 1.0.0
96
- * @version 1.0.0
97
- */
98
  if ( ! function_exists( 'spf_wp_editor_api' ) ) {
 
 
 
 
 
 
 
99
  function spf_wp_editor_api() {
100
 
101
  global $wp_version;
1
+ <?php
 
2
  /**
3
+ * Framework helper functions
4
  *
5
+ * @package WP Carousel
6
+ * @subpackage wp-carousel-free/admin/views
 
 
7
  */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ die; } // Cannot access directly.
11
+
12
  if ( ! function_exists( 'spf_array_search' ) ) {
13
+ /**
14
+ * Array search key & value
15
+ *
16
+ * @param mixed $array main array.
17
+ * @param mixed $key key.
18
+ * @param mixed $value val.
19
+ * @return array
20
+ */
21
  function spf_array_search( $array, $key, $value ) {
22
 
23
  $results = array();
37
  }
38
  }
39
 
 
 
 
 
 
 
 
40
  if ( ! function_exists( 'spf_get_var' ) ) {
41
+ /**
42
+ * Getting POST Var
43
+ *
44
+ * @param mixed $var var.
45
+ * @param mixed $default default.
46
+ * @return mixed
47
+ */
48
  function spf_get_var( $var, $default = '' ) {
49
 
50
+ if ( isset( $_POST[ $var ] ) ) { // phpcs:ignore
51
+ return $_POST[ $var ];// phpcs:ignore
52
  }
53
 
54
+ if ( isset( $_GET[ $var ] ) ) {// phpcs:ignore
55
+ return $_GET[ $var ];// phpcs:ignore
56
  }
57
 
58
  return $default;
68
  * @version 1.0.0
69
  */
70
  if ( ! function_exists( 'spf_get_vars' ) ) {
71
+ /**
72
+ * Getting POST Vars
73
+ *
74
+ * @param mixed $var var.
75
+ * @param mixed $depth depth.
76
+ * @param mixed $default default.
77
+ * @return mixed
78
+ */
79
  function spf_get_vars( $var, $depth, $default = '' ) {
80
 
81
+ if ( isset( $_POST[ $var ][ $depth ] ) ) { // phpcs:ignore
82
+ return $_POST[ $var ][ $depth ]; // phpcs:ignore
83
  }
84
 
85
+ if ( isset( $_GET[ $var ][ $depth ] ) ) { // phpcs:ignore
86
+ return $_GET[ $var ][ $depth ]; // phpcs:ignore
87
  }
88
 
89
  return $default;
99
  * @version 1.0.0
100
  */
101
  if ( ! function_exists( 'spwf_timeout' ) ) {
102
+ /**
103
+ * Between Microtime
104
+ *
105
+ * @param string $timenow now.
106
+ * @param string $starttime start.
107
+ * @param int $timeout timeout.
108
+ * @return bool
109
+ */
110
  function spwf_timeout( $timenow, $starttime, $timeout = 30 ) {
111
 
112
  return ( ( $timenow - $starttime ) < $timeout ) ? true : false;
114
  }
115
  }
116
 
117
+
 
 
 
 
 
 
118
  if ( ! function_exists( 'spf_wp_editor_api' ) ) {
119
+ /**
120
+ *
121
+ * Check for wp editor api
122
+ *
123
+ * @since 1.0.0
124
+ * @version 1.0.0
125
+ */
126
  function spf_wp_editor_api() {
127
 
128
  global $wp_version;
admin/views/wpcfree-metabox/functions/sanitize.php CHANGED
@@ -1,27 +1,43 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access directly.
3
  /**
 
4
  *
5
- * Sanitize
6
- * Replace letter a to letter b
7
- *
8
- * @since 1.0.0
9
- * @version 1.0.0
10
  */
 
 
 
 
11
  if ( ! function_exists( 'spf_sanitize_replace_a_to_b' ) ) {
 
 
 
 
 
 
 
 
 
 
 
12
  function spf_sanitize_replace_a_to_b( $value ) {
13
  return str_replace( 'a', 'b', $value );
14
  }
15
  }
16
 
17
- /**
18
- *
19
- * Sanitize title
20
- *
21
- * @since 1.0.0
22
- * @version 1.0.0
23
- */
24
  if ( ! function_exists( 'spf_sanitize_title' ) ) {
 
 
 
 
 
 
 
 
 
 
25
  function spf_sanitize_title( $value ) {
26
  return sanitize_title( $value );
27
  }
1
+ <?php
 
2
  /**
3
+ * Framework sanitize
4
  *
5
+ * @package WP Carousel
6
+ * @subpackage wp-carousel-free/admin/views
 
 
 
7
  */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ die; } // Cannot access directly.
11
+
12
  if ( ! function_exists( 'spf_sanitize_replace_a_to_b' ) ) {
13
+ /**
14
+ *
15
+ * Sanitize
16
+ * Replace letter a to letter b
17
+ *
18
+ * @param string $value string.
19
+ *
20
+ * @return string
21
+ * @since 1.0.0
22
+ * @version 1.0.0
23
+ */
24
  function spf_sanitize_replace_a_to_b( $value ) {
25
  return str_replace( 'a', 'b', $value );
26
  }
27
  }
28
 
29
+
 
 
 
 
 
 
30
  if ( ! function_exists( 'spf_sanitize_title' ) ) {
31
+ /**
32
+ *
33
+ * Sanitize title
34
+ *
35
+ * @param string $value string.
36
+ *
37
+ * @return string
38
+ * @since 1.0.0
39
+ * @version 1.0.0
40
+ */
41
  function spf_sanitize_title( $value ) {
42
  return sanitize_title( $value );
43
  }
admin/views/wpcfree-metabox/functions/validate.php CHANGED
@@ -1,13 +1,23 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access directly.
3
  /**
 
4
  *
5
- * Email validate
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
  */
 
 
 
 
10
  if ( ! function_exists( 'spf_validate_email' ) ) {
 
 
 
 
 
 
 
 
11
  function spf_validate_email( $value ) {
12
 
13
  if ( ! filter_var( $value, FILTER_VALIDATE_EMAIL ) ) {
@@ -17,14 +27,13 @@ if ( ! function_exists( 'spf_validate_email' ) ) {
17
  }
18
  }
19
 
20
- /**
21
- *
22
- * Numeric validate
23
- *
24
- * @since 1.0.0
25
- * @version 1.0.0
26
- */
27
  if ( ! function_exists( 'spf_validate_numeric' ) ) {
 
 
 
 
 
 
28
  function spf_validate_numeric( $value ) {
29
 
30
  if ( ! is_numeric( $value ) ) {
@@ -34,14 +43,15 @@ if ( ! function_exists( 'spf_validate_numeric' ) ) {
34
  }
35
  }
36
 
37
- /**
38
- *
39
- * Required validate
40
- *
41
- * @since 1.0.0
42
- * @version 1.0.0
43
- */
44
  if ( ! function_exists( 'spf_validate_required' ) ) {
 
 
 
 
 
 
 
 
45
  function spf_validate_required( $value ) {
46
 
47
  if ( empty( $value ) ) {
@@ -51,14 +61,16 @@ if ( ! function_exists( 'spf_validate_required' ) ) {
51
  }
52
  }
53
 
54
- /**
55
- *
56
- * URL validate
57
- *
58
- * @since 1.0.0
59
- * @version 1.0.0
60
- */
61
  if ( ! function_exists( 'spf_validate_url' ) ) {
 
 
 
 
 
 
 
 
62
  function spf_validate_url( $value ) {
63
 
64
  if ( ! filter_var( $value, FILTER_VALIDATE_URL ) ) {
@@ -67,79 +79,3 @@ if ( ! function_exists( 'spf_validate_url' ) ) {
67
 
68
  }
69
  }
70
-
71
- /**
72
- *
73
- * Email validate for Customizer
74
- *
75
- * @since 1.0.0
76
- * @version 1.0.0
77
- */
78
- if ( ! function_exists( 'spf_customize_validate_email' ) ) {
79
- function spf_customize_validate_email( $validity, $value, $wp_customize ) {
80
-
81
- if ( ! sanitize_email( $value ) ) {
82
- $validity->add( 'required', esc_html__( 'Please write a valid email address!', 'wp-carousel-free' ) );
83
- }
84
-
85
- return $validity;
86
-
87
- }
88
- }
89
-
90
- /**
91
- *
92
- * Numeric validate for Customizer
93
- *
94
- * @since 1.0.0
95
- * @version 1.0.0
96
- */
97
- if ( ! function_exists( 'spf_customize_validate_numeric' ) ) {
98
- function spf_customize_validate_numeric( $validity, $value, $wp_customize ) {
99
-
100
- if ( ! is_numeric( $value ) ) {
101
- $validity->add( 'required', esc_html__( 'Please write a numeric data!', 'wp-carousel-free' ) );
102
- }
103
-
104
- return $validity;
105
-
106
- }
107
- }
108
-
109
- /**
110
- *
111
- * Required validate for Customizer
112
- *
113
- * @since 1.0.0
114
- * @version 1.0.0
115
- */
116
- if ( ! function_exists( 'spf_customize_validate_required' ) ) {
117
- function spf_customize_validate_required( $validity, $value, $wp_customize ) {
118
-
119
- if ( empty( $value ) ) {
120
- $validity->add( 'required', esc_html__( 'Error! This field is required!', 'wp-carousel-free' ) );
121
- }
122
-
123
- return $validity;
124
-
125
- }
126
- }
127
-
128
- /**
129
- *
130
- * URL validate for Customizer
131
- *
132
- * @since 1.0.0
133
- * @version 1.0.0
134
- */
135
- if ( ! function_exists( 'spf_customize_validate_url' ) ) {
136
- function spf_customize_validate_url( $validity, $value, $wp_customize ) {
137
-
138
- if ( ! filter_var( $value, FILTER_VALIDATE_URL ) ) {
139
- $validity->add( 'required', esc_html__( 'Please write a valid url!', 'wp-carousel-free' ) );
140
- }
141
-
142
- return $validity;
143
-
144
- }
145
- }
1
+ <?php
 
2
  /**
3
+ * Framework validate
4
  *
5
+ * @package WP Carousel
6
+ * @subpackage wp-carousel-free/admin/views
 
 
7
  */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ die; } // Cannot access directly.
11
+
12
  if ( ! function_exists( 'spf_validate_email' ) ) {
13
+ /**
14
+ * Email validate
15
+ *
16
+ * @param string $value email.
17
+ * @return string
18
+ * @since 1.0.0
19
+ * @version 1.0.0
20
+ */
21
  function spf_validate_email( $value ) {
22
 
23
  if ( ! filter_var( $value, FILTER_VALIDATE_EMAIL ) ) {
27
  }
28
  }
29
 
 
 
 
 
 
 
 
30
  if ( ! function_exists( 'spf_validate_numeric' ) ) {
31
+ /**
32
+ * Numeric validate
33
+ *
34
+ * @param int $value int.
35
+ * @return int
36
+ */
37
  function spf_validate_numeric( $value ) {
38
 
39
  if ( ! is_numeric( $value ) ) {
43
  }
44
  }
45
 
 
 
 
 
 
 
 
46
  if ( ! function_exists( 'spf_validate_required' ) ) {
47
+ /**
48
+ * Required validate
49
+ *
50
+ * @param string $value string.
51
+ * @return string
52
+ * @since 1.0.0
53
+ * @version 1.0.0
54
+ */
55
  function spf_validate_required( $value ) {
56
 
57
  if ( empty( $value ) ) {
61
  }
62
  }
63
 
64
+
 
 
 
 
 
 
65
  if ( ! function_exists( 'spf_validate_url' ) ) {
66
+ /**
67
+ * URL validate
68
+ *
69
+ * @param string $value value.
70
+ * @return string
71
+ * @since 1.0.0
72
+ * @version 1.0.0
73
+ */
74
  function spf_validate_url( $value ) {
75
 
76
  if ( ! filter_var( $value, FILTER_VALIDATE_URL ) ) {
79
 
80
  }
81
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/class-wp-carosuel-free-updates.php CHANGED
@@ -31,9 +31,9 @@ class WP_Carousel_Free_Updates {
31
  *
32
  * @var array
33
  */
34
- private static $updates = [
35
  '2.1.7' => 'updates/update-2.1.7.php',
36
- ];
37
 
38
  /**
39
  * Binding all events
31
  *
32
  * @var array
33
  */
34
+ private static $updates = array(
35
  '2.1.7' => 'updates/update-2.1.7.php',
36
+ );
37
 
38
  /**
39
  * Binding all events
includes/class-wp-carousel-free-i18n.php CHANGED
@@ -36,6 +36,4 @@ class WP_Carousel_Free_I18n {
36
 
37
  }
38
 
39
-
40
-
41
  }
36
 
37
  }
38
 
 
 
39
  }
includes/class-wp-carousel-free-import-export.php CHANGED
@@ -1,7 +1,4 @@
1
  <?php
2
- if ( ! defined( 'ABSPATH' ) ) {
3
- exit; // Exit if accessed directly.
4
- }
5
  /**
6
  * Custom import export.
7
  *
@@ -12,6 +9,10 @@ if ( ! defined( 'ABSPATH' ) ) {
12
  * @subpackage WP_Carousel_free/includes.
13
  */
14
 
 
 
 
 
15
  /**
16
  * Custom import export.
17
  */
@@ -63,7 +64,7 @@ class Wp_Carousel_Free_Import_Export {
63
  }
64
  $export['metadata'] = array(
65
  'version' => WPCAROUSELF_VERSION,
66
- 'date' => date( 'Y/m/d' ),
67
  );
68
  }
69
  return $export;
@@ -76,10 +77,11 @@ class Wp_Carousel_Free_Import_Export {
76
  * @return void
77
  */
78
  public function export_shortcodes() {
79
- if ( ! wp_verify_nonce( $_POST['nonce'], 'spf_options_nonce' ) ) {
 
80
  die();
81
  }
82
- $shortcode_ids = isset( $_POST['wpcf_ids'] ) ? $_POST['wpcf_ids'] : '';
83
 
84
  $export = $this->export( $shortcode_ids );
85
 
@@ -93,8 +95,7 @@ class Wp_Carousel_Free_Import_Export {
93
  }
94
 
95
  if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
96
- // @codingStandardsIgnoreLine
97
- echo wp_json_encode($export, JSON_PRETTY_PRINT);
98
  die;
99
  }
100
 
@@ -123,7 +124,7 @@ class Wp_Carousel_Free_Import_Export {
123
  }
124
  $http = new \WP_Http();
125
  $response = $http->request( $url );
126
- if ( $response['response']['code'] != 200 ) {
127
  return false;
128
  }
129
  $upload = wp_upload_bits( basename( $url ), null, $response['body'] );
@@ -165,6 +166,7 @@ class Wp_Carousel_Free_Import_Export {
165
  *
166
  * @param mixed $shortcodes Import logo and carousel shortcode array.
167
  *
 
168
  * @return string
169
  */
170
  public function import( $shortcodes ) {
@@ -232,11 +234,12 @@ class Wp_Carousel_Free_Import_Export {
232
  * @return void
233
  */
234
  public function import_shortcodes() {
235
- if ( ! wp_verify_nonce( $_POST['nonce'], 'spf_options_nonce' ) ) {
 
236
  die();
237
  }
238
- $data = isset( $_POST['shortcode'] ) ? $_POST['shortcode'] : '';
239
- $data = json_decode( stripslashes( $data ) );
240
  $data = json_decode( $data, true );
241
  $shortcodes = $data['shortcode'];
242
  if ( ! $data ) {
1
  <?php
 
 
 
2
  /**
3
  * Custom import export.
4
  *
9
  * @subpackage WP_Carousel_free/includes.
10
  */
11
 
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ exit; // Exit if accessed directly.
14
+ }
15
+
16
  /**
17
  * Custom import export.
18
  */
64
  }
65
  $export['metadata'] = array(
66
  'version' => WPCAROUSELF_VERSION,
67
+ 'date' => gmdate( 'Y/m/d' ),
68
  );
69
  }
70
  return $export;
77
  * @return void
78
  */
79
  public function export_shortcodes() {
80
+ $nonce = ( ! empty( $_POST['nonce'] ) ) ? sanitize_text_field( wp_unslash( $_POST['nonce'] ) ) : '';
81
+ if ( ! wp_verify_nonce( $nonce, 'spf_options_nonce' ) ) {
82
  die();
83
  }
84
+ $shortcode_ids = isset( $_POST['wpcf_ids'] ) ? sanitize_text_field( wp_unslash( $_POST['wpcf_ids'] ) ) : '';
85
 
86
  $export = $this->export( $shortcode_ids );
87
 
95
  }
96
 
97
  if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
98
+ echo wp_json_encode( $export, JSON_PRETTY_PRINT );
 
99
  die;
100
  }
101
 
124
  }
125
  $http = new \WP_Http();
126
  $response = $http->request( $url );
127
+ if ( 200 !== $response['response']['code'] ) {
128
  return false;
129
  }
130
  $upload = wp_upload_bits( basename( $url ), null, $response['body'] );
166
  *
167
  * @param mixed $shortcodes Import logo and carousel shortcode array.
168
  *
169
+ * @throws \Exception .
170
  * @return string
171
  */
172
  public function import( $shortcodes ) {
234
  * @return void
235
  */
236
  public function import_shortcodes() {
237
+ $nonce = ( ! empty( $_POST['nonce'] ) ) ? sanitize_text_field( wp_unslash( $_POST['nonce'] ) ) : '';
238
+ if ( ! wp_verify_nonce( $nonce, 'spf_options_nonce' ) ) {
239
  die();
240
  }
241
+ $data = isset( $_POST['shortcode'] ) ? wp_kses_data( wp_unslash( $_POST['shortcode'] ) ) : '';
242
+ $data = json_decode( $data );
243
  $data = json_decode( $data, true );
244
  $shortcodes = $data['shortcode'];
245
  if ( ! $data ) {
includes/class-wp-carousel-free-post-types.php CHANGED
@@ -1,7 +1,4 @@
1
  <?php
2
- if ( ! defined( 'ABSPATH' ) ) {
3
- exit; // Exit if accessed directly.
4
- }
5
  /**
6
  * The file that defines the carousel post type.
7
  *
@@ -14,6 +11,10 @@ if ( ! defined( 'ABSPATH' ) ) {
14
  * @subpackage WordPress_Carousel_Pro/includes
15
  */
16
 
 
 
 
 
17
  /**
18
  * Custom post class to register the carousel.
19
  */
1
  <?php
 
 
 
2
  /**
3
  * The file that defines the carousel post type.
4
  *
11
  * @subpackage WordPress_Carousel_Pro/includes
12
  */
13
 
14
+ if ( ! defined( 'ABSPATH' ) ) {
15
+ exit; // Exit if accessed directly.
16
+ }
17
+
18
  /**
19
  * Custom post class to register the carousel.
20
  */
includes/class-wp-carousel-free-shortcode.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  /**
4
  * The file that defines the plugin shortcode class.
5
  *
@@ -86,7 +85,7 @@ class WP_Carousel_Free_Shortcode {
86
  $show_img_title = isset( $shortcode_data['wpcp_post_title'] ) ? $shortcode_data['wpcp_post_title'] : '';
87
 
88
  $_image_title_att = isset( $shortcode_data['_image_title_attr'] ) ? $shortcode_data['_image_title_attr'] : '';
89
- $show_image_title_attr = ( true == $_image_title_att ) ? 'true' : 'false';
90
  $image_sizes = isset( $shortcode_data['wpcp_image_sizes'] ) ? $shortcode_data['wpcp_image_sizes'] : '';
91
 
92
  // Carousel Column.
1
  <?php
 
2
  /**
3
  * The file that defines the plugin shortcode class.
4
  *
85
  $show_img_title = isset( $shortcode_data['wpcp_post_title'] ) ? $shortcode_data['wpcp_post_title'] : '';
86
 
87
  $_image_title_att = isset( $shortcode_data['_image_title_attr'] ) ? $shortcode_data['_image_title_attr'] : '';
88
+ $show_image_title_attr = ( $_image_title_att ) ? 'true' : 'false';
89
  $image_sizes = isset( $shortcode_data['wpcp_image_sizes'] ) ? $shortcode_data['wpcp_image_sizes'] : '';
90
 
91
  // Carousel Column.
includes/updates/update-2.1.7.php CHANGED
@@ -1,4 +1,14 @@
1
  <?php
 
 
 
 
 
 
 
 
 
 
2
  /**
3
  * Update version.
4
  */
1
  <?php
2
+ /**
3
+ * Update version
4
+ *
5
+ * @link https://shapedplugin.com/
6
+ * @since 2.1.7
7
+ *
8
+ * @package WP_Carousel_Free
9
+ * @subpackage WP_Carousel_Free/includes/updates
10
+ */
11
+
12
  /**
13
  * Update version.
14
  */
public/class-wp-carousel-free-public.php CHANGED
@@ -1,4 +1,11 @@
1
  <?php
 
 
 
 
 
 
 
2
  /**
3
  * The public-facing functionality of the plugin.
4
  */
@@ -67,7 +74,7 @@ class WP_Carousel_Free_Public {
67
  )
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';
1
  <?php
2
+ /**
3
+ * Enqueue public script for the WP Carousel
4
+ *
5
+ * @package WP Carousel
6
+ * @subpackage wp-carousel-free/public
7
+ */
8
+
9
  /**
10
  * The public-facing functionality of the plugin.
11
  */
74
  )
75
  );
76
 
77
+ $carousel_ids = $wpc_posts->posts;
78
  $the_wpcf_dynamic_css = '';
79
  foreach ( $carousel_ids as $post_id ) {
80
  include WPCAROUSELF_PATH . '/public/dynamic-style.php';
public/dynamic-style.php CHANGED
@@ -37,7 +37,7 @@ $image_border_color = isset( $shortcode_data['wpcp_product_image_border']['color
37
 
38
  $custom_css = wpcf_get_option( 'wpcp_custom_css' );
39
 
40
- if ( 'product-carousel' == $carousel_type ) {
41
  $wpcp_product_css = '#sp-wp-carousel-free-id-' . $post_id . '.sp-wpcp-' . $post_id . '.wpcp-product-carousel .wpcp-slide-image {
42
  border: ' . $image_border_width . 'px ' . $image_border_style . ' ' . $image_border_color . ';
43
  }';
37
 
38
  $custom_css = wpcf_get_option( 'wpcp_custom_css' );
39
 
40
+ if ( 'product-carousel' === $carousel_type ) {
41
  $wpcp_product_css = '#sp-wp-carousel-free-id-' . $post_id . '.sp-wpcp-' . $post_id . '.wpcp-product-carousel .wpcp-slide-image {
42
  border: ' . $image_border_width . 'px ' . $image_border_style . ' ' . $image_border_color . ';
43
  }';
public/shortcode-deprecated.php CHANGED
@@ -27,7 +27,7 @@ if ( ! function_exists( 'wp_carousel_free_shortcode' ) ) {
27
  }
28
 
29
  $output = apply_filters( 'sp_wcfgallery_shortcode', '', $attr );
30
- if ( '' != $output ) {
31
  return $output;
32
  }
33
 
@@ -38,7 +38,7 @@ if ( ! function_exists( 'wp_carousel_free_shortcode' ) ) {
38
  }
39
  }
40
 
41
- extract(
42
  shortcode_atts(
43
  array(
44
  'ids' => '',
@@ -61,11 +61,13 @@ if ( ! function_exists( 'wp_carousel_free_shortcode' ) ) {
61
  'size' => 'medium',
62
  'include' => '',
63
  'exclude' => '',
64
- ), $attr, 'gallery'
 
 
65
  )
66
  );
67
 
68
- // helper function to return shortcode regex match on instance occurring on page or post.
69
  if ( ! function_exists( 'get_match' ) ) {
70
  /**
71
  * Find and match gallery shortcode
@@ -94,7 +96,7 @@ if ( ! function_exists( 'wp_carousel_free_shortcode' ) ) {
94
  $order = 'DESC';
95
  $orderby = 'title';
96
 
97
- if ( 'RAND' == $order ) {
98
  $orderby = 'none';
99
  }
100
 
@@ -141,15 +143,16 @@ if ( ! function_exists( 'wp_carousel_free_shortcode' ) ) {
141
  return $output;
142
  }
143
 
144
- $gallery_style = $gallery_div = '';
 
145
 
146
  // Carousel Configurations.
147
  wp_enqueue_script( 'wpcf-slick' );
148
  wp_enqueue_script( 'wpcf-slick-config' );
149
- $rtl = ( 'ltr' === $carousel_direction ) ? 'true' : 'false';
150
  $wpcp_slick_options = 'data-slick=\'{ "accessibility": true, "arrows":' . $nav . ', "autoplay":' . $auto_play . ', "autoplaySpeed":' . $autoplay_speed . ', "dots":' . $bullets . ', "infinite":' . $infinite . ', "speed":' . $speed . ', "pauseOnHover":' . $pause_on_hover . ', "slidesToShow":' . $items . ', "responsive":[ { "breakpoint":1200, "settings": { "slidesToShow":' . $items_desktop . ' } }, { "breakpoint":980, "settings":{ "slidesToShow":' . $items_desktop_small . ' } }, { "breakpoint":736, "settings": { "slidesToShow":' . $items_tablet . ' } }, {"breakpoint":480, "settings":{ "slidesToShow":' . $items_mobile . ', "arrows":' . $nav_mobile . ', "dots":' . $bullets_mobile . ' } } ], "rows":1, "rtl":' . $rtl . ', "swipe":' . $swipe . ', "draggable":' . $draggable . ' }\' ';
151
 
152
- $gallery_div = "
153
  <div id='wordpress-carousel-free-$id' class='wpcp-carousel-section wpcp-standard nav-vertical-center' $wpcp_slick_options>";
154
 
155
  $output = apply_filters( 'gallery_style', $gallery_style . $gallery_div );
27
  }
28
 
29
  $output = apply_filters( 'sp_wcfgallery_shortcode', '', $attr );
30
+ if ( '' !== $output ) {
31
  return $output;
32
  }
33
 
38
  }
39
  }
40
 
41
+ extract( // @codingStandardsIgnoreLine
42
  shortcode_atts(
43
  array(
44
  'ids' => '',
61
  'size' => 'medium',
62
  'include' => '',
63
  'exclude' => '',
64
+ ),
65
+ $attr,
66
+ 'gallery'
67
  )
68
  );
69
 
70
+ // Helper function to return shortcode regex match on instance occurring on page or post.
71
  if ( ! function_exists( 'get_match' ) ) {
72
  /**
73
  * Find and match gallery shortcode
96
  $order = 'DESC';
97
  $orderby = 'title';
98
 
99
+ if ( 'RAND' === $order ) {
100
  $orderby = 'none';
101
  }
102
 
143
  return $output;
144
  }
145
 
146
+ $gallery_style = '';
147
+ $gallery_div = '';
148
 
149
  // Carousel Configurations.
150
  wp_enqueue_script( 'wpcf-slick' );
151
  wp_enqueue_script( 'wpcf-slick-config' );
152
+ $rtl = ( 'ltr' === $carousel_direction ) ? 'true' : 'false';
153
  $wpcp_slick_options = 'data-slick=\'{ "accessibility": true, "arrows":' . $nav . ', "autoplay":' . $auto_play . ', "autoplaySpeed":' . $autoplay_speed . ', "dots":' . $bullets . ', "infinite":' . $infinite . ', "speed":' . $speed . ', "pauseOnHover":' . $pause_on_hover . ', "slidesToShow":' . $items . ', "responsive":[ { "breakpoint":1200, "settings": { "slidesToShow":' . $items_desktop . ' } }, { "breakpoint":980, "settings":{ "slidesToShow":' . $items_desktop_small . ' } }, { "breakpoint":736, "settings": { "slidesToShow":' . $items_tablet . ' } }, {"breakpoint":480, "settings":{ "slidesToShow":' . $items_mobile . ', "arrows":' . $nav_mobile . ', "dots":' . $bullets_mobile . ' } } ], "rows":1, "rtl":' . $rtl . ', "swipe":' . $swipe . ', "draggable":' . $draggable . ' }\' ';
154
 
155
+ $gallery_div = "
156
  <div id='wordpress-carousel-free-$id' class='wpcp-carousel-section wpcp-standard nav-vertical-center' $wpcp_slick_options>";
157
 
158
  $output = apply_filters( 'gallery_style', $gallery_style . $gallery_div );
public/templates/image-carousel.php CHANGED
@@ -13,21 +13,21 @@ if ( ! defined( 'WPINC' ) ) {
13
 
14
  $gallery_ids = $upload_data['wpcp_gallery'];
15
  $the_image_title_at = isset( $shortcode_data['wpcp_logo_link_nofollow'] ) ? $shortcode_data['wpcp_logo_link_nofollow'] : '';
16
- $image_link_nofollow = true == $the_image_title_at ? ' rel="nofollow"' : '';
17
  if ( empty( $gallery_ids ) ) {
18
- return;
19
  }
20
- echo '<div class="wpcp-carousel-wrapper wpcp-wrapper-' . $post_id . '">';
21
  if ( $section_title ) {
22
- echo '<h2 class="sp-wpcpro-section-title">' . get_the_title( $post_id ) . '</h2>';
23
  }
24
  if ( $preloader ) {
25
  require WPCAROUSELF_PATH . '/public/templates/preloader.php';
26
  }
27
  $the_rtl = ( 'ltr' === $carousel_direction ) ? ' dir="rtl"' : ' dir="ltr"';
28
- echo '<div id="sp-wp-carousel-free-id-' . $post_id . '" class="' . $carousel_classes . '" ' . $wpcp_slick_options . ' ' . $the_rtl . '>';
29
  $attachments = explode( ',', $gallery_ids );
30
- ( ( 'rand' == $image_orderby ) ? shuffle( $attachments ) : '' );
31
  if ( is_array( $attachments ) || is_object( $attachments ) ) :
32
  foreach ( $attachments as $attachment ) {
33
  $image_data = get_post( $attachment );
@@ -41,7 +41,7 @@ if ( is_array( $attachments ) || is_object( $attachments ) ) :
41
  $image = sprintf( '<img src="%1$s"%2$s alt="%3$s" width="%4$s" height="%5$s">', $image_url[0], $image_title_attr, $image_alt_title, $image_url[1], $image_url[2] );
42
  // Single Item.
43
  echo '<div class="wpcp-single-item">';
44
- echo sprintf( '<div class="wpcp-slide-image">%1$s</div>', $image );
45
  echo '</div>';
46
  } // End foreach.
47
  endif;
13
 
14
  $gallery_ids = $upload_data['wpcp_gallery'];
15
  $the_image_title_at = isset( $shortcode_data['wpcp_logo_link_nofollow'] ) ? $shortcode_data['wpcp_logo_link_nofollow'] : '';
16
+ $image_link_nofollow = $the_image_title_at ? ' rel="nofollow"' : '';
17
  if ( empty( $gallery_ids ) ) {
18
+ return;
19
  }
20
+ echo '<div class="wpcp-carousel-wrapper wpcp-wrapper-' . esc_attr( $post_id ) . '">';
21
  if ( $section_title ) {
22
+ echo '<h2 class="sp-wpcpro-section-title">' . wp_kses_post( get_the_title( $post_id ) ) . '</h2>';
23
  }
24
  if ( $preloader ) {
25
  require WPCAROUSELF_PATH . '/public/templates/preloader.php';
26
  }
27
  $the_rtl = ( 'ltr' === $carousel_direction ) ? ' dir="rtl"' : ' dir="ltr"';
28
+ echo wp_kses_post( '<div id="sp-wp-carousel-free-id-' . $post_id . '" class="' . $carousel_classes . '" ' . $wpcp_slick_options . ' ' . $the_rtl . '>' );
29
  $attachments = explode( ',', $gallery_ids );
30
+ ( ( 'rand' === $image_orderby ) ? shuffle( $attachments ) : '' );
31
  if ( is_array( $attachments ) || is_object( $attachments ) ) :
32
  foreach ( $attachments as $attachment ) {
33
  $image_data = get_post( $attachment );
41
  $image = sprintf( '<img src="%1$s"%2$s alt="%3$s" width="%4$s" height="%5$s">', $image_url[0], $image_title_attr, $image_alt_title, $image_url[1], $image_url[2] );
42
  // Single Item.
43
  echo '<div class="wpcp-single-item">';
44
+ echo sprintf( '<div class="wpcp-slide-image">%1$s</div>', wp_kses_post( $image ) );
45
  echo '</div>';
46
  } // End foreach.
47
  endif;
public/templates/post-carousel.php CHANGED
@@ -26,15 +26,15 @@ $show_post_author = $shortcode_data['wpcp_post_author_show'];
26
  );
27
 
28
  // Carousel Wrapper Start.
29
- echo '<div class="wpcp-carousel-wrapper wpcp-wrapper-' . $post_id . '">';
30
  if ( $section_title ) {
31
- echo '<h2 class="sp-wpcpro-section-title">' . get_the_title( $post_id ) . '</h2>';
32
  }
33
  if ( $preloader ) {
34
  require WPCAROUSELF_PATH . '/public/templates/preloader.php';
35
  }
36
  $the_rtl = ( 'ltr' === $carousel_direction ) ? ' dir="rtl"' : ' dir="ltr"';
37
- echo '<div id="sp-wp-carousel-free-id-' . $post_id . '" class="' . $carousel_classes . '" ' . $wpcp_slick_options . ' ' . $the_rtl . '>';
38
  $post_query = new WP_Query( $args );
39
  if ( $post_query->have_posts() ) {
40
  while ( $post_query->have_posts() ) :
@@ -82,7 +82,7 @@ $show_post_author = $shortcode_data['wpcp_post_author_show'];
82
 
83
  if ( $image || $all_captions ) {
84
  echo '<div class="wpcp-single-item">';
85
- echo $image . $all_captions;
86
  echo '</div>';
87
  }
88
  endwhile;
26
  );
27
 
28
  // Carousel Wrapper Start.
29
+ echo '<div class="wpcp-carousel-wrapper wpcp-wrapper-' . esc_attr( $post_id ) . '">';
30
  if ( $section_title ) {
31
+ echo '<h2 class="sp-wpcpro-section-title">' . wp_kses_post( get_the_title( $post_id ) ) . '</h2>';
32
  }
33
  if ( $preloader ) {
34
  require WPCAROUSELF_PATH . '/public/templates/preloader.php';
35
  }
36
  $the_rtl = ( 'ltr' === $carousel_direction ) ? ' dir="rtl"' : ' dir="ltr"';
37
+ echo wp_kses_post( '<div id="sp-wp-carousel-free-id-' . $post_id . '" class="' . $carousel_classes . '" ' . $wpcp_slick_options . ' ' . $the_rtl . '>' );
38
  $post_query = new WP_Query( $args );
39
  if ( $post_query->have_posts() ) {
40
  while ( $post_query->have_posts() ) :
82
 
83
  if ( $image || $all_captions ) {
84
  echo '<div class="wpcp-single-item">';
85
+ echo wp_kses_post( $image . $all_captions );
86
  echo '</div>';
87
  }
88
  endwhile;
public/templates/preloader.php CHANGED
@@ -12,7 +12,7 @@ if ( ! defined( 'WPINC' ) ) {
12
  }
13
  $preloader_image = WPCAROUSELF_URL . 'public/css/ajax-loader.gif';
14
  if ( ! empty( $preloader_image ) ) {
15
- echo '<div id="wpcp-preloader-' . $post_id . '" class="wpcp-carousel-preloader">';
16
- echo '<img src=" ' . $preloader_image . ' "/>';
17
  echo '</div>';
18
  }
12
  }
13
  $preloader_image = WPCAROUSELF_URL . 'public/css/ajax-loader.gif';
14
  if ( ! empty( $preloader_image ) ) {
15
+ echo '<div id="wpcp-preloader-' . esc_attr( $post_id ) . '" class="wpcp-carousel-preloader">';
16
+ echo '<img src=" ' . esc_url( $preloader_image ) . ' "/>';
17
  echo '</div>';
18
  }
public/templates/product-carousel.php CHANGED
@@ -16,7 +16,6 @@ if ( ! class_exists( 'WooCommerce' ) ) {
16
 
17
  $number_of_total_products = $upload_data['wpcp_total_products'];
18
 
19
- // $show_product_image = $shortcode_data['show_image'];
20
  $show_product_name = $shortcode_data['wpcp_product_name'];
21
  $show_product_price = $shortcode_data['wpcp_product_price'];
22
  $show_product_rating = $shortcode_data['wpcp_product_rating'];
@@ -28,7 +27,7 @@ $show_product_cart = $shortcode_data['wpcp_product_cart'];
28
  'posts_per_page' => $number_of_total_products,
29
  'order' => $post_order,
30
  'orderby' => $post_order_by,
31
- 'meta_query' => array(
32
  array(
33
  'key' => '_stock_status',
34
  'value' => 'outofstock',
@@ -39,15 +38,15 @@ $show_product_cart = $shortcode_data['wpcp_product_cart'];
39
  $product_query = new WP_Query( $default_args );
40
 
41
  // Carousel Wrapper Start.
42
- echo '<div class="wpcp-carousel-wrapper wpcp-wrapper-' . $post_id . '">';
43
  if ( $section_title ) {
44
- echo '<h2 class="sp-wpcpro-section-title">' . get_the_title( $post_id ) . '</h2>';
45
  }
46
  if ( $preloader ) {
47
  require WPCAROUSELF_PATH . '/public/templates/preloader.php';
48
  }
49
  $the_rtl = ( 'ltr' === $carousel_direction ) ? ' dir="rtl"' : ' dir="ltr"';
50
- echo '<div id="sp-wp-carousel-free-id-' . $post_id . '" class="' . $carousel_classes . '" ' . $wpcp_slick_options . ' ' . $the_rtl . '">';
51
  if ( $product_query->have_posts() ) {
52
  while ( $product_query->have_posts() ) :
53
  $product_query->the_post();
@@ -58,7 +57,7 @@ $show_product_cart = $shortcode_data['wpcp_product_cart'];
58
  $product_thumb_alt_text = get_post_meta( $product_thumb_id, '_wp_attachment_image_alt', true );
59
  $image_url = wp_get_attachment_image_src( $product_thumb_id, $image_sizes );
60
  $the_image_title_attr = ' title="' . get_the_title() . '"';
61
- $image_title_attr = 'true' == $show_image_title_attr ? $the_image_title_attr : '';
62
 
63
  // Product Thumbnail.
64
  $wpcp_product_image = '';
@@ -90,7 +89,7 @@ $show_product_cart = $shortcode_data['wpcp_product_cart'];
90
  if ( $show_product_name || $show_product_rating || $show_product_price || $show_product_cart ) {
91
  $wpcp_product_details = '<div class="wpcp-all-captions">' . ( ( $show_product_name ) && isset( $wpcp_product_name ) ? $wpcp_product_name : '' ) . ( $show_product_price && isset( $wpcp_product_price ) ? $wpcp_product_price : '' ) . ( $show_product_rating && isset( $wpcp_product_rating ) ? $wpcp_product_rating : '' ) . ( $show_product_cart ? $wpcp_cart_button : '' ) . '</div>';
92
  }
93
- echo $wpcp_product_image . $wpcp_product_details;
94
  echo '</div>';
95
 
96
  endwhile;
16
 
17
  $number_of_total_products = $upload_data['wpcp_total_products'];
18
 
 
19
  $show_product_name = $shortcode_data['wpcp_product_name'];
20
  $show_product_price = $shortcode_data['wpcp_product_price'];
21
  $show_product_rating = $shortcode_data['wpcp_product_rating'];
27
  'posts_per_page' => $number_of_total_products,
28
  'order' => $post_order,
29
  'orderby' => $post_order_by,
30
+ 'meta_query' => array( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query
31
  array(
32
  'key' => '_stock_status',
33
  'value' => 'outofstock',
38
  $product_query = new WP_Query( $default_args );
39
 
40
  // Carousel Wrapper Start.
41
+ echo '<div class="wpcp-carousel-wrapper wpcp-wrapper-' . esc_attr( $post_id ) . '">';
42
  if ( $section_title ) {
43
+ echo '<h2 class="sp-wpcpro-section-title">' . wp_kses_post( get_the_title( $post_id ) ) . '</h2>';
44
  }
45
  if ( $preloader ) {
46
  require WPCAROUSELF_PATH . '/public/templates/preloader.php';
47
  }
48
  $the_rtl = ( 'ltr' === $carousel_direction ) ? ' dir="rtl"' : ' dir="ltr"';
49
+ echo wp_kses_post( '<div id="sp-wp-carousel-free-id-' . $post_id . '" class="' . $carousel_classes . '" ' . $wpcp_slick_options . ' ' . $the_rtl . '">' );
50
  if ( $product_query->have_posts() ) {
51
  while ( $product_query->have_posts() ) :
52
  $product_query->the_post();
57
  $product_thumb_alt_text = get_post_meta( $product_thumb_id, '_wp_attachment_image_alt', true );
58
  $image_url = wp_get_attachment_image_src( $product_thumb_id, $image_sizes );
59
  $the_image_title_attr = ' title="' . get_the_title() . '"';
60
+ $image_title_attr = $show_image_title_attr ? $the_image_title_attr : '';
61
 
62
  // Product Thumbnail.
63
  $wpcp_product_image = '';
89
  if ( $show_product_name || $show_product_rating || $show_product_price || $show_product_cart ) {
90
  $wpcp_product_details = '<div class="wpcp-all-captions">' . ( ( $show_product_name ) && isset( $wpcp_product_name ) ? $wpcp_product_name : '' ) . ( $show_product_price && isset( $wpcp_product_price ) ? $wpcp_product_price : '' ) . ( $show_product_rating && isset( $wpcp_product_rating ) ? $wpcp_product_rating : '' ) . ( $show_product_cart ? $wpcp_cart_button : '' ) . '</div>';
91
  }
92
+ echo wp_kses_post( $wpcp_product_image . $wpcp_product_details );
93
  echo '</div>';
94
 
95
  endwhile;
readme.txt CHANGED
@@ -4,6 +4,7 @@ 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.5
6
  Tested up to: 5.8
 
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -326,6 +327,9 @@ Thank you!
326
 
327
  == Changelog ==
328
 
 
 
 
329
  = 2.2.1 – Jul 15, 2021 =
330
  * Improved: Accessibility color and backend typo.
331
  * Tested: WooCommerce 5.5.1 compatibility.
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.5
6
  Tested up to: 5.8
7
+ Stable tag: 2.2.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
327
 
328
  == Changelog ==
329
 
330
+ = 2.2.2 – Aug 13, 2021 =
331
+ * Fix: Plugin security issue.
332
+
333
  = 2.2.1 – Jul 15, 2021 =
334
  * Improved: Accessibility color and backend typo.
335
  * Tested: WooCommerce 5.5.1 compatibility.
uninstall.php CHANGED
@@ -40,8 +40,8 @@ function sp_wpcf_delete_plugin_data() {
40
  delete_post_meta_by_key( 'sp_wpcp_shortcode_options' );
41
  }
42
 
43
- // Load WPCP file.
44
- require plugin_dir_path( __FILE__ ) . '/wp-carousel-free.php';
45
  if ( function_exists( 'wpcf_get_option' ) ) {
46
  $wpcp_plugin_data = wpcf_get_option( 'wpcf_delete_all_data', false );
47
  }
40
  delete_post_meta_by_key( 'sp_wpcp_shortcode_options' );
41
  }
42
 
43
+ // Load WPCP file.
44
+ require plugin_dir_path( __FILE__ ) . '/wp-carousel-free.php';
45
  if ( function_exists( 'wpcf_get_option' ) ) {
46
  $wpcp_plugin_data = wpcf_get_option( 'wpcf_delete_all_data', false );
47
  }
wp-carousel-free.php CHANGED
@@ -9,7 +9,7 @@
9
  * Plugin Name: WordPress Carousel
10
  * Plugin URI: https://shapedplugin.com/plugin/wordpress-carousel-pro/?ref=1
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.2.1
13
  * Author: ShapedPlugin
14
  * Author URI: https://shapedplugin.com/
15
  * License: GPL-2.0+
@@ -17,7 +17,7 @@
17
  * Text Domain: wp-carousel-free
18
  * Domain Path: /languages
19
  * WC requires at least: 4.0
20
- * WC tested up to: 5.5.1
21
  */
22
 
23
  // If this file is called directly, abort.
@@ -119,7 +119,7 @@ class SP_WP_Carousel_Free {
119
  */
120
  public function setup() {
121
  $this->plugin_name = 'wp-carousel-free';
122
- $this->version = '2.2.1';
123
  $this->define_constants();
124
  $this->includes();
125
  $this->load_dependencies();
@@ -213,7 +213,7 @@ class SP_WP_Carousel_Free {
213
  * @access private
214
  */
215
  private function set_locale() {
216
- $plugin_i18n = new WP_Carousel_Free_I18n();
217
  $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
218
  }
219
 
@@ -293,7 +293,7 @@ class SP_WP_Carousel_Free {
293
  * @return string The name of the plugin.
294
  */
295
  public function get_plugin_name() {
296
- return $this->plugin_name;
297
  }
298
 
299
  /**
@@ -303,7 +303,7 @@ class SP_WP_Carousel_Free {
303
  * @return string The version number of the plugin.
304
  */
305
  public function get_version() {
306
- return $this->version;
307
  }
308
 
309
  /**
@@ -322,7 +322,7 @@ class SP_WP_Carousel_Free {
322
  * @since 2.0.0
323
  */
324
  public function run() {
325
- $this->loader->run();
326
  }
327
 
328
  } // SP_WP_Carousel_Free
9
  * Plugin Name: WordPress Carousel
10
  * Plugin URI: https://shapedplugin.com/plugin/wordpress-carousel-pro/?ref=1
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.2.2
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: 4.0
20
+ * WC tested up to: 5.5.2
21
  */
22
 
23
  // If this file is called directly, abort.
119
  */
120
  public function setup() {
121
  $this->plugin_name = 'wp-carousel-free';
122
+ $this->version = '2.2.2';
123
  $this->define_constants();
124
  $this->includes();
125
  $this->load_dependencies();
213
  * @access private
214
  */
215
  private function set_locale() {
216
+ $plugin_i18n = new WP_Carousel_Free_I18n();
217
  $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
218
  }
219
 
293
  * @return string The name of the plugin.
294
  */
295
  public function get_plugin_name() {
296
+ return $this->plugin_name;
297
  }
298
 
299
  /**
303
  * @return string The version number of the plugin.
304
  */
305
  public function get_version() {
306
+ return $this->version;
307
  }
308
 
309
  /**
322
  * @since 2.0.0
323
  */
324
  public function run() {
325
+ $this->loader->run();
326
  }
327
 
328
  } // SP_WP_Carousel_Free