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

Version Description

Sep 09, 2021 = * Updated: Plugin framework. * Fix: Minor tweaking.

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

Code changes from version 2.2.2 to 2.3.0

Files changed (84) hide show
  1. admin/css/wp-carousel-free-admin.css +3 -3
  2. admin/css/wp-carousel-free-admin.min.css +1 -1
  3. admin/js/wp-carousel-free-admin.js +4 -3
  4. admin/js/wp-carousel-free-admin.min.js +1 -1
  5. admin/views/metabox-config.php +96 -114
  6. admin/views/notices/review.php +1 -1
  7. admin/views/option-config.php +1 -0
  8. admin/views/premium.php +4 -4
  9. admin/views/sp-framework/assets/css/style-rtl.css +565 -0
  10. admin/views/sp-framework/assets/css/style-rtl.min.css +1 -0
  11. admin/views/sp-framework/assets/css/style.css +3616 -0
  12. admin/views/sp-framework/assets/css/style.min.css +1 -0
  13. admin/views/sp-framework/assets/images/checkerboard.png +0 -0
  14. admin/views/{wpcfree-metabox → sp-framework}/assets/images/copy.svg +0 -0
  15. admin/views/{wpcfree-metabox → sp-framework}/assets/images/export-icon.svg +0 -0
  16. admin/views/{wpcfree-metabox → sp-framework}/assets/images/file-export-icon1.svg +0 -0
  17. admin/views/{wpcfree-metabox → sp-framework}/assets/images/file-import-icon1.svg +0 -0
  18. admin/views/{wpcfree-metabox → sp-framework}/assets/images/import.svg +0 -0
  19. admin/views/sp-framework/assets/images/wp-logo.svg +1 -0
  20. admin/views/sp-framework/assets/images/wp-plugin-logo.svg +1 -0
  21. admin/views/sp-framework/assets/js/main.js +2632 -0
  22. admin/views/sp-framework/assets/js/main.min.js +1 -0
  23. admin/views/{wpcfree-metabox/assets/js/spf-plugins.js → sp-framework/assets/js/plugins.js} +353 -9
  24. admin/views/sp-framework/assets/js/plugins.min.js +12 -0
  25. admin/views/sp-framework/classes/abstract.class.php +164 -0
  26. admin/views/sp-framework/classes/admin-options.class.php +878 -0
  27. admin/views/sp-framework/classes/fields.class.php +572 -0
  28. admin/views/sp-framework/classes/metabox-options.class.php +495 -0
  29. admin/views/sp-framework/classes/setup.class.php +592 -0
  30. admin/views/{wpcfree-metabox → sp-framework}/fields/border/border.php +60 -35
  31. admin/views/sp-framework/fields/button_set/button_set.php +102 -0
  32. admin/views/{wpcfree-metabox → sp-framework}/fields/carousel_type/carousel_type.php +22 -8
  33. admin/views/sp-framework/fields/checkbox/checkbox.php +121 -0
  34. admin/views/{wpcfree-metabox → sp-framework}/fields/code_editor/code_editor.php +29 -14
  35. admin/views/{wpcfree-metabox → sp-framework}/fields/color/color.php +33 -11
  36. admin/views/{wpcfree-metabox → sp-framework}/fields/color_group/color_group.php +26 -17
  37. admin/views/{wpcfree-metabox → sp-framework}/fields/column/column.php +26 -26
  38. admin/views/sp-framework/fields/content/content.php +57 -0
  39. admin/views/{wpcfree-metabox → sp-framework}/fields/custom_import/custom_import.php +19 -6
  40. admin/views/sp-framework/fields/gallery/gallery.php +84 -0
  41. admin/views/{wpcfree-metabox → sp-framework}/fields/heading/heading.php +16 -4
  42. admin/views/{wpcfree-metabox → sp-framework}/fields/image_select/image_select.php +42 -15
  43. admin/views/{wpcfree-metabox → sp-framework}/fields/image_sizes/image_sizes.php +26 -9
  44. admin/views/{wpcfree-metabox → sp-framework/fields}/index.php +0 -0
  45. admin/views/{wpcfree-metabox → sp-framework}/fields/media/media.php +51 -24
  46. admin/views/{wpcfree-metabox → sp-framework}/fields/notice/notice.php +16 -7
  47. admin/views/sp-framework/fields/number/number.php +97 -0
  48. admin/views/sp-framework/fields/radio/radio.php +123 -0
  49. admin/views/sp-framework/fields/select/select.php +170 -0
  50. admin/views/sp-framework/fields/shortcode/shortcode.php +42 -0
  51. admin/views/{wpcfree-metabox → sp-framework}/fields/spacing/spacing.php +78 -37
  52. admin/views/{wpcfree-metabox → sp-framework}/fields/spinner/spinner.php +21 -11
  53. admin/views/{wpcfree-metabox → sp-framework}/fields/subheading/subheading.php +21 -5
  54. admin/views/sp-framework/fields/switcher/switcher.php +66 -0
  55. admin/views/{wpcfree-metabox → sp-framework}/fields/text/text.php +17 -5
  56. admin/views/sp-framework/fields/textarea/textarea.php +71 -0
  57. admin/views/sp-framework/fields/typography/typography.php +639 -0
  58. admin/views/sp-framework/functions/actions.php +165 -0
  59. admin/views/sp-framework/functions/helpers.php +67 -0
  60. admin/views/{wpcfree-metabox → sp-framework}/functions/sanitize.php +4 -4
  61. admin/views/{wpcfree-metabox → sp-framework}/functions/validate.php +14 -15
  62. admin/views/sp-framework/index.php +1 -0
  63. admin/views/wpcfree-metabox/assets/css/spf-rtl.css +0 -537
  64. admin/views/wpcfree-metabox/assets/css/spf-rtl.min.css +0 -1
  65. admin/views/wpcfree-metabox/assets/css/spf.css +0 -5146
  66. admin/views/wpcfree-metabox/assets/css/spf.min.css +0 -1
  67. admin/views/wpcfree-metabox/assets/js/spf-gutenberg-block.js +0 -79
  68. admin/views/wpcfree-metabox/assets/js/spf-gutenberg-block.min.js +0 -1
  69. admin/views/wpcfree-metabox/assets/js/spf-plugins.min.js +0 -1
  70. admin/views/wpcfree-metabox/assets/js/spf.js +0 -2640
  71. admin/views/wpcfree-metabox/assets/js/spf.min.js +0 -1
  72. admin/views/wpcfree-metabox/classes/abstract.class.php +0 -63
  73. admin/views/wpcfree-metabox/classes/fields.class.php +0 -313
  74. admin/views/wpcfree-metabox/classes/metabox.class.php +0 -457
  75. admin/views/wpcfree-metabox/classes/options.class.php +0 -820
  76. admin/views/wpcfree-metabox/classes/setup.class.php +0 -475
  77. admin/views/wpcfree-metabox/classes/widgets.class.php +0 -164
  78. admin/views/wpcfree-metabox/fields/button_set/button_set.php +0 -80
  79. admin/views/wpcfree-metabox/fields/checkbox/checkbox.php +0 -73
  80. admin/views/wpcfree-metabox/fields/gallery/gallery.php +0 -69
  81. admin/views/wpcfree-metabox/fields/index.php +0 -1
  82. admin/views/wpcfree-metabox/fields/radio/radio.php +0 -72
  83. admin/views/wpcfree-metabox/fields/select/select.php +0 -99
  84. admin/views/wpcfree-metabox/fields/selectf/selectf.php +0 -0
admin/css/wp-carousel-free-admin.css CHANGED
@@ -14,13 +14,13 @@
14
  .js .tmce-active .wp-editor-area{
15
  color:#000000;
16
  }
17
- .disable-color-picker .spf-field-color {
18
  pointer-events: none;
19
  opacity: .6;
20
  }
21
 
22
  /* Admin Preloader */
23
- .sp_wpcp_shortcode_generator .spf-wrapper{
24
  min-height:200px;
25
  z-index:999;
26
  background-image:url(../img/preloader.gif);
@@ -28,7 +28,7 @@
28
  background-color:#fff;
29
  background-position:center;
30
  }
31
- .sp_wpcp_shortcode_generator .spf-wrapper li{
32
  opacity:0;
33
  }
34
  /* Help Page */
14
  .js .tmce-active .wp-editor-area{
15
  color:#000000;
16
  }
17
+ .disable-color-picker .wpcf-field-color {
18
  pointer-events: none;
19
  opacity: .6;
20
  }
21
 
22
  /* Admin Preloader */
23
+ .sp_wpcp_shortcode_generator .wpcf-wrapper{
24
  min-height:200px;
25
  z-index:999;
26
  background-image:url(../img/preloader.gif);
28
  background-color:#fff;
29
  background-position:center;
30
  }
31
+ .sp_wpcp_shortcode_generator .wpcf-wrapper li{
32
  opacity:0;
33
  }
34
  /* Help Page */
admin/css/wp-carousel-free-admin.min.css CHANGED
@@ -1 +1 @@
1
- .text-center{text-align:center}#adminmenu .menu-icon-sp_wp_carousel .wp-menu-image img{width:22px;padding:7px 0;height:20px}.spwpcp-gallery-list li{display:inline;margin:5px}.js .tmce-active .wp-editor-area{color:#000}.disable-color-picker .spf-field-color{pointer-events:none;opacity:.6}.sp_wpcp_shortcode_generator .spf-wrapper{min-height:200px;z-index:999;background-image:url(../img/preloader.gif);background-repeat:no-repeat;background-color:#fff;background-position:center}.sp_wpcp_shortcode_generator .spf-wrapper li{opacity:0}.sp-wpcp-help .wp-badge{border:none;background:url(../img/wpcp-icon-256.png) right no-repeat;background-size:100px 100px;box-shadow:none;height:auto;top:-75px}.about-wrap.sp-wpcf-upgrade [class$="-col"],.about-wrap.sp-wpcp-help [class$="-col"]{display:flex;justify-content:space-between;flex-wrap:wrap}.about-wrap.sp-wpcf-upgrade [class$="-col"] .col,.about-wrap.sp-wpcp-help [class$="-col"] .col{flex:1;align-self:flex-start}.about-wrap.sp-wpcp-help .feature-section .col{margin-top:40px}.about-wrap.sp-wpcf-upgrade [class$="-col"] .col+.col{margin-left:0}.about-wrap.sp-wpcp-help [class$="-col"] .col+.col{margin-left:20px}.sp-wpcf-upgrade .headline-feature.feature-video,.sp-wpcp-help .headline-feature.feature-video{position:relative;margin:40px 0;padding-bottom:56.25%;width:100%;max-width:100%;height:0;text-align:center}.sp-wpcf-upgrade .headline-feature.feature-video iframe,.sp-wpcp-help .headline-feature.feature-video iframe{position:absolute;top:0;left:0;width:100%;height:100%}.sp-wpcp-help .feature-section .sp-wpcp-feature{background-color:#fff;padding:20px 20px;border:1px solid #ddd}.sp-wpcp-help .feature-section .sp-wpcp-feature h3{font-size:16px;margin-top:18px}.sp-wpcp-help .feature-section i.sp-wpcp-font-icon{font-size:30px;display:block;color:#18afb9;font-family:fontawesome;font-style:normal}@media (max-width:500px){.sp-wpcp-help .wp-badge{background-position-x:center;top:0}}.sp-wpc-text-center{text-align:center}.sp-wpcf-upgrade>h1{font-size:2.5em;color:#444;font-weight:300}.sp-wpcf-upgrade>h1 span{font-weight:400}.sp-wpcf-upgrade .about-text{margin-bottom:0}.sp-wpcf-upgrade ul{margin-top:0}.sp-wpcf-upgrade .wp-badge{border:none;background:url(../img/premium-logo.png) no-repeat;background-size:150px 150px;box-shadow:none;top:0;padding-right:8px}.about-wrap.sp-wpcf-upgrade .about-text{min-height:60px}.about-wrap.sp-wpcf-upgrade hr{order:0;height:0;margin:0;border-top:1px solid rgba(0,0,0,.1)}.sp-wpcf-upgrade .feature-section .sp-wpc-feature{background-color:#fff;padding:20px 20px;border:1px solid #ddd}.sp-wpcf-upgrade .feature-section .sp-wpc-feature h3{font-size:16px;margin-top:18px}.sp-wpcf-upgrade .feature-section i.fa{font-size:30px;display:block;color:#22afba}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section span.dashicons{font-size:22px;color:#fff;background-color:#22afba;width:28px;height:28px;line-height:28px;border-radius:50%;margin-right:10px}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section{margin-bottom:40px;display:flex;flex-wrap:wrap}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section .sp-wpc-feature h3{margin-top:0}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section .sp-wpc-feature p{margin-bottom:0}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section .sp-wpc-feature{box-shadow:0 0 10px 0 #ddd;margin:4px;border:0 solid}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section.three-col .col{min-width:32%;max-width:32%;margin-top:20px;display:flex;align-self:auto}.sp-wpcf-upgrade .sp-wpc-pro-features .sp-wpc-pro-subtitle{font-size:1.2em;margin-bottom:26px}.sp-wpcf-upgrade .sp-wpc-upgrade-sticky-footer{position:fixed;bottom:0;background:#fff;width:calc(100% - 195px);z-index:9;margin-left:-25px;text-align:center;border:1px solid #dfdfdf;padding:15px 0;border-bottom:none}.sp-wpcf-upgrade .sp-wpc-pro-features h2,.sp-wpcf-upgrade .sp-wpcp-promo-video-title{font-size:2.2em;font-weight:400}.sp-wpcp-join-community h2{font-size:2em}.sp-wpcf-upgrade .sp-wpc-upgrade-sticky-footer h3{margin-top:17px;margin-bottom:20px}.sp-wpcf-upgrade .sp-wpc-upgrade-sticky-footer a.button{margin:0 8px}.sp-wpcf-upgrade .wpcf-upgrade-btn{display:inline-block;padding:0 20px 0 0}.sp-wpcf-upgrade .wpcf-upgrade-btn a,.sp-wpcf-upgrade a.wpcf-upgrade-btn{text-decoration:none;text-align:center;font-size:16px}.sp-wpcf-upgrade .wpcf-upgrade-btn a:focus{outline:0}.sp-wpcf-upgrade a.wpcf-upgrade-btn,.sp-wpcf-upgrade ul li.wpcf-upgrade-btn:first-child a{background:#7cc048;padding:0 15px;line-height:46px;display:block;color:#fff;border-radius:3px}.sp-wpcf-upgrade ul li.wpcf-upgrade-btn:last-child a{text-decoration:underline}.sp-wpcf-upgrade ul li.wpcf-upgrade-btn a i{margin-left:4px}.sp-wpcf-upgrade ul li.wpcf-upgrade-btn:last-child a i{font-size:14px}.sp-wpcf-upgrade a.wpcf-upgrade-btn{display:inline-block}#sp-wpcfree-review-notice{padding:15px 15px 15px 0;background-color:#fff;border-radius:3px;margin:20px 20px 0 0}#sp-wpcfree-review-notice .sp-wpcfree-plugin-icon{width:125px;float:left;line-height:90px;text-align:center}#sp-wpcfree-review-notice .sp-wpcfree-plugin-icon img{max-width:83px;vertical-align:middle}#sp-wpcfree-review-notice .sp-wpcfree-notice-text{overflow:hidden}#sp-wpcfree-review-notice .sp-wpcfree-notice-text h3{font-size:24px;margin:0 0 5px;font-weight:400;line-height:1}#sp-wpcfree-review-notice .sp-wpcfree-notice-text p{margin:10px 0 10px 0;font-size:13px}#sp-wpcfree-review-notice .sp-wpcfree-notice-text p.sp-wpcfree-review-actions{margin:10px 0 2px 0}#sp-wpcfree-review-notice .sp-wpcfree-notice-text .sp-wpcfree-review-actions a{text-decoration:none;margin-right:8px;color:#63a37b;display:inline-block;position:relative}#sp-wpcfree-review-notice .sp-wpcfree-notice-text .sp-wpcfree-review-actions a span{padding-right:2px}#sp-wpcfree-review-notice .sp-wpcfree-notice-text .sp-wpcfree-review-actions a.button{color:#fff}@media screen and (max-width:782px){.about-wrap .three-col .col{min-width:48%!important;max-width:48%!important;margin-left:0!important}.about-wrap.sp-wpcp-help .feature-section .col{margin-top:20px}}@media (max-width:960px){.sp-wpc-help .sp-wpc-upgrade-sticky-footer{width:calc(100%)}}@media only screen and (max-width:500px){.about-wrap .three-col .col{min-width:100%!important}.sp-wpcf-upgrade .wp-badge{background-position-x:center}}.spwpc-copy-btn{width:16px;margin-left:13px;position:absolute;top:50%;margin-top:-8px}.spwpc-after-copy-text{bottom:0;opacity:0;z-index:9999999;position:fixed;width:230px;left:180px;text-align:center;padding:15px 15px;line-height:15px;color:#fff;border-radius:3px;background:#32373c;border:1px solid #32373c}.spwpc-after-copy-text .fa-check-circle{font-size:14px;margin-right:2px;color:#5db62e}
1
+ .text-center{text-align:center}#adminmenu .menu-icon-sp_wp_carousel .wp-menu-image img{width:22px;padding:7px 0;height:20px}.spwpcp-gallery-list li{display:inline;margin:5px}.js .tmce-active .wp-editor-area{color:#000}.disable-color-picker .wpcf-field-color{pointer-events:none;opacity:.6}.sp_wpcp_shortcode_generator .wpcf-wrapper{min-height:200px;z-index:999;background-image:url(../img/preloader.gif);background-repeat:no-repeat;background-color:#fff;background-position:center}.sp_wpcp_shortcode_generator .wpcf-wrapper li{opacity:0}.sp-wpcp-help .wp-badge{border:none;background:url(../img/wpcp-icon-256.png) right no-repeat;background-size:100px 100px;box-shadow:none;height:auto;top:-75px}.about-wrap.sp-wpcf-upgrade [class$="-col"],.about-wrap.sp-wpcp-help [class$="-col"]{display:flex;justify-content:space-between;flex-wrap:wrap}.about-wrap.sp-wpcf-upgrade [class$="-col"] .col,.about-wrap.sp-wpcp-help [class$="-col"] .col{flex:1;align-self:flex-start}.about-wrap.sp-wpcp-help .feature-section .col{margin-top:40px}.about-wrap.sp-wpcf-upgrade [class$="-col"] .col+.col{margin-left:0}.about-wrap.sp-wpcp-help [class$="-col"] .col+.col{margin-left:20px}.sp-wpcf-upgrade .headline-feature.feature-video,.sp-wpcp-help .headline-feature.feature-video{position:relative;margin:40px 0;padding-bottom:56.25%;width:100%;max-width:100%;height:0;text-align:center}.sp-wpcf-upgrade .headline-feature.feature-video iframe,.sp-wpcp-help .headline-feature.feature-video iframe{position:absolute;top:0;left:0;width:100%;height:100%}.sp-wpcp-help .feature-section .sp-wpcp-feature{background-color:#fff;padding:20px 20px;border:1px solid #ddd}.sp-wpcp-help .feature-section .sp-wpcp-feature h3{font-size:16px;margin-top:18px}.sp-wpcp-help .feature-section i.sp-wpcp-font-icon{font-size:30px;display:block;color:#18afb9;font-family:fontawesome;font-style:normal}@media (max-width:500px){.sp-wpcp-help .wp-badge{background-position-x:center;top:0}}.sp-wpc-text-center{text-align:center}.sp-wpcf-upgrade>h1{font-size:2.5em;color:#444;font-weight:300}.sp-wpcf-upgrade>h1 span{font-weight:400}.sp-wpcf-upgrade .about-text{margin-bottom:0}.sp-wpcf-upgrade ul{margin-top:0}.sp-wpcf-upgrade .wp-badge{border:none;background:url(../img/premium-logo.png) no-repeat;background-size:150px 150px;box-shadow:none;top:0;padding-right:8px}.about-wrap.sp-wpcf-upgrade .about-text{min-height:60px}.about-wrap.sp-wpcf-upgrade hr{order:0;height:0;margin:0;border-top:1px solid rgba(0,0,0,.1)}.sp-wpcf-upgrade .feature-section .sp-wpc-feature{background-color:#fff;padding:20px 20px;border:1px solid #ddd}.sp-wpcf-upgrade .feature-section .sp-wpc-feature h3{font-size:16px;margin-top:18px}.sp-wpcf-upgrade .feature-section i.fa{font-size:30px;display:block;color:#22afba}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section span.dashicons{font-size:22px;color:#fff;background-color:#22afba;width:28px;height:28px;line-height:28px;border-radius:50%;margin-right:10px}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section{margin-bottom:40px;display:flex;flex-wrap:wrap}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section .sp-wpc-feature h3{margin-top:0}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section .sp-wpc-feature p{margin-bottom:0}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section .sp-wpc-feature{box-shadow:0 0 10px 0 #ddd;margin:4px;border:0 solid}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section.three-col .col{min-width:32%;max-width:32%;margin-top:20px;display:flex;align-self:auto}.sp-wpcf-upgrade .sp-wpc-pro-features .sp-wpc-pro-subtitle{font-size:1.2em;margin-bottom:26px}.sp-wpcf-upgrade .sp-wpc-upgrade-sticky-footer{position:fixed;bottom:0;background:#fff;width:calc(100% - 195px);z-index:9;margin-left:-25px;text-align:center;border:1px solid #dfdfdf;padding:15px 0;border-bottom:none}.sp-wpcf-upgrade .sp-wpc-pro-features h2,.sp-wpcf-upgrade .sp-wpcp-promo-video-title{font-size:2.2em;font-weight:400}.sp-wpcp-join-community h2{font-size:2em}.sp-wpcf-upgrade .sp-wpc-upgrade-sticky-footer h3{margin-top:17px;margin-bottom:20px}.sp-wpcf-upgrade .sp-wpc-upgrade-sticky-footer a.button{margin:0 8px}.sp-wpcf-upgrade .wpcf-upgrade-btn{display:inline-block;padding:0 20px 0 0}.sp-wpcf-upgrade .wpcf-upgrade-btn a,.sp-wpcf-upgrade a.wpcf-upgrade-btn{text-decoration:none;text-align:center;font-size:16px}.sp-wpcf-upgrade .wpcf-upgrade-btn a:focus{outline:0}.sp-wpcf-upgrade a.wpcf-upgrade-btn,.sp-wpcf-upgrade ul li.wpcf-upgrade-btn:first-child a{background:#7cc048;padding:0 15px;line-height:46px;display:block;color:#fff;border-radius:3px}.sp-wpcf-upgrade ul li.wpcf-upgrade-btn:last-child a{text-decoration:underline}.sp-wpcf-upgrade ul li.wpcf-upgrade-btn a i{margin-left:4px}.sp-wpcf-upgrade ul li.wpcf-upgrade-btn:last-child a i{font-size:14px}.sp-wpcf-upgrade a.wpcf-upgrade-btn{display:inline-block}#sp-wpcfree-review-notice{padding:15px 15px 15px 0;background-color:#fff;border-radius:3px;margin:20px 20px 0 0}#sp-wpcfree-review-notice .sp-wpcfree-plugin-icon{width:125px;float:left;line-height:90px;text-align:center}#sp-wpcfree-review-notice .sp-wpcfree-plugin-icon img{max-width:83px;vertical-align:middle}#sp-wpcfree-review-notice .sp-wpcfree-notice-text{overflow:hidden}#sp-wpcfree-review-notice .sp-wpcfree-notice-text h3{font-size:24px;margin:0 0 5px;font-weight:400;line-height:1}#sp-wpcfree-review-notice .sp-wpcfree-notice-text p{margin:10px 0 10px 0;font-size:13px}#sp-wpcfree-review-notice .sp-wpcfree-notice-text p.sp-wpcfree-review-actions{margin:10px 0 2px 0}#sp-wpcfree-review-notice .sp-wpcfree-notice-text .sp-wpcfree-review-actions a{text-decoration:none;margin-right:8px;color:#63a37b;display:inline-block;position:relative}#sp-wpcfree-review-notice .sp-wpcfree-notice-text .sp-wpcfree-review-actions a span{padding-right:2px}#sp-wpcfree-review-notice .sp-wpcfree-notice-text .sp-wpcfree-review-actions a.button{color:#fff}@media screen and (max-width:782px){.about-wrap .three-col .col{min-width:48%!important;max-width:48%!important;margin-left:0!important}.about-wrap.sp-wpcp-help .feature-section .col{margin-top:20px}}@media (max-width:960px){.sp-wpc-help .sp-wpc-upgrade-sticky-footer{width:calc(100%)}}@media only screen and (max-width:500px){.about-wrap .three-col .col{min-width:100%!important}.sp-wpcf-upgrade .wp-badge{background-position-x:center}}.spwpc-copy-btn{width:16px;margin-left:13px;position:absolute;top:50%;margin-top:-8px}.spwpc-after-copy-text{bottom:0;opacity:0;z-index:9999999;position:fixed;width:230px;left:180px;text-align:center;padding:15px 15px;line-height:15px;color:#fff;border-radius:3px;background:#32373c;border:1px solid #32373c}.spwpc-after-copy-text .fa-check-circle{font-size:14px;margin-right:2px;color:#5db62e}
admin/js/wp-carousel-free-admin.js CHANGED
@@ -3,7 +3,8 @@ jQuery(document).ready(function ($) {
3
  /**
4
  * Admin Preloader.
5
  */
6
- $(".sp_wpcp_shortcode_generator .spf-wrapper").css("visibility", "hidden");
7
- $(".sp_wpcp_shortcode_generator .spf-wrapper").css("visibility", "visible");
8
- $(".sp_wpcp_shortcode_generator .spf-wrapper li").css("opacity", 1);
 
9
  });
3
  /**
4
  * Admin Preloader.
5
  */
6
+ $(".sp_wpcp_shortcode_generator .wpcf-wrapper").css("visibility", "hidden");
7
+ $(".sp_wpcp_shortcode_generator .wpcf-wrapper").css("visibility", "visible");
8
+ $(".sp_wpcp_shortcode_generator .wpcf-wrapper").css("background", "#fff");
9
+ $(".sp_wpcp_shortcode_generator .wpcf-wrapper li").css("opacity", 1);
10
  });
admin/js/wp-carousel-free-admin.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function ($) { $(".sp_wpcp_shortcode_generator .spf-wrapper").css("visibility", "hidden"); $(".sp_wpcp_shortcode_generator .spf-wrapper").css("visibility", "visible"); $(".sp_wpcp_shortcode_generator .spf-wrapper li").css("opacity", 1) })
1
+ jQuery(document).ready((function($){$(".sp_wpcp_shortcode_generator .wpcf-wrapper").css("visibility","hidden"),$(".sp_wpcp_shortcode_generator .wpcf-wrapper").css("visibility","visible"),$(".sp_wpcp_shortcode_generator .wpcf-wrapper").css("background","#fff"),$(".sp_wpcp_shortcode_generator .wpcf-wrapper li").css("opacity",1)}));
admin/views/metabox-config.php CHANGED
@@ -71,7 +71,7 @@ SP_WPCF::createSection(
71
  ),
72
  'mix-content' => array(
73
  'icon' => 'dashicons dashicons-randomize',
74
- 'text' => __( 'Mix-Content', 'wp-carousel-pro' ),
75
  'pro_only' => true,
76
  ),
77
  ),
@@ -89,7 +89,7 @@ SP_WPCF::createSection(
89
  ),
90
  array(
91
  'id' => 'wpcp_display_posts_from',
92
- 'type' => 'selectf',
93
  'title' => __( 'Filter Posts', 'wp-carousel-free' ),
94
  'options' => array(
95
  'latest' => array(
@@ -106,7 +106,7 @@ SP_WPCF::createSection(
106
  ),
107
  'default' => 'latest',
108
  'class' => 'chosen',
109
- 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
110
  ),
111
 
112
  array(
@@ -116,12 +116,12 @@ SP_WPCF::createSection(
116
  'default' => '10',
117
  'min' => 1,
118
  'max' => 1000,
119
- 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
120
  ),
121
  // Product Carousel.
122
  array(
123
  'id' => 'wpcp_display_product_from',
124
- 'type' => 'selectf',
125
  'title' => __( 'Filter Products', 'wp-carousel-free' ),
126
  'options' => array(
127
  'latest' => array(
@@ -138,7 +138,7 @@ SP_WPCF::createSection(
138
  ),
139
  'default' => 'latest',
140
  'class' => 'chosen',
141
- 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
142
  ),
143
 
144
  array(
@@ -148,7 +148,7 @@ SP_WPCF::createSection(
148
  'default' => '10',
149
  'min' => 1,
150
  'max' => 1000,
151
- 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
152
  ),
153
  ), // End of fields array.
154
  )
@@ -169,6 +169,7 @@ SP_WPCF::createMetabox(
169
  'title' => __( 'Shortcode Section', 'wp-carousel-free' ),
170
  'post_type' => 'sp_wp_carousel',
171
  'show_restore' => false,
 
172
  'theme' => 'light',
173
  'class' => 'sp_wpcp_shortcode_generator',
174
  )
@@ -207,12 +208,7 @@ SP_WPCF::createSection(
207
  'default' => array(
208
  'all' => '30',
209
  ),
210
- 'dependency' => array(
211
- 'section_title',
212
- '==',
213
- 'true',
214
- true,
215
- ),
216
  ),
217
  array(
218
  'id' => 'wpcp_carousel_mode',
@@ -409,7 +405,7 @@ SP_WPCF::createSection(
409
  'title' => __( 'Pause on Hover', 'wp-carousel-free' ),
410
  'subtitle' => __( 'On/Off carousel pause on hover.', 'wp-carousel-free' ),
411
  'default' => true,
412
- 'dependency' => array( 'wpcp_carousel_auto_play', '==', 'true' ),
413
  ),
414
  array(
415
  'id' => 'carousel_infinite',
@@ -435,8 +431,8 @@ SP_WPCF::createSection(
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,
@@ -485,11 +481,7 @@ SP_WPCF::createSection(
485
  'color1' => '#aaa',
486
  'color2' => '#178087',
487
  ),
488
- 'dependency' => array(
489
- 'wpcp_navigation',
490
- '!=',
491
- 'hide',
492
- ),
493
  ),
494
  // Pagination.
495
  array(
@@ -537,11 +529,11 @@ SP_WPCF::createSection(
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(
@@ -563,11 +555,7 @@ SP_WPCF::createSection(
563
  'text_off' => __( 'Disabled', 'wp-carousel-free' ),
564
  'text_width' => 96,
565
  'default' => true,
566
- 'dependency' => array(
567
- 'slider_swipe',
568
- '==',
569
- 'true',
570
- ),
571
  ),
572
  array(
573
  'id' => 'carousel_swipetoslide',
@@ -578,11 +566,7 @@ SP_WPCF::createSection(
578
  'text_off' => __( 'Disabled', 'wp-carousel-free' ),
579
  'text_width' => 96,
580
  'default' => false,
581
- 'dependency' => array(
582
- 'slider_swipe',
583
- '==',
584
- 'true',
585
- ),
586
  ),
587
  ),
588
  )
@@ -644,7 +628,7 @@ SP_WPCF::createSection(
644
  'style' => 'solid',
645
  'color' => '#dddddd',
646
  ),
647
- 'dependency' => array( 'wpcp_carousel_type', '!=', 'product-carousel' ),
648
  ),
649
 
650
  array(
@@ -653,7 +637,7 @@ SP_WPCF::createSection(
653
  'title' => __( 'Slide Background', 'wp-carousel-free' ),
654
  'subtitle' => __( 'Set background color for the slide.', 'wp-carousel-free' ),
655
  'default' => '#f9f9f9',
656
- 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
657
  ),
658
  array(
659
  'id' => 'wpcp_image_caption',
@@ -665,7 +649,7 @@ SP_WPCF::createSection(
665
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
666
  'text_width' => 77,
667
  'default' => false,
668
- 'dependency' => array( 'wpcp_carousel_type', '==', 'image-carousel' ),
669
  ),
670
  array(
671
  'id' => 'wpcp_image_desc',
@@ -677,7 +661,7 @@ SP_WPCF::createSection(
677
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
678
  'text_width' => 77,
679
  'default' => false,
680
- 'dependency' => array( 'wpcp_carousel_type', 'any', 'image-carousel,video-carousel' ),
681
  ),
682
  // Post Settings.
683
  array(
@@ -689,7 +673,7 @@ SP_WPCF::createSection(
689
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
690
  'text_width' => 77,
691
  'default' => true,
692
- 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
693
  ),
694
 
695
  array(
@@ -701,11 +685,11 @@ SP_WPCF::createSection(
701
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
702
  'text_width' => 77,
703
  'default' => true,
704
- 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
705
  ),
706
  array(
707
  'id' => 'wpcp_post_content_type',
708
- 'type' => 'selectf',
709
  'title' => __( 'Content Display Type', 'wp-carousel-free' ),
710
  'subtitle' => __( 'Select a content display type.', 'wp-carousel-free' ),
711
  'options' => array(
@@ -722,7 +706,7 @@ SP_WPCF::createSection(
722
  ),
723
  ),
724
  'default' => 'excerpt',
725
- 'dependency' => array( 'wpcp_carousel_type|wpcp_post_content_show', '==|==', 'post-carousel|true' ),
726
  ),
727
 
728
  array(
@@ -740,7 +724,7 @@ SP_WPCF::createSection(
740
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
741
  'text_width' => 77,
742
  'default' => true,
743
- 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
744
  ),
745
  array(
746
  'id' => 'wpcp_post_author_show',
@@ -751,14 +735,14 @@ SP_WPCF::createSection(
751
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
752
  'text_width' => 77,
753
  'default' => true,
754
- 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
755
  ),
756
 
757
  // Product.
758
  array(
759
  'type' => 'subheading',
760
  'content' => __( 'Product', 'wp-carousel-free' ),
761
- 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
762
  ),
763
  array(
764
  'id' => 'wpcp_product_name',
@@ -769,7 +753,7 @@ SP_WPCF::createSection(
769
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
770
  'text_width' => 77,
771
  'default' => true,
772
- 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
773
  ),
774
  array(
775
  'id' => 'wpcp_product_price',
@@ -780,7 +764,7 @@ SP_WPCF::createSection(
780
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
781
  'text_width' => 77,
782
  'default' => true,
783
- 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
784
  ),
785
  array(
786
  'id' => 'wpcp_product_rating',
@@ -791,7 +775,7 @@ SP_WPCF::createSection(
791
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
792
  'text_width' => 77,
793
  'default' => true,
794
- 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
795
  ),
796
  array(
797
  'id' => 'wpcp_product_cart',
@@ -802,7 +786,7 @@ SP_WPCF::createSection(
802
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
803
  'text_width' => 77,
804
  'default' => true,
805
- 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
806
  ),
807
  // Image.
808
  array(
@@ -818,7 +802,7 @@ SP_WPCF::createSection(
818
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
819
  'text_width' => 77,
820
  'default' => true,
821
- 'dependency' => array( 'wpcp_carousel_type', 'any', 'post-carousel,product-carousel' ),
822
  ),
823
  array(
824
  'id' => 'wpcp_image_sizes',
@@ -827,7 +811,7 @@ SP_WPCF::createSection(
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(
833
  'id' => 'wpcp_image_gray_scale',
@@ -837,9 +821,18 @@ SP_WPCF::createSection(
837
  'subtitle' => __( 'Set a mode for the image.', 'wp-carousel-free' ),
838
  'options' => array(
839
  '' => __( 'Normal', 'wp-carousel-free' ),
840
- '1' => __( 'Grayscale and normal on hover (Pro)', 'wp-carousel-free' ),
841
- '2' => __( 'Grayscale on hover (Pro)', 'wp-carousel-free' ),
842
- '3' => __( 'Always grayscale (Pro)', 'wp-carousel-free' ),
 
 
 
 
 
 
 
 
 
843
  ),
844
  'default' => '',
845
  'class' => 'chosen',
@@ -855,28 +848,28 @@ SP_WPCF::createSection(
855
  'style' => 'solid',
856
  'color' => '#dddddd',
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
  ),
@@ -886,7 +879,7 @@ SP_WPCF::createSection(
886
  'title' => __( 'Image Title Attribute', 'wp-carousel-free' ),
887
  'subtitle' => __( 'Check to add image title attribute.', 'wp-carousel-freee' ),
888
  'default' => false,
889
- 'dependency' => array( 'wpcp_carousel_type|show_image', 'any|==', 'image-carousel,post-carousel,product-carousel|true' ),
890
  ),
891
  ), // End of fields array.
892
  )
@@ -910,13 +903,15 @@ SP_WPCF::createSection(
910
  ),
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
  ),
918
  array(
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' ),
@@ -937,14 +932,16 @@ SP_WPCF::createSection(
937
  ),
938
  array(
939
  'id' => 'wpcp_image_caption_font_load',
940
- 'type' => 'switcherf',
 
941
  'title' => __( 'Load Caption Font', 'wp-carousel-free' ),
942
  'subtitle' => __( 'On/Off google font for the image caption.', 'wp-carousel-free' ),
943
  'default' => false,
944
- 'dependency' => array( 'wpcp_carousel_type', '==', 'image-carousel' ),
945
  ),
946
  array(
947
  'id' => 'wpcp_image_caption_typography',
 
948
  'type' => 'typography',
949
  'title' => __( 'Caption Font', 'wp-carousel-free' ),
950
  'subtitle' => __( 'Set caption font properties.', 'wp-carousel-free' ),
@@ -965,14 +962,16 @@ SP_WPCF::createSection(
965
  ),
966
  array(
967
  'id' => 'wpcp_image_desc_font_load',
968
- 'type' => 'switcherf',
 
969
  'title' => __( 'Load Description Font', 'wp-carousel-free' ),
970
  'subtitle' => __( 'On/Off google font for the image description.', 'wp-carousel-free' ),
971
  'default' => false,
972
- 'dependency' => array( 'wpcp_carousel_type|wpcp_post_title', '==|==', 'image-carousel|true' ),
973
  ),
974
  array(
975
  'id' => 'wpcp_image_desc_typography',
 
976
  'type' => 'typography',
977
  'title' => __( 'Description Font', 'wp-carousel-free' ),
978
  'subtitle' => __( 'Set description font properties.', 'wp-carousel-free' ),
@@ -988,19 +987,21 @@ SP_WPCF::createSection(
988
  'text-align' => 'center',
989
  'type' => 'google',
990
  ),
991
- 'dependency' => array( 'wpcp_carousel_type', '==', 'image-carousel' ),
992
  ),
993
  // Post Typography.
994
  array(
995
  'id' => 'wpcp_title_font_load',
996
- 'type' => 'switcherf',
 
997
  'title' => __( 'Load Title Font', 'wp-carousel-free' ),
998
  'subtitle' => __( 'On/Off google font for the slide title.', 'wp-carousel-free' ),
999
  'default' => false,
1000
- 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
1001
  ),
1002
  array(
1003
  'id' => 'wpcp_title_typography',
 
1004
  'type' => 'typography',
1005
  'title' => __( 'Post Title Font', 'wp-carousel-free' ),
1006
  'subtitle' => __( 'Set title font properties.', 'wp-carousel-free' ),
@@ -1018,23 +1019,21 @@ SP_WPCF::createSection(
1018
  ),
1019
  'hover_color' => true,
1020
  'preview_text' => 'The Post Title',
1021
- 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
1022
  ),
1023
 
1024
  array(
1025
  'id' => 'wpcp_post_content_font_load',
1026
- 'type' => 'switcherf',
 
1027
  'title' => __( 'Post Content Font Load', 'wp-carousel-free' ),
1028
  'subtitle' => __( 'On/Off google font for post the content.', 'wp-carousel-free' ),
1029
  'default' => false,
1030
- 'dependency' => array(
1031
- 'wpcp_carousel_type',
1032
- '==',
1033
- 'post-carousel',
1034
- ),
1035
  ),
1036
  array(
1037
  'id' => 'wpcp_post_content_typography',
 
1038
  'type' => 'typography',
1039
  'title' => __( 'Post Content Font', 'wp-carousel-free' ),
1040
  'subtitle' => __( 'Set post content font properties.', 'wp-carousel-free' ),
@@ -1048,22 +1047,20 @@ SP_WPCF::createSection(
1048
  'text-align' => 'center',
1049
  'type' => 'google',
1050
  ),
1051
- 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
1052
  ),
1053
  array(
1054
  'id' => 'wpcp_post_meta_font_load',
1055
- 'type' => 'switcherf',
 
1056
  'title' => __( 'Post Meta Font Load', 'wp-carousel-free' ),
1057
  'subtitle' => __( 'On/Off google font for the post meta.', 'wp-carousel-free' ),
1058
  'default' => false,
1059
- 'dependency' => array(
1060
- 'wpcp_carousel_type',
1061
- '==',
1062
- 'post-carousel',
1063
- ),
1064
  ),
1065
  array(
1066
  'id' => 'wpcp_post_meta_typography',
 
1067
  'type' => 'typography',
1068
  'title' => __( 'Post Meta Font', 'wp-carousel-free' ),
1069
  'subtitle' => __( 'Set post meta font properties.', 'wp-carousel-free' ),
@@ -1078,28 +1075,22 @@ SP_WPCF::createSection(
1078
  'type' => 'google',
1079
  ),
1080
  'preview_text' => 'Post Meta', // Replace preview text with any text you like.
1081
- 'dependency' => array(
1082
- 'wpcp_carousel_type',
1083
- '==',
1084
- 'post-carousel',
1085
- ),
1086
  ),
1087
 
1088
  // // Product Typography.
1089
  array(
1090
  'id' => 'wpcp_product_name_font_load',
1091
- 'type' => 'switcherf',
 
1092
  'title' => __( 'Product Name Font Load', 'wp-carousel-free' ),
1093
  'subtitle' => __( 'On/Off google font for the product name.', 'wp-carousel-free' ),
1094
  'default' => false,
1095
- 'dependency' => array(
1096
- 'wpcp_carousel_type',
1097
- '==',
1098
- 'product-carousel',
1099
- ),
1100
  ),
1101
  array(
1102
  'id' => 'wpcp_product_name_typography',
 
1103
  'type' => 'typography',
1104
  'title' => __( 'Product Name Font', 'wp-carousel-free' ),
1105
  'subtitle' => __( 'Set product name font properties.', 'wp-carousel-free' ),
@@ -1116,27 +1107,22 @@ SP_WPCF::createSection(
1116
  ),
1117
  'hover_color' => true,
1118
  'preview_text' => 'Product Name', // Replace preview text.
1119
- 'dependency' => array(
1120
- 'wpcp_carousel_type',
1121
- '==',
1122
- 'product-carousel',
1123
- ),
1124
  ),
1125
  array(
1126
  'id' => 'wpcp_product_price_font_load',
1127
- 'type' => 'switcherf',
 
1128
  'title' => __( 'Product Price Font Load', 'wp-carousel-free' ),
1129
  'subtitle' => __( 'On/Off google font for the product price.', 'wp-carousel-free' ),
1130
  'default' => false,
1131
- 'dependency' => array(
1132
- 'wpcp_carousel_type',
1133
- '==',
1134
- 'product-carousel',
1135
- ),
1136
  ),
1137
  array(
1138
  'id' => 'wpcp_product_price_typography',
 
1139
  'type' => 'typography',
 
1140
  'title' => __( 'Product Price Font', 'wp-carousel-free' ),
1141
  'subtitle' => __( 'Set product price font properties.', 'wp-carousel-free' ),
1142
  'default' => array(
@@ -1150,11 +1136,7 @@ SP_WPCF::createSection(
1150
  'type' => 'google',
1151
  ),
1152
  'preview_text' => '$49.00', // Replace preview text with any text you like.
1153
- 'dependency' => array(
1154
- 'wpcp_carousel_type',
1155
- '==',
1156
- 'product-carousel',
1157
- ),
1158
  ),
1159
  ), // End of fields array.
1160
  )
71
  ),
72
  'mix-content' => array(
73
  'icon' => 'dashicons dashicons-randomize',
74
+ 'text' => __( 'Mix-Content', 'wp-carousel-free' ),
75
  'pro_only' => true,
76
  ),
77
  ),
89
  ),
90
  array(
91
  'id' => 'wpcp_display_posts_from',
92
+ 'type' => 'select',
93
  'title' => __( 'Filter Posts', 'wp-carousel-free' ),
94
  'options' => array(
95
  'latest' => array(
106
  ),
107
  'default' => 'latest',
108
  'class' => 'chosen',
109
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel', true ),
110
  ),
111
 
112
  array(
116
  'default' => '10',
117
  'min' => 1,
118
  'max' => 1000,
119
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel', true ),
120
  ),
121
  // Product Carousel.
122
  array(
123
  'id' => 'wpcp_display_product_from',
124
+ 'type' => 'select',
125
  'title' => __( 'Filter Products', 'wp-carousel-free' ),
126
  'options' => array(
127
  'latest' => array(
138
  ),
139
  'default' => 'latest',
140
  'class' => 'chosen',
141
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel', true ),
142
  ),
143
 
144
  array(
148
  'default' => '10',
149
  'min' => 1,
150
  'max' => 1000,
151
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel', true ),
152
  ),
153
  ), // End of fields array.
154
  )
169
  'title' => __( 'Shortcode Section', 'wp-carousel-free' ),
170
  'post_type' => 'sp_wp_carousel',
171
  'show_restore' => false,
172
+ 'nav' => 'inline',
173
  'theme' => 'light',
174
  'class' => 'sp_wpcp_shortcode_generator',
175
  )
208
  'default' => array(
209
  'all' => '30',
210
  ),
211
+ 'dependency' => array( 'section_title', '==', 'true', true ),
 
 
 
 
 
212
  ),
213
  array(
214
  'id' => 'wpcp_carousel_mode',
405
  'title' => __( 'Pause on Hover', 'wp-carousel-free' ),
406
  'subtitle' => __( 'On/Off carousel pause on hover.', 'wp-carousel-free' ),
407
  'default' => true,
408
+ 'dependency' => array( 'wpcp_carousel_auto_play', '==', 'true', true ),
409
  ),
410
  array(
411
  'id' => 'carousel_infinite',
431
  'id' => 'wpcp_carousel_row',
432
  'class' => 'wpcp_carousel_row_pro_only',
433
  'type' => 'column',
434
+ 'title' => __( 'Carousel Row', 'wp-carousel-free' ),
435
+ 'subtitle' => __( 'Set number of carousel row on device.', 'wp-carousel-free' ),
436
  'lg_desktop' => true,
437
  'desktop' => true,
438
  'laptop' => true,
481
  'color1' => '#aaa',
482
  'color2' => '#178087',
483
  ),
484
+ 'dependency' => array( 'wpcp_navigation', '!=', 'hide' ),
 
 
 
 
485
  ),
486
  // Pagination.
487
  array(
529
  'id' => 'wpcp_scheduler',
530
  'class' => 'only_pro_switcher',
531
  'type' => 'switcher',
532
+ 'title' => __( 'Scheduling', 'wp-carousel-free' ),
533
+ 'subtitle' => __( 'Enable/Disable scheduling carousel.', 'wp-carousel-free' ),
534
  'default' => false,
535
+ 'text_on' => __( 'Enabled', 'wp-carousel-free' ),
536
+ 'text_off' => __( 'Disabled', 'wp-carousel-free' ),
537
  'text_width' => 95,
538
  ),
539
  array(
555
  'text_off' => __( 'Disabled', 'wp-carousel-free' ),
556
  'text_width' => 96,
557
  'default' => true,
558
+ 'dependency' => array( 'slider_swipe', '==', 'true' ),
 
 
 
 
559
  ),
560
  array(
561
  'id' => 'carousel_swipetoslide',
566
  'text_off' => __( 'Disabled', 'wp-carousel-free' ),
567
  'text_width' => 96,
568
  'default' => false,
569
+ 'dependency' => array( 'slider_swipe', '==', 'true' ),
 
 
 
 
570
  ),
571
  ),
572
  )
628
  'style' => 'solid',
629
  'color' => '#dddddd',
630
  ),
631
+ 'dependency' => array( 'wpcp_carousel_type', '!=', 'product-carousel', true ),
632
  ),
633
 
634
  array(
637
  'title' => __( 'Slide Background', 'wp-carousel-free' ),
638
  'subtitle' => __( 'Set background color for the slide.', 'wp-carousel-free' ),
639
  'default' => '#f9f9f9',
640
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel', true ),
641
  ),
642
  array(
643
  'id' => 'wpcp_image_caption',
649
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
650
  'text_width' => 77,
651
  'default' => false,
652
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'image-carousel', true ),
653
  ),
654
  array(
655
  'id' => 'wpcp_image_desc',
661
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
662
  'text_width' => 77,
663
  'default' => false,
664
+ 'dependency' => array( 'wpcp_carousel_type', 'any', 'image-carousel,video-carousel', true ),
665
  ),
666
  // Post Settings.
667
  array(
673
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
674
  'text_width' => 77,
675
  'default' => true,
676
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel', true ),
677
  ),
678
 
679
  array(
685
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
686
  'text_width' => 77,
687
  'default' => true,
688
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel', true ),
689
  ),
690
  array(
691
  'id' => 'wpcp_post_content_type',
692
+ 'type' => 'select',
693
  'title' => __( 'Content Display Type', 'wp-carousel-free' ),
694
  'subtitle' => __( 'Select a content display type.', 'wp-carousel-free' ),
695
  'options' => array(
706
  ),
707
  ),
708
  'default' => 'excerpt',
709
+ 'dependency' => array( 'wpcp_carousel_type|wpcp_post_content_show', '==|==', 'post-carousel|true', true ),
710
  ),
711
 
712
  array(
724
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
725
  'text_width' => 77,
726
  'default' => true,
727
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel', true ),
728
  ),
729
  array(
730
  'id' => 'wpcp_post_author_show',
735
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
736
  'text_width' => 77,
737
  'default' => true,
738
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel', true ),
739
  ),
740
 
741
  // Product.
742
  array(
743
  'type' => 'subheading',
744
  'content' => __( 'Product', 'wp-carousel-free' ),
745
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel', true ),
746
  ),
747
  array(
748
  'id' => 'wpcp_product_name',
753
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
754
  'text_width' => 77,
755
  'default' => true,
756
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel', true ),
757
  ),
758
  array(
759
  'id' => 'wpcp_product_price',
764
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
765
  'text_width' => 77,
766
  'default' => true,
767
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel', true ),
768
  ),
769
  array(
770
  'id' => 'wpcp_product_rating',
775
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
776
  'text_width' => 77,
777
  'default' => true,
778
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel', true ),
779
  ),
780
  array(
781
  'id' => 'wpcp_product_cart',
786
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
787
  'text_width' => 77,
788
  'default' => true,
789
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel', true ),
790
  ),
791
  // Image.
792
  array(
802
  'text_off' => __( 'Hide', 'wp-carousel-free' ),
803
  'text_width' => 77,
804
  'default' => true,
805
+ 'dependency' => array( 'wpcp_carousel_type', 'any', 'post-carousel,product-carousel', true ),
806
  ),
807
  array(
808
  'id' => 'wpcp_image_sizes',
811
  'title' => __( 'Image Size', 'wp-carousel-free' ),
812
  'default' => 'full',
813
  'subtitle' => __( 'Set a size for the image.', 'wp-carousel-free' ),
814
+ 'dependency' => array( 'wpcp_carousel_type|show_image', 'any|==', 'image-carousel,post-carousel,product-carousel|true', true ),
815
  ),
816
  array(
817
  'id' => 'wpcp_image_gray_scale',
821
  'subtitle' => __( 'Set a mode for the image.', 'wp-carousel-free' ),
822
  'options' => array(
823
  '' => __( 'Normal', 'wp-carousel-free' ),
824
+ '1' => array(
825
+ 'text' => __( 'Grayscale and normal on hover (Pro)', 'wp-carousel-free' ),
826
+ 'pro_only' => true,
827
+ ),
828
+ '2' => array(
829
+ 'text' => __( 'Grayscale on hover (Pro)', 'wp-carousel-free' ),
830
+ 'pro_only' => true,
831
+ ),
832
+ '3' => array(
833
+ 'text' => __( 'Always grayscale (Pro)', 'wp-carousel-free' ),
834
+ 'pro_only' => true,
835
+ ),
836
  ),
837
  'default' => '',
838
  'class' => 'chosen',
848
  'style' => 'solid',
849
  'color' => '#dddddd',
850
  ),
851
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel', true ),
852
  ),
853
  array(
854
  'id' => 'wpcp_watermark',
855
  'class' => 'only_pro_switcher',
856
  'type' => 'switcher',
857
+ 'text_on' => __( 'Enabled', 'wp-carousel-free' ),
858
+ 'text_off' => __( 'Disabled', 'wp-carousel-free' ),
859
  'text_width' => 95,
860
+ 'title' => __( 'Watermark', 'wp-carousel-free' ),
861
+ 'subtitle' => __( 'Enable/Disable watermark for the image.', 'wp-carousel-free' ),
862
  'default' => false,
863
  ),
864
  array(
865
  'id' => 'wpcp_img_protection',
866
  'class' => 'only_pro_switcher',
867
  'type' => 'switcher',
868
+ 'text_on' => __( 'Enabled', 'wp-carousel-free' ),
869
+ 'text_off' => __( 'Disabled', 'wp-carousel-free' ),
870
  'text_width' => 95,
871
+ 'title' => __( 'Image Protection', 'wp-carousel-free' ),
872
+ 'subtitle' => __( 'Enable to protect image downloading from right-click.', 'wp-carousel-free' ),
873
  'default' => false,
874
  'dependency' => array( 'wpcp_carousel_type', '==', 'image-carousel|true' ),
875
  ),
879
  'title' => __( 'Image Title Attribute', 'wp-carousel-free' ),
880
  'subtitle' => __( 'Check to add image title attribute.', 'wp-carousel-freee' ),
881
  'default' => false,
882
+ 'dependency' => array( 'wpcp_carousel_type|show_image', 'any|==', 'image-carousel,post-carousel,product-carousel|true', true ),
883
  ),
884
  ), // End of fields array.
885
  )
903
  ),
904
  array(
905
  'id' => 'section_title_font_load',
906
+ 'type' => 'switcher',
907
+ 'class' => 'only_pro_switcher',
908
  'title' => __( 'Load Carousel Section Title Font', 'wp-carousel-free' ),
909
  'subtitle' => __( 'On/Off google font for the carousel section title.', 'wp-carousel-free' ),
910
  'default' => false,
911
  ),
912
  array(
913
  'id' => 'wpcp_section_title_typography',
914
+ 'class' => 'disable-color-picker',
915
  'type' => 'typography',
916
  'title' => __( 'Carousel Section Title Font', 'wp-carousel-free' ),
917
  'subtitle' => __( 'Set Carousel section title font properties.', 'wp-carousel-free' ),
932
  ),
933
  array(
934
  'id' => 'wpcp_image_caption_font_load',
935
+ 'type' => 'switcher',
936
+ 'class' => 'only_pro_switcher',
937
  'title' => __( 'Load Caption Font', 'wp-carousel-free' ),
938
  'subtitle' => __( 'On/Off google font for the image caption.', 'wp-carousel-free' ),
939
  'default' => false,
940
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'image-carousel', true ),
941
  ),
942
  array(
943
  'id' => 'wpcp_image_caption_typography',
944
+ 'class' => 'disable-color-picker',
945
  'type' => 'typography',
946
  'title' => __( 'Caption Font', 'wp-carousel-free' ),
947
  'subtitle' => __( 'Set caption font properties.', 'wp-carousel-free' ),
962
  ),
963
  array(
964
  'id' => 'wpcp_image_desc_font_load',
965
+ 'type' => 'switcher',
966
+ 'class' => 'only_pro_switcher',
967
  'title' => __( 'Load Description Font', 'wp-carousel-free' ),
968
  'subtitle' => __( 'On/Off google font for the image description.', 'wp-carousel-free' ),
969
  'default' => false,
970
+ 'dependency' => array( 'wpcp_carousel_type|wpcp_post_title', '==|==', 'image-carousel|true', true ),
971
  ),
972
  array(
973
  'id' => 'wpcp_image_desc_typography',
974
+ 'class' => 'disable-color-picker',
975
  'type' => 'typography',
976
  'title' => __( 'Description Font', 'wp-carousel-free' ),
977
  'subtitle' => __( 'Set description font properties.', 'wp-carousel-free' ),
987
  'text-align' => 'center',
988
  'type' => 'google',
989
  ),
990
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'image-carousel', true ),
991
  ),
992
  // Post Typography.
993
  array(
994
  'id' => 'wpcp_title_font_load',
995
+ 'type' => 'switcher',
996
+ 'class' => 'only_pro_switcher',
997
  'title' => __( 'Load Title Font', 'wp-carousel-free' ),
998
  'subtitle' => __( 'On/Off google font for the slide title.', 'wp-carousel-free' ),
999
  'default' => false,
1000
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel', true ),
1001
  ),
1002
  array(
1003
  'id' => 'wpcp_title_typography',
1004
+ 'class' => 'disable-color-picker',
1005
  'type' => 'typography',
1006
  'title' => __( 'Post Title Font', 'wp-carousel-free' ),
1007
  'subtitle' => __( 'Set title font properties.', 'wp-carousel-free' ),
1019
  ),
1020
  'hover_color' => true,
1021
  'preview_text' => 'The Post Title',
1022
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel', true ),
1023
  ),
1024
 
1025
  array(
1026
  'id' => 'wpcp_post_content_font_load',
1027
+ 'type' => 'switcher',
1028
+ 'class' => 'only_pro_switcher',
1029
  'title' => __( 'Post Content Font Load', 'wp-carousel-free' ),
1030
  'subtitle' => __( 'On/Off google font for post the content.', 'wp-carousel-free' ),
1031
  'default' => false,
1032
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel', true ),
 
 
 
 
1033
  ),
1034
  array(
1035
  'id' => 'wpcp_post_content_typography',
1036
+ 'class' => 'disable-color-picker',
1037
  'type' => 'typography',
1038
  'title' => __( 'Post Content Font', 'wp-carousel-free' ),
1039
  'subtitle' => __( 'Set post content font properties.', 'wp-carousel-free' ),
1047
  'text-align' => 'center',
1048
  'type' => 'google',
1049
  ),
1050
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel', true ),
1051
  ),
1052
  array(
1053
  'id' => 'wpcp_post_meta_font_load',
1054
+ 'type' => 'switcher',
1055
+ 'class' => 'only_pro_switcher',
1056
  'title' => __( 'Post Meta Font Load', 'wp-carousel-free' ),
1057
  'subtitle' => __( 'On/Off google font for the post meta.', 'wp-carousel-free' ),
1058
  'default' => false,
1059
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel', true ),
 
 
 
 
1060
  ),
1061
  array(
1062
  'id' => 'wpcp_post_meta_typography',
1063
+ 'class' => 'disable-color-picker',
1064
  'type' => 'typography',
1065
  'title' => __( 'Post Meta Font', 'wp-carousel-free' ),
1066
  'subtitle' => __( 'Set post meta font properties.', 'wp-carousel-free' ),
1075
  'type' => 'google',
1076
  ),
1077
  'preview_text' => 'Post Meta', // Replace preview text with any text you like.
1078
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel', true ),
 
 
 
 
1079
  ),
1080
 
1081
  // // Product Typography.
1082
  array(
1083
  'id' => 'wpcp_product_name_font_load',
1084
+ 'type' => 'switcher',
1085
+ 'class' => 'only_pro_switcher',
1086
  'title' => __( 'Product Name Font Load', 'wp-carousel-free' ),
1087
  'subtitle' => __( 'On/Off google font for the product name.', 'wp-carousel-free' ),
1088
  'default' => false,
1089
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel', true ),
 
 
 
 
1090
  ),
1091
  array(
1092
  'id' => 'wpcp_product_name_typography',
1093
+ 'class' => 'disable-color-picker',
1094
  'type' => 'typography',
1095
  'title' => __( 'Product Name Font', 'wp-carousel-free' ),
1096
  'subtitle' => __( 'Set product name font properties.', 'wp-carousel-free' ),
1107
  ),
1108
  'hover_color' => true,
1109
  'preview_text' => 'Product Name', // Replace preview text.
1110
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel', true ),
 
 
 
 
1111
  ),
1112
  array(
1113
  'id' => 'wpcp_product_price_font_load',
1114
+ 'type' => 'switcher',
1115
+ 'class' => 'only_pro_switcher',
1116
  'title' => __( 'Product Price Font Load', 'wp-carousel-free' ),
1117
  'subtitle' => __( 'On/Off google font for the product price.', 'wp-carousel-free' ),
1118
  'default' => false,
1119
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel', true ),
 
 
 
 
1120
  ),
1121
  array(
1122
  'id' => 'wpcp_product_price_typography',
1123
+ 'class' => 'disable-color-picker',
1124
  'type' => 'typography',
1125
+
1126
  'title' => __( 'Product Price Font', 'wp-carousel-free' ),
1127
  'subtitle' => __( 'Set product price font properties.', 'wp-carousel-free' ),
1128
  'default' => array(
1136
  'type' => 'google',
1137
  ),
1138
  'preview_text' => '$49.00', // Replace preview text with any text you like.
1139
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel', true ),
 
 
 
 
1140
  ),
1141
  ), // End of fields array.
1142
  )
admin/views/notices/review.php CHANGED
@@ -82,7 +82,7 @@ class WP_Carousel_Free_Review {
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();
82
  $.post( ajaxurl, {
83
  action: 'sp-wpcfree-never-show-review-notice',
84
  notice_dismissed_data : notice_dismissed_value,
85
+ nonce: "<?php echo esc_html( wp_create_nonce( 'wpcfree-review-notice' ) ); ?>",
86
  });
87
 
88
  $('#sp-wpcfree-review-notice.sp-wpcfree-review-notice').hide();
admin/views/option-config.php CHANGED
@@ -36,6 +36,7 @@ SP_WPCF::createOptions(
36
  'show_network_menu' => false,
37
  'show_in_customizer' => false,
38
  'show_search' => false,
 
39
  // 'show_reset_all' => true,
40
  'show_reset_section' => true,
41
  'show_all_options' => false,
36
  'show_network_menu' => false,
37
  'show_in_customizer' => false,
38
  'show_search' => false,
39
+ 'show_footer' => false,
40
  // 'show_reset_all' => true,
41
  'show_reset_section' => true,
42
  'show_all_options' => false,
admin/views/premium.php CHANGED
@@ -85,10 +85,10 @@ class WP_Carousel_Free_Upgrade {
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>
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 echo 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 echo wp_kses_post( __( '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 echo 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 echo wp_kses_post( __( '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>
admin/views/sp-framework/assets/css/style-rtl.css ADDED
@@ -0,0 +1,565 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ *
3
+ * 01. Base
4
+ * 01. 01. Header
5
+ * 01. 02. Header Buttons
6
+ * 01. 03. Navigation
7
+ * 01. 04. Content
8
+ * 01. 05. Section
9
+ * 01. 06. Show All Settings
10
+ * 01. 07. Search Input
11
+ * 01. 08. Copyright
12
+ * 01. 09. Metabox
13
+ * 02. Fields
14
+ * 02. 01. Field: checkbox, radio
15
+ * 02. 02. Field: switcher
16
+ * 02. 03. Field: help
17
+ * 02. 04. Field: gallery
18
+ * 02. 05. Field: media
19
+ * 02. 06. Field: notice
20
+ * 02. 07. Field: border, spacing, dimensions
21
+ * 02. 08. Field: spinner
22
+ * 02. 09. Field: slider
23
+ * 02. 10. Field: button_set
24
+ * 02. 11. Field: color_group
25
+ * 02. 12. Field: number
26
+ * 03. Taxonomy
27
+ * 04. Profile
28
+ * 05. Nav Menu
29
+ * 06. Modal
30
+ * 07. Customizer
31
+ * 08. Responsive
32
+ * 09. Others
33
+ *
34
+ * ---------------------------------------------------------
35
+ *
36
+ */
37
+ /**
38
+ * 01. Base
39
+ */
40
+ .wpcf-options {
41
+ margin-left: 20px;
42
+ margin-right: 0;
43
+ }
44
+
45
+ /**
46
+ * 01. 01. Header
47
+ */
48
+ .wpcf-header h1 {
49
+ float: right;
50
+ }
51
+ .wpcf-header fieldset {
52
+ float: left;
53
+ }
54
+
55
+ /**
56
+ * 01. 02. Header Buttons
57
+ */
58
+ .wpcf-buttons {
59
+ float: left;
60
+ direction: ltr;
61
+ }
62
+
63
+ .wpcf-header-left {
64
+ float: right;
65
+ }
66
+
67
+ .wpcf-header-right {
68
+ float: left;
69
+ }
70
+
71
+ /**
72
+ * 01. 03. Navigation
73
+ */
74
+ .wpcf-nav {
75
+ float: right;
76
+ }
77
+ .wpcf-nav ul {
78
+ clear: right;
79
+ }
80
+ .wpcf-nav ul li .wpcf-active:after {
81
+ right: auto;
82
+ left: 0;
83
+ border-left-color: #fff;
84
+ border-right-color: transparent;
85
+ }
86
+ .wpcf-nav ul li .wpcf-arrow:after {
87
+ content: "\f053";
88
+ right: auto;
89
+ left: 10px;
90
+ }
91
+ .wpcf-nav ul li.wpcf-tab-expanded .wpcf-arrow:after {
92
+ transform: rotate(-90deg);
93
+ }
94
+ .wpcf-nav ul ul li a {
95
+ padding-right: 25px;
96
+ padding-left: 15px;
97
+ }
98
+ .wpcf-nav ul ul:before {
99
+ left: auto;
100
+ right: 15px;
101
+ }
102
+ .wpcf-nav .wpcf-tab-icon {
103
+ margin-left: 5px;
104
+ margin-right: 0;
105
+ }
106
+
107
+ .wpcf-nav-background {
108
+ left: auto;
109
+ right: 0;
110
+ }
111
+
112
+ /**
113
+ * 01. 04. Content
114
+ */
115
+ .wpcf-content {
116
+ margin-left: 0;
117
+ margin-right: 225px;
118
+ }
119
+
120
+ /**
121
+ * 01. 05. Section
122
+ */
123
+ .wpcf-sections {
124
+ float: right;
125
+ }
126
+
127
+ /**
128
+ * 01. 06. Show all options
129
+ */
130
+ .wpcf-show-all .wpcf-content {
131
+ margin-right: 0;
132
+ overflow: hidden;
133
+ }
134
+
135
+ .wpcf-expand-all {
136
+ float: right;
137
+ right: auto;
138
+ left: 40px;
139
+ margin-right: 0;
140
+ margin-left: 4px;
141
+ }
142
+
143
+ /**
144
+ * 01. 07. Search Input
145
+ */
146
+ .wpcf-search {
147
+ float: right;
148
+ }
149
+ .wpcf-search input {
150
+ margin: 0 0 0 5px;
151
+ }
152
+
153
+ /**
154
+ * 01. 08. Copyright
155
+ */
156
+ .wpcf-copyright {
157
+ float: right;
158
+ }
159
+
160
+ /**
161
+ * 01. 09. Metabox
162
+ */
163
+ .wpcf-metabox {
164
+ margin: -6px -12px -12px -12px;
165
+ }
166
+ .wpcf-metabox .wpcf-section-title {
167
+ padding: 20px;
168
+ }
169
+
170
+ .wpcf-section-title .wpcf-section-icon {
171
+ margin-left: 5px;
172
+ margin-right: 0;
173
+ }
174
+
175
+ /**
176
+ * 02. Fields
177
+ */
178
+ .wpcf-field .wpcf-title {
179
+ float: right;
180
+ }
181
+ .wpcf-field .wpcf-fieldset {
182
+ float: left;
183
+ }
184
+
185
+ .wpcf-pseudo-field {
186
+ padding: 0 0 0 5px !important;
187
+ }
188
+
189
+ /**
190
+ * 02. 01. Field: typography
191
+ */
192
+ .wpcf-field-typography select {
193
+ margin: 0;
194
+ width: 100%;
195
+ }
196
+ .wpcf-field-typography .wpcf--blocks-inputs .wpcf--blocks {
197
+ flex-direction: row-reverse;
198
+ }
199
+ .wpcf-field-typography .wpcf--unit {
200
+ left: 4px;
201
+ right: auto;
202
+ }
203
+
204
+ /**
205
+ * 02. 02. Field: checkbox, radio
206
+ */
207
+ .wpcf-field-checkbox ul ul li,
208
+ .wpcf-field-radio ul ul li {
209
+ margin-left: 0;
210
+ margin-right: 8px;
211
+ }
212
+ .wpcf-field-checkbox ul ul li:first-child,
213
+ .wpcf-field-radio ul ul li:first-child {
214
+ margin-right: 0;
215
+ }
216
+ .wpcf-field-checkbox .wpcf--inline-list li,
217
+ .wpcf-field-radio .wpcf--inline-list li {
218
+ margin-right: 0;
219
+ margin-left: 15px;
220
+ }
221
+ .wpcf-field-checkbox .wpcf--text,
222
+ .wpcf-field-radio .wpcf--text {
223
+ margin-left: 0;
224
+ margin-right: 5px;
225
+ }
226
+
227
+ /**
228
+ * 02. 03. Field: switcher
229
+ */
230
+ .wpcf-field-switcher .wpcf--switcher {
231
+ float: right;
232
+ }
233
+ .wpcf-field-switcher .wpcf--label {
234
+ float: right;
235
+ margin-left: 0;
236
+ margin-right: 5px;
237
+ }
238
+
239
+ /**
240
+ * 02. 04. Field: upload
241
+ */
242
+ .wpcf-field-upload .wpcf--remove,
243
+ .wpcf-field-upload .wpcf--button {
244
+ margin-left: 0;
245
+ margin-right: 5px;
246
+ }
247
+
248
+ /**
249
+ * 02. 05. Field: group
250
+ */
251
+ .wpcf-field-group .wpcf-cloneable-title {
252
+ padding: 15px 10px 15px 65px;
253
+ }
254
+ .wpcf-field-group .wpcf-cloneable-helper {
255
+ right: auto;
256
+ left: 10px;
257
+ }
258
+
259
+ /**
260
+ * 02. 06. Field: repeater
261
+ */
262
+ .wpcf-field-repeater .wpcf-repeater-helper {
263
+ border-left: 0;
264
+ border-right: 1px solid #eee;
265
+ }
266
+
267
+ /**
268
+ * 02. 07. Field: help
269
+ */
270
+ .wpcf-help {
271
+ right: auto;
272
+ left: 5px;
273
+ }
274
+
275
+ /**
276
+ * 02. 08. Field: icon
277
+ */
278
+ .wpcf-field-icon .button {
279
+ margin-right: 0;
280
+ margin-left: 5px;
281
+ }
282
+ .wpcf-field-icon .wpcf-icon-preview i {
283
+ margin-right: 0;
284
+ margin-left: 5px;
285
+ }
286
+
287
+ /**
288
+ * 02. 09. Field: gallery
289
+ */
290
+ .wpcf-field-gallery ul li {
291
+ margin-right: 0;
292
+ margin-left: 5px;
293
+ }
294
+ .wpcf-field-gallery .button {
295
+ margin-right: 0;
296
+ margin-left: 5px;
297
+ }
298
+
299
+ /**
300
+ * 02. 11. Field: tabbed
301
+ */
302
+ .wpcf-field-tabbed .wpcf-tabbed-nav .wpcf--icon {
303
+ padding-right: 0;
304
+ padding-left: 5px;
305
+ }
306
+ .wpcf-field-tabbed .wpcf-tabbed-nav a {
307
+ margin-right: 0;
308
+ margin-left: 5px;
309
+ }
310
+
311
+ /**
312
+ * 02. 12. Field: media
313
+ */
314
+ .wpcf-field-media .button {
315
+ margin-left: 0;
316
+ margin-right: 7px;
317
+ }
318
+ .wpcf-field-media .hidden + .button {
319
+ margin-right: 0;
320
+ }
321
+
322
+ /**
323
+ * 02. 13. Field: notice
324
+ */
325
+ .wpcf-notice {
326
+ border-left: none;
327
+ border-right-style: solid;
328
+ border-right-width: 4px;
329
+ }
330
+
331
+ /**
332
+ * 02. 14. Field: border, spacing, dimensions
333
+ */
334
+ .wpcf-field-dimensions .wpcf--input,
335
+ .wpcf-field-dimensions .wpcf-fieldset,
336
+ .wpcf-field-spacing .wpcf--input,
337
+ .wpcf-field-spacing .wpcf-fieldset,
338
+ .wpcf-field-border .wpcf--input,
339
+ .wpcf-field-border .wpcf-fieldset {
340
+ direction: ltr;
341
+ }
342
+ .wpcf-field-dimensions .wpcf--inputs,
343
+ .wpcf-field-dimensions .wpcf--color,
344
+ .wpcf-field-spacing .wpcf--inputs,
345
+ .wpcf-field-spacing .wpcf--color,
346
+ .wpcf-field-border .wpcf--inputs,
347
+ .wpcf-field-border .wpcf--color {
348
+ float: right;
349
+ }
350
+ .wpcf-field-dimensions .wpcf--color,
351
+ .wpcf-field-spacing .wpcf--color,
352
+ .wpcf-field-border .wpcf--color {
353
+ margin-right: 4px;
354
+ direction: rtl;
355
+ }
356
+
357
+ /**
358
+ * 02. 15. Field: background
359
+ */
360
+ .wpcf-field-background .wpcf--block {
361
+ float: right;
362
+ }
363
+ .wpcf-field-background .wpcf--select,
364
+ .wpcf-field-background .wpcf--media {
365
+ padding-right: 0;
366
+ }
367
+ .wpcf-field-background .wpcf--title {
368
+ margin-right: 0;
369
+ margin-left: 5px;
370
+ }
371
+
372
+ /**
373
+ * 02. 16. Field: spinner
374
+ */
375
+ .wpcf-field-spinner .wpcf--spin {
376
+ float: right;
377
+ direction: ltr;
378
+ }
379
+
380
+ /**
381
+ * 02. 17. Field: slider
382
+ */
383
+ .wpcf-field-slider .wpcf-slider-ui {
384
+ direction: ltr;
385
+ margin-right: 0;
386
+ margin-left: 15px;
387
+ }
388
+ .wpcf-field-slider .wpcf--input {
389
+ direction: ltr;
390
+ }
391
+
392
+ /**
393
+ * 02. 18. Field: button_set
394
+ */
395
+ .wpcf-field-button_set .wpcf--button-group {
396
+ float: right;
397
+ }
398
+
399
+ /**
400
+ * 02. 19. Field: link_color
401
+ */
402
+ .wpcf-field-link_color .wpcf--left {
403
+ float: right;
404
+ margin-right: 0;
405
+ margin-left: 10px;
406
+ }
407
+
408
+ /**
409
+ * 02. 20. Field: color_group
410
+ */
411
+ .wpcf-field-color_group .wpcf--left {
412
+ float: right;
413
+ margin-right: 0;
414
+ margin-left: 10px;
415
+ }
416
+
417
+ /**
418
+ * 02. 21. Field: palette
419
+ */
420
+ .wpcf-field-palette .wpcf--palette {
421
+ margin-right: 0;
422
+ margin-left: 10px;
423
+ }
424
+
425
+ /**
426
+ * 02. 22. Field: accordion
427
+ */
428
+ .wpcf-field-accordion .wpcf--icon {
429
+ margin-right: 0;
430
+ margin-left: 2px;
431
+ }
432
+
433
+ /**
434
+ * 02. 23. Field: date
435
+ */
436
+ .wpcf-field-date .wpcf--to {
437
+ margin-left: 0;
438
+ margin-right: 7px;
439
+ }
440
+
441
+ /**
442
+ * 02. 24. Field: map
443
+ */
444
+ .wpcf-field-map .wpcf--map-input:last-child {
445
+ padding-left: 0;
446
+ padding-right: 10px;
447
+ }
448
+
449
+ /**
450
+ * 02. 25. Field: sortable
451
+ */
452
+ .wpcf-field-sortable .wpcf-sortable-helper {
453
+ border-left: none;
454
+ border-right: 1px solid #eee;
455
+ }
456
+
457
+ /**
458
+ * 02. 26. Field: number
459
+ */
460
+ .wpcf-field-number .wpcf--wrap {
461
+ float: right;
462
+ }
463
+ .wpcf-field-number .wpcf--unit {
464
+ left: 4px;
465
+ right: auto;
466
+ }
467
+
468
+ /**
469
+ * 03. Taxonomy
470
+ */
471
+ .wpcf-taxonomy-add-fields {
472
+ margin-right: 0;
473
+ margin-left: 30px;
474
+ }
475
+ .wpcf-taxonomy-add-fields .wpcf-field > .wpcf-fieldset > .wpcf-help {
476
+ left: -5px;
477
+ right: auto;
478
+ }
479
+
480
+ .wpcf-taxonomy-edit-fields {
481
+ margin-right: 0;
482
+ margin-left: 35px;
483
+ }
484
+ .wpcf-taxonomy-edit-fields .wpcf-field > .wpcf-fieldset > .wpcf-help {
485
+ right: auto;
486
+ left: -5px;
487
+ }
488
+
489
+ /**
490
+ * 04. Profile
491
+ */
492
+ .wpcf-profile-options > h2 > .fa {
493
+ padding-right: 0;
494
+ padding-left: 7px;
495
+ }
496
+ .wpcf-profile-options > .wpcf-field > .wpcf-fieldset > .wpcf-help {
497
+ left: -5px;
498
+ right: auto;
499
+ }
500
+
501
+ /**
502
+ * 05. Nav Menu
503
+ */
504
+ .wpcf-nav-menu-options > .wpcf-fields {
505
+ margin-left: 0;
506
+ margin-right: -10px;
507
+ }
508
+
509
+ .wpcf-nav-menu-title {
510
+ padding-left: 14px;
511
+ padding-right: 12px;
512
+ }
513
+
514
+ .wpcf-nav-menu-icon {
515
+ margin-right: 0;
516
+ margin-left: 5px;
517
+ }
518
+
519
+ /**
520
+ * 06. Modal
521
+ */
522
+ .wpcf-modal-content .wpcf-field {
523
+ padding: 15px 15px 15px 30px;
524
+ }
525
+
526
+ .wpcf-modal-title {
527
+ padding: 0 16px 0 36px;
528
+ }
529
+
530
+ .wpcf-modal-close {
531
+ right: auto;
532
+ left: 0;
533
+ }
534
+
535
+ /**
536
+ * 08. Responsive
537
+ */
538
+ @media only screen and (max-width: 1200px) {
539
+ .wpcf-metabox .wpcf-field .wpcf-fieldset {
540
+ margin-left: 0;
541
+ }
542
+ }
543
+ @media only screen and (max-width: 782px) {
544
+ .wpcf .wpcf-fieldset,
545
+ .wpcf .wpcf-content {
546
+ margin-right: 0;
547
+ }
548
+ }
549
+ /**
550
+ * 09. Others
551
+ */
552
+ .wpcf-field .wpcf--transparent-slider {
553
+ margin-left: 0;
554
+ margin-right: 2px;
555
+ }
556
+ .wpcf-field .wpcf--transparent-slider .ui-slider-handle {
557
+ margin: 0 -11px;
558
+ }
559
+ .wpcf-field .wpcf--transparent-offset {
560
+ background-position: center right;
561
+ }
562
+ .wpcf-field .wpcf--transparent-text {
563
+ right: auto;
564
+ left: 10px;
565
+ }
admin/views/sp-framework/assets/css/style-rtl.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .wpcf-options{margin-left:20px;margin-right:0}.wpcf-header h1{float:right}.wpcf-header fieldset{float:left}.wpcf-buttons{float:left;direction:ltr}.wpcf-header-left{float:right}.wpcf-header-right{float:left}.wpcf-nav{float:right}.wpcf-nav ul{clear:right}.wpcf-nav ul li .wpcf-active:after{right:auto;left:0;border-left-color:#fff;border-right-color:transparent}.wpcf-nav ul li .wpcf-arrow:after{content:"\f053";right:auto;left:10px}.wpcf-nav ul li.wpcf-tab-expanded .wpcf-arrow:after{transform:rotate(-90deg)}.wpcf-nav ul ul li a{padding-right:25px;padding-left:15px}.wpcf-nav ul ul:before{left:auto;right:15px}.wpcf-nav .wpcf-tab-icon{margin-left:5px;margin-right:0}.wpcf-nav-background{left:auto;right:0}.wpcf-content{margin-left:0;margin-right:225px}.wpcf-sections{float:right}.wpcf-show-all .wpcf-content{margin-right:0;overflow:hidden}.wpcf-expand-all{float:right;right:auto;left:40px;margin-right:0;margin-left:4px}.wpcf-search{float:right}.wpcf-search input{margin:0 0 0 5px}.wpcf-copyright{float:right}.wpcf-metabox{margin:-6px -12px -12px -12px}.wpcf-metabox .wpcf-section-title{padding:20px}.wpcf-section-title .wpcf-section-icon{margin-left:5px;margin-right:0}.wpcf-field .wpcf-title{float:right}.wpcf-field .wpcf-fieldset{float:left}.wpcf-pseudo-field{padding:0 0 0 5px!important}.wpcf-field-typography select{margin:0;width:100%}.wpcf-field-typography .wpcf--blocks-inputs .wpcf--blocks{flex-direction:row-reverse}.wpcf-field-typography .wpcf--unit{left:4px;right:auto}.wpcf-field-checkbox ul ul li,.wpcf-field-radio ul ul li{margin-left:0;margin-right:8px}.wpcf-field-checkbox ul ul li:first-child,.wpcf-field-radio ul ul li:first-child{margin-right:0}.wpcf-field-checkbox .wpcf--inline-list li,.wpcf-field-radio .wpcf--inline-list li{margin-right:0;margin-left:15px}.wpcf-field-checkbox .wpcf--text,.wpcf-field-radio .wpcf--text{margin-left:0;margin-right:5px}.wpcf-field-switcher .wpcf--switcher{float:right}.wpcf-field-switcher .wpcf--label{float:right;margin-left:0;margin-right:5px}.wpcf-field-upload .wpcf--button,.wpcf-field-upload .wpcf--remove{margin-left:0;margin-right:5px}.wpcf-field-group .wpcf-cloneable-title{padding:15px 10px 15px 65px}.wpcf-field-group .wpcf-cloneable-helper{right:auto;left:10px}.wpcf-field-repeater .wpcf-repeater-helper{border-left:0;border-right:1px solid #eee}.wpcf-help{right:auto;left:5px}.wpcf-field-icon .button{margin-right:0;margin-left:5px}.wpcf-field-icon .wpcf-icon-preview i{margin-right:0;margin-left:5px}.wpcf-field-gallery ul li{margin-right:0;margin-left:5px}.wpcf-field-gallery .button{margin-right:0;margin-left:5px}.wpcf-field-tabbed .wpcf-tabbed-nav .wpcf--icon{padding-right:0;padding-left:5px}.wpcf-field-tabbed .wpcf-tabbed-nav a{margin-right:0;margin-left:5px}.wpcf-field-media .button{margin-left:0;margin-right:7px}.wpcf-field-media .hidden+.button{margin-right:0}.wpcf-notice{border-left:none;border-right-style:solid;border-right-width:4px}.wpcf-field-border .wpcf--input,.wpcf-field-border .wpcf-fieldset,.wpcf-field-dimensions .wpcf--input,.wpcf-field-dimensions .wpcf-fieldset,.wpcf-field-spacing .wpcf--input,.wpcf-field-spacing .wpcf-fieldset{direction:ltr}.wpcf-field-border .wpcf--color,.wpcf-field-border .wpcf--inputs,.wpcf-field-dimensions .wpcf--color,.wpcf-field-dimensions .wpcf--inputs,.wpcf-field-spacing .wpcf--color,.wpcf-field-spacing .wpcf--inputs{float:right}.wpcf-field-border .wpcf--color,.wpcf-field-dimensions .wpcf--color,.wpcf-field-spacing .wpcf--color{margin-right:4px;direction:rtl}.wpcf-field-background .wpcf--block{float:right}.wpcf-field-background .wpcf--media,.wpcf-field-background .wpcf--select{padding-right:0}.wpcf-field-background .wpcf--title{margin-right:0;margin-left:5px}.wpcf-field-spinner .wpcf--spin{float:right;direction:ltr}.wpcf-field-slider .wpcf-slider-ui{direction:ltr;margin-right:0;margin-left:15px}.wpcf-field-slider .wpcf--input{direction:ltr}.wpcf-field-button_set .wpcf--button-group{float:right}.wpcf-field-link_color .wpcf--left{float:right;margin-right:0;margin-left:10px}.wpcf-field-color_group .wpcf--left{float:right;margin-right:0;margin-left:10px}.wpcf-field-palette .wpcf--palette{margin-right:0;margin-left:10px}.wpcf-field-accordion .wpcf--icon{margin-right:0;margin-left:2px}.wpcf-field-date .wpcf--to{margin-left:0;margin-right:7px}.wpcf-field-map .wpcf--map-input:last-child{padding-left:0;padding-right:10px}.wpcf-field-sortable .wpcf-sortable-helper{border-left:none;border-right:1px solid #eee}.wpcf-field-number .wpcf--wrap{float:right}.wpcf-field-number .wpcf--unit{left:4px;right:auto}.wpcf-taxonomy-add-fields{margin-right:0;margin-left:30px}.wpcf-taxonomy-add-fields .wpcf-field>.wpcf-fieldset>.wpcf-help{left:-5px;right:auto}.wpcf-taxonomy-edit-fields{margin-right:0;margin-left:35px}.wpcf-taxonomy-edit-fields .wpcf-field>.wpcf-fieldset>.wpcf-help{right:auto;left:-5px}.wpcf-profile-options>h2>.fa{padding-right:0;padding-left:7px}.wpcf-profile-options>.wpcf-field>.wpcf-fieldset>.wpcf-help{left:-5px;right:auto}.wpcf-nav-menu-options>.wpcf-fields{margin-left:0;margin-right:-10px}.wpcf-nav-menu-title{padding-left:14px;padding-right:12px}.wpcf-nav-menu-icon{margin-right:0;margin-left:5px}.wpcf-modal-content .wpcf-field{padding:15px 15px 15px 30px}.wpcf-modal-title{padding:0 16px 0 36px}.wpcf-modal-close{right:auto;left:0}@media only screen and (max-width:1200px){.wpcf-metabox .wpcf-field .wpcf-fieldset{margin-left:0}}@media only screen and (max-width:782px){.wpcf .wpcf-content,.wpcf .wpcf-fieldset{margin-right:0}}.wpcf-field .wpcf--transparent-slider{margin-left:0;margin-right:2px}.wpcf-field .wpcf--transparent-slider .ui-slider-handle{margin:0 -11px}.wpcf-field .wpcf--transparent-offset{background-position:center right}.wpcf-field .wpcf--transparent-text{right:auto;left:10px}
admin/views/sp-framework/assets/css/style.css ADDED
@@ -0,0 +1,3616 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ *
3
+ * ---------------------------------------------------------
4
+ * FRAMEWORK CSS MAP
5
+ * ---------------------------------------------------------
6
+ *
7
+ * 01. Base
8
+ * 01. 01. Header
9
+ * 01. 02. Sticky
10
+ * 01. 03. Header Buttons
11
+ * 01. 04. Navigation
12
+ * 01. 05. Wrapper
13
+ * 01. 06. Content
14
+ * 01. 07. Section
15
+ * 01. 08. Footer
16
+ * 01. 09. Copyright
17
+ * 01. 10. Show All Settings
18
+ * 01. 11. Search Input
19
+ * 01. 12. Metabox
20
+ * 01. 13. Comment Metabox
21
+ * 01. 14. Help Tooltip
22
+ * 02. Themes
23
+ * 02. 01. Theme Dark
24
+ * 02. 02. Theme Light
25
+ * 03. Fields
26
+ * 03. 01. Field
27
+ * 03. 02. Field: accordion
28
+ * 03. 03. Field: background
29
+ * 03. 04. Field: backup
30
+ * 03. 05. Field: border, spacing, dimensions
31
+ * 03. 06. Field: button_set
32
+ * 03. 07. Field: checkbox, radio
33
+ * 03. 08. Field: code_editor
34
+ * 03. 09. Field: color
35
+ * 03. 10. Field: color_group
36
+ * 03. 11. Field: fieldset
37
+ * 03. 12. Field: date
38
+ * 03. 13. Field: gallery
39
+ * 03. 14. Field: group
40
+ * 03. 15. Field: icon
41
+ * 03. 16. Field: image_select
42
+ * 03. 17. Field: link_color
43
+ * 03. 18. Field: map
44
+ * 03. 19. Field: media
45
+ * 03. 20. Field: palette
46
+ * 03. 21. Field: repeater
47
+ * 03. 22. Field: select
48
+ * 03. 23. Field: slider
49
+ * 03. 24. Field: sortable
50
+ * 03. 25. Field: sorter
51
+ * 03. 26. Field: spinner
52
+ * 03. 27. Field: switcher
53
+ * 03. 28. Field: tabbed
54
+ * 03. 29. Field: text
55
+ * 03. 30. Field: textarea
56
+ * 03. 31. Field: typography
57
+ * 03. 32. Field: upload
58
+ * 03. 33. Field: wp_editor
59
+ * 03. 34. Field: heading
60
+ * 03. 35. Field: subheading
61
+ * 03. 36. Field: submessage
62
+ * 03. 37. Field: notice
63
+ * 03. 38. Field: number
64
+ * 03. 39. Field: link
65
+ * 03. 40. Field: others
66
+ * 04. Widget
67
+ * 05. Customizer
68
+ * 06. Taxonomy
69
+ * 07. Profile
70
+ * 08. Nav Menu
71
+ * 09. Modal
72
+ * 09. 01. Shortcode Modal
73
+ * 09. 02. Gutenberg Modal
74
+ * 09. 03. Icon Modal
75
+ * 10. Helper
76
+ * 11. Welcome Page
77
+ * 12. Responsive
78
+ * 13. Others
79
+ *
80
+ * ---------------------------------------------------------
81
+ *
82
+ */
83
+ /**
84
+ * 01. Base
85
+ */
86
+ .wpcf {
87
+ position: relative;
88
+ }
89
+ .wpcf label {
90
+ padding: 0;
91
+ margin: 0;
92
+ display: inline-block;
93
+ }
94
+
95
+ .wpcf-ab-icon {
96
+ top: 2px;
97
+ }
98
+
99
+ #screen-meta-links + .wpcf-options {
100
+ margin-top: 40px;
101
+ }
102
+
103
+ .wpcf-options {
104
+ margin-top: 20px;
105
+ margin-right: 20px;
106
+ }
107
+
108
+ /**
109
+ * 01. 01. Header
110
+ */
111
+ .wpcf-header {
112
+ position: relative;
113
+ }
114
+
115
+ .wpcf-header-inner {
116
+ padding: 25px;
117
+ transition: box-shadow 0.3s ease;
118
+ }
119
+ .wpcf-header-inner h1 svg {
120
+ float: left;
121
+ height: 26px;
122
+ width: 28px;
123
+ margin-right: 8px;
124
+ padding-top: 6px;
125
+ }
126
+ .wpcf-header-inner h1 {
127
+ float: left;
128
+ margin: 0;
129
+ font-size: 22px;
130
+ color: #444444;
131
+ font-weight: 600;
132
+ line-height: 35px;
133
+ }
134
+ .wpcf-header-inner h1 small {
135
+ font-size: 11px;
136
+ font-weight: 500;
137
+ }
138
+
139
+ /**
140
+ * 01. 02. Sticky
141
+ */
142
+ .wpcf-sticky .wpcf-header-inner {
143
+ position: fixed;
144
+ z-index: 99;
145
+ top: 32px;
146
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
147
+ }
148
+
149
+ /**
150
+ * 01. 03. Header Buttons
151
+ */
152
+ .wpcf-buttons {
153
+ float: right;
154
+ }
155
+ .wpcf-buttons .button {
156
+ margin: 0 2px;
157
+ line-height: 26px;
158
+ }
159
+ .wpcf-buttons .button:focus {
160
+ outline: none !important;
161
+ box-shadow: none !important;
162
+ }
163
+ .wpcf-buttons .wpcf-save {
164
+ min-width: 72px;
165
+ }
166
+
167
+ .wpcf-header-left {
168
+ float: left;
169
+ }
170
+
171
+ .wpcf-header-right {
172
+ float: right;
173
+ }
174
+
175
+ /**
176
+ * 01. 04. Navigation
177
+ */
178
+ .wpcf-nav:not(.wpcf-nav-inline) {
179
+ display: block;
180
+ position: relative;
181
+ z-index: 10;
182
+ float: left;
183
+ }
184
+ .wpcf-nav ul {
185
+ clear: left;
186
+ margin: 0;
187
+ list-style-type: none;
188
+ }
189
+ .wpcf-nav ul li {
190
+ margin-bottom: 0;
191
+ }
192
+ .wpcf-nav ul li a {
193
+ font-size: 13px;
194
+ position: relative;
195
+ display: block;
196
+ padding: 14px 12px;
197
+ text-decoration: none;
198
+ transition-property: color, background;
199
+ transition-duration: 0.2s;
200
+ transition-timing-function: ease;
201
+ }
202
+ .wpcf-nav .fa {
203
+ width: 20px;
204
+ margin-right: 5px;
205
+ font-size: 14px;
206
+ text-align: center;
207
+ }
208
+
209
+ .wpcf-nav ul li a:focus {
210
+ outline: none;
211
+ box-shadow: none;
212
+ }
213
+ .wpcf-nav ul li .wpcf-arrow:after {
214
+ content: "\f054";
215
+ display: inline-block;
216
+ font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome";
217
+ font-weight: 900;
218
+ font-size: 9px;
219
+ line-height: 1;
220
+ position: absolute;
221
+ right: 10px;
222
+ top: 50%;
223
+ margin-top: -4px;
224
+ }
225
+ .wpcf-nav ul li.wpcf-tab-expanded .wpcf-arrow:after {
226
+ transform: rotate(90deg);
227
+ }
228
+ #wpcf_shortcode_options .wpcf-theme-light .wpcf-nav ul li .wpcf-active i,
229
+ .sp-wpcf-options.wpcf-theme-light .wpcf-nav ul li .wpcf-active i {
230
+ color: #178087;
231
+ }
232
+ .wpcf-nav ul li.wpcf-tab-expanded ul {
233
+ display: block;
234
+ }
235
+ .wpcf-nav ul ul {
236
+ display: none;
237
+ position: relative;
238
+ }
239
+ .wpcf-nav ul ul li a {
240
+ font-size: 12px;
241
+ padding: 12px 14px 12px 24px;
242
+ }
243
+ .wpcf-nav .wpcf-tab-icon {
244
+ width: 20px;
245
+ margin-right: 5px;
246
+ font-size: 13px;
247
+ text-align: center;
248
+ }
249
+ .wpcf-nav .wpcf-label-error {
250
+ margin-left: 4px;
251
+ vertical-align: top;
252
+ }
253
+
254
+ .wpcf-nav-normal {
255
+ width: 235px;
256
+ }
257
+ .wpcf-nav-normal + .wpcf-content {
258
+ margin-left: 235px;
259
+ }
260
+
261
+ /* .wpcf-nav-inline {
262
+ width: 100%;
263
+ } */
264
+ .wpcf-nav-inline ul li {
265
+ display: inline-block;
266
+ vertical-align: top;
267
+ }
268
+
269
+ .wpcf-nav-background {
270
+ position: absolute;
271
+ top: 0;
272
+ left: 0;
273
+ bottom: 0;
274
+ z-index: 9;
275
+ width: 235px;
276
+ }
277
+
278
+ /**
279
+ * 01. 05. Wrapper
280
+ */
281
+ .wpcf-wrapper {
282
+ position: relative;
283
+ }
284
+
285
+ /**
286
+ * 01. 06. Content
287
+ */
288
+ .wpcf-content {
289
+ /* position: relative; */
290
+ background-color: #fff;
291
+ background-color: #fff;
292
+ -moz-transition: opacity 0.2s;
293
+ -o-transition: opacity 0.2s;
294
+ -webkit-transition: opacity 0.2s;
295
+ transition: opacity 0.2s;
296
+ }
297
+
298
+
299
+ /**
300
+ * 01. 07. Section
301
+ */
302
+ .wpcf-sections {
303
+ float: left;
304
+ width: 100%;
305
+ }
306
+
307
+ .wpcf-section-title {
308
+ display: none;
309
+ padding: 20px 30px;
310
+ background-color: #f5f5f5;
311
+ border-top: 1px solid #eee;
312
+ border-bottom: 1px solid #eee;
313
+ }
314
+ .wpcf-section-title h3 {
315
+ margin: 0;
316
+ padding: 0;
317
+ font-size: 13px;
318
+ font-weight: bold;
319
+ text-transform: uppercase;
320
+ }
321
+ .wpcf-section-title .wpcf-section-icon {
322
+ margin-right: 5px;
323
+ }
324
+
325
+ /**
326
+ * 01. 08. Footer
327
+ */
328
+ .wpcf-footer {
329
+ padding: 20px;
330
+ font-size: 11px;
331
+ }
332
+
333
+ /**
334
+ * 01. 09. Copyright
335
+ */
336
+ .wpcf-copyright {
337
+ float: left;
338
+ margin-top: 5px;
339
+ }
340
+
341
+ /**
342
+ * 01. 10. Show All Settings
343
+ */
344
+ .wpcf-search-all .wpcf-nav-background,
345
+ .wpcf-search-all .wpcf-nav,
346
+ .wpcf-show-all .wpcf-nav-background,
347
+ .wpcf-show-all .wpcf-nav {
348
+ display: none;
349
+ }
350
+ .wpcf-search-all .wpcf-content,
351
+ .wpcf-show-all .wpcf-content {
352
+ margin-left: 0;
353
+ }
354
+ /* .wpcf-show-all .wpcf-section, */
355
+ .wpcf-search-all .wpcf-section-title,
356
+ .wpcf-search-all .wpcf-section,
357
+ .wpcf-show-all .wpcf-section-title {
358
+ display: block !important;
359
+ }
360
+
361
+ .wpcf-search-all .wpcf-section-title {
362
+ display: none !important;
363
+ }
364
+
365
+ .wpcf-expand-all {
366
+ float: left;
367
+ padding: 0 8px;
368
+ margin-right: 4px;
369
+ z-index: 1;
370
+ font-size: 13px;
371
+ line-height: 30px;
372
+ cursor: pointer;
373
+ user-select: none;
374
+ border-radius: 2px;
375
+ transition: all 0.2s;
376
+ }
377
+ .wpcf-expand-all span {
378
+ font-size: 11px;
379
+ vertical-align: middle;
380
+ }
381
+
382
+ /**
383
+ * 01. 11. Search Input
384
+ */
385
+ .wpcf-search {
386
+ float: left;
387
+ }
388
+ .wpcf-search input {
389
+ margin: 0 2px 0 0;
390
+ border: none;
391
+ font-size: 12px;
392
+ line-height: 30px;
393
+ min-height: 30px;
394
+ text-align: inherit;
395
+ padding: 0 10px;
396
+ border-radius: 2px;
397
+ box-shadow: none;
398
+ }
399
+ .wpcf-search input:focus {
400
+ box-shadow: none;
401
+ }
402
+
403
+ .wpcf-saving .wpcf-buttons,
404
+ .wpcf-saving .wpcf-content {
405
+ cursor: default;
406
+ pointer-events: none;
407
+ opacity: 0.5;
408
+ }
409
+
410
+ /**
411
+ * 01. 12. Metabox
412
+ */
413
+ .wpcf-metabox {
414
+ margin: -6px -12px -12px -12px;
415
+ }
416
+ .wpcf-metabox .wpcf-field {
417
+ padding: 20px;
418
+ }
419
+ .wpcf-metabox .wpcf-section-title {
420
+ padding: 20px;
421
+ }
422
+
423
+ .block-editor-page .wpcf-metabox {
424
+ margin: -6px -14px -14px -14px;
425
+ }
426
+
427
+ .block-editor-editor-skeleton__content .wpcf-metabox {
428
+ border-left: 1px solid #e2e4e7;
429
+ border-right: 1px solid #e2e4e7;
430
+ }
431
+
432
+ .wpcf-sections-reset {
433
+ float: left;
434
+ width: 100%;
435
+ text-align: right;
436
+ border-top: 1px solid #eee;
437
+ }
438
+ .wpcf-sections-reset .wpcf-button-cancel,
439
+ .wpcf-sections-reset input {
440
+ display: none;
441
+ }
442
+ .wpcf-sections-reset label {
443
+ padding: 10px;
444
+ }
445
+ .wpcf-sections-reset span {
446
+ -webkit-user-select: none;
447
+ user-select: none;
448
+ }
449
+ .wpcf-sections-reset input:checked ~ .wpcf-button-reset {
450
+ display: none;
451
+ }
452
+ .wpcf-sections-reset input:checked ~ .wpcf-button-cancel {
453
+ display: inline-block;
454
+ }
455
+
456
+ #side-sortables .wpcf-section-title {
457
+ padding: 12px;
458
+ }
459
+ #side-sortables .wpcf-field {
460
+ padding: 10px 15px;
461
+ }
462
+ #side-sortables .wpcf-field .wpcf-title {
463
+ float: none;
464
+ width: 100%;
465
+ margin-bottom: 6px;
466
+ }
467
+ #side-sortables .wpcf-field .wpcf-fieldset {
468
+ float: none;
469
+ width: 100%;
470
+ }
471
+ #side-sortables .wpcf-field-text input {
472
+ width: 100%;
473
+ }
474
+ #side-sortables .wpcf-notice {
475
+ padding: 10px 15px;
476
+ }
477
+
478
+ /**
479
+ * 01. 13. Comment Metabox
480
+ */
481
+ .wpcf-comment-metabox {
482
+ margin: -6px -12px -12px -12px;
483
+ }
484
+ .wpcf-comment-metabox .wpcf-field {
485
+ padding: 20px;
486
+ }
487
+ .wpcf-comment-metabox .wpcf-section-title {
488
+ padding: 20px;
489
+ }
490
+
491
+ /**
492
+ * 01. 14. Help Tooltip
493
+ */
494
+ .wpcf-tooltip {
495
+ position: absolute;
496
+ z-index: 5000001;
497
+ font-size: 12px;
498
+ line-height: 1.4;
499
+ text-align: center;
500
+ text-decoration: none;
501
+ padding: 6px 12px;
502
+ max-width: 200px;
503
+ color: #fff;
504
+ background-color: #000;
505
+ background-color: rgba(0, 0, 0, 0.85);
506
+ border-radius: 4px;
507
+ }
508
+
509
+ /**
510
+ * 02. Themes
511
+ */
512
+ /**
513
+ * 02. 01. Theme Dark
514
+ */
515
+ .wpcf-theme-dark .wpcf-header-inner {
516
+ background-color: #050505;
517
+ }
518
+ .wpcf-theme-dark .wpcf-header-inner h1 {
519
+ color: #fff;
520
+ }
521
+ .wpcf-theme-dark .wpcf-header-inner h1 small {
522
+ color: #555;
523
+ }
524
+ .wpcf-theme-dark .wpcf-expand-all {
525
+ color: #999;
526
+ background-color: #222;
527
+ }
528
+ .wpcf-theme-dark .wpcf-expand-all:hover {
529
+ color: #fff;
530
+ background-color: #333;
531
+ }
532
+ .wpcf-theme-dark .wpcf-search input {
533
+ color: #fff;
534
+ background-color: #222;
535
+ }
536
+ .wpcf-theme-dark .wpcf-search:focus {
537
+ background-color: #444;
538
+ }
539
+ .wpcf-theme-dark .wpcf-search::-webkit-input-placeholder {
540
+ color: #666;
541
+ }
542
+ .wpcf-theme-dark .wpcf-nav ul li a {
543
+ color: #999;
544
+ border-color: #2f2f2f;
545
+ background-color: #222;
546
+ }
547
+ .wpcf-theme-dark .wpcf-nav ul li a:hover {
548
+ color: #fff;
549
+ }
550
+ .wpcf-theme-dark .wpcf-nav ul li .wpcf-active i {
551
+ color: #178087;
552
+ }
553
+ .wpcf-theme-dark .wpcf-nav ul li .wpcf-active {
554
+ color: #fff;
555
+ background-color: #111;
556
+ }
557
+ .wpcf-theme-dark .wpcf-nav ul ul li a {
558
+ border-color: #2f2f2f;
559
+ background-color: #191919;
560
+ }
561
+ .wpcf-theme-dark .wpcf-nav ul ul li .wpcf-active {
562
+ background-color: #101010;
563
+ }
564
+ .wpcf-theme-dark .wpcf-nav ul ul:before {
565
+ background-color: rgba(34, 34, 34, 0.75);
566
+ }
567
+ .wpcf-theme-dark .wpcf-nav > ul > li:last-child > a {
568
+ border: none;
569
+ }
570
+ .wpcf-theme-dark .wpcf-nav-normal ul li a {
571
+ border-bottom-width: 1px;
572
+ border-bottom-style: solid;
573
+ }
574
+ .wpcf-theme-dark .wpcf-nav-normal ul li .wpcf-active:after {
575
+ content: " ";
576
+ position: absolute;
577
+ right: 0;
578
+ top: 50%;
579
+ height: 0;
580
+ width: 0;
581
+ pointer-events: none;
582
+ border: solid transparent;
583
+ border-right-color: #fff;
584
+ border-width: 4px;
585
+ margin-top: -4px;
586
+ }
587
+ .wpcf-theme-dark .wpcf-nav-inline {
588
+ background-color: #222;
589
+ }
590
+ .wpcf-theme-dark .wpcf-nav-inline ul li a {
591
+ text-align: center;
592
+ border-right-width: 1px;
593
+ border-right-style: solid;
594
+ }
595
+ .wpcf-theme-dark .wpcf-nav-inline ul li .wpcf-active:after {
596
+ content: " ";
597
+ position: absolute;
598
+ left: 50%;
599
+ bottom: 0;
600
+ height: 0;
601
+ width: 0;
602
+ pointer-events: none;
603
+ border: solid transparent;
604
+ border-bottom-color: #fff;
605
+ border-width: 4px;
606
+ margin-left: -4px;
607
+ }
608
+ .wpcf-theme-dark .wpcf-nav-background {
609
+ background-color: #222;
610
+ }
611
+ .wpcf-theme-dark .wpcf-footer {
612
+ color: #555;
613
+ background-color: #050505;
614
+ }
615
+
616
+ /**
617
+ * 02. 02. Theme Light
618
+ */
619
+ .wpcf-theme-light .wpcf-container {
620
+ border: 1px solid #ccd0d4;
621
+ box-shadow: 0 0 15 rgba(0, 0, 0, 0.04);
622
+ }
623
+ .wpcf-theme-light .wpcf-header-inner {
624
+ background-color: #f2f2f2;
625
+ border-bottom: 1px solid #cecece;
626
+ padding: 22px 28px;
627
+ }
628
+ .wpcf-theme-light .wpcf-header-inner h1 small {
629
+ color: #999;
630
+ }
631
+ .wpcf-theme-light .wpcf-expand-all {
632
+ color: #999;
633
+ background-color: #eee;
634
+ }
635
+ .wpcf-theme-light .wpcf-expand-all:hover {
636
+ color: #555;
637
+ }
638
+ .wpcf-theme-light .wpcf-search input {
639
+ color: #555;
640
+ background-color: #eee;
641
+ }
642
+ .wpcf-theme-light .wpcf-search input::-webkit-input-placeholder {
643
+ color: #999;
644
+ }
645
+ .wpcf-theme-light .wpcf-nav ul li a {
646
+ background-color: #178087;
647
+ border-top: 1px solid #178087;
648
+ border-right: 1px solid #e2e2e1;
649
+ border-bottom: 1px solid #ddd;
650
+ color: #fff;
651
+ font-size: 13px;
652
+ font-weight: 600;
653
+ line-height: 1.4;
654
+ padding: 14px 15px;
655
+ text-transform: uppercase;
656
+ }
657
+ /* .wpcf-theme-light .wpcf-nav ul li a:hover {
658
+ color: #000;
659
+ background-color: #fff;
660
+ } */
661
+ .wpcf-theme-light .wpcf-nav ul li .wpcf-active {
662
+ color: #000;
663
+ background-color: #fff;
664
+ }
665
+ .wpcf-theme-light .wpcf-nav ul ul li a {
666
+ background-color: #eee;
667
+ }
668
+ .wpcf-theme-light .wpcf-nav-normal > ul {
669
+ margin-right: -1px;
670
+ margin-bottom: -1px;
671
+ }
672
+ .wpcf-theme-light .wpcf-nav-normal > ul li a {
673
+ border-bottom: 1px solid #ccd0d4;
674
+ border-right: 1px solid #ccd0d4;
675
+ }
676
+ .wpcf-theme-light .wpcf-nav-normal > ul li .wpcf-active {
677
+ border-right-color: #fff;
678
+ }
679
+ .wpcf-theme-light .wpcf-nav-inline {
680
+ background-color: #f5f5f5;
681
+ border-bottom: 1px solid #ccd0d4;
682
+ }
683
+ .wpcf-theme-light .wpcf-nav-inline > ul {
684
+ margin-bottom: -1px;
685
+ margin-right: -1px;
686
+ }
687
+ .wpcf-theme-light .wpcf-nav-inline > ul li a {
688
+ text-align: center;
689
+ border-bottom: 1px solid #ccd0d4;
690
+ }
691
+ .wpcf-theme-light .wpcf-nav-inline > ul li .wpcf-active i {
692
+ color: #178087;
693
+ }
694
+ .wpcf-theme-light .wpcf-nav-inline > ul li .wpcf-active {
695
+ border-bottom: 1px solid #fff;
696
+ border-top: 1px solid #178087;
697
+ box-shadow: 0 3px 0 0 #178087 inset;
698
+ border-bottom-color: #fff;
699
+ }
700
+ .wpcf-theme-light .wpcf-nav-inline > ul ul {
701
+ display: none !important;
702
+ }
703
+ .wpcf-theme-light .wpcf-nav-inline .wpcf-arrow:after {
704
+ display: none;
705
+ }
706
+ .wpcf-theme-light .wpcf-nav-background {
707
+ background-color: #f5f5f5;
708
+ border-right: 1px solid #ccd0d4;
709
+ }
710
+ .wpcf-theme-light .wpcf-footer {
711
+ color: #555;
712
+ border-top: 1px solid #ccd0d4;
713
+ background-color: #f5f5f5;
714
+ background: linear-gradient(#fafafa, #f5f5f5);
715
+ }
716
+
717
+ /**
718
+ * 03. Fields
719
+ */
720
+ .wpcf-field {
721
+ position: relative;
722
+ padding: 30px;
723
+ }
724
+ /* .wpcf-field + .wpcf-field {
725
+ border-top: 1px solid #eee;
726
+ } */
727
+ .wpcf-field p:first-child {
728
+ margin-top: 0;
729
+ }
730
+ .wpcf-field p:last-child {
731
+ margin-bottom: 0;
732
+ }
733
+ .wpcf-field:after,
734
+ .wpcf-field:before {
735
+ content: " ";
736
+ display: table;
737
+ }
738
+ .wpcf-field:after {
739
+ clear: both;
740
+ }
741
+ .wpcf-field h4 {
742
+ margin-top: 0;
743
+ }
744
+ .wpcf-field .wpcf-title {
745
+ position: relative;
746
+ width: 20%;
747
+ float: left;
748
+ }
749
+ .wpcf-field .wpcf-title h4 {
750
+ margin: 0;
751
+ color: #23282d;
752
+ }
753
+ .wpcf-field .wpcf-fieldset {
754
+ float: right;
755
+ width: calc(80% - 20px);
756
+ }
757
+
758
+ .wpcf-pseudo-field {
759
+ padding: 0 5px 0 0 !important;
760
+ display: inline-block;
761
+ }
762
+ .wpcf-pseudo-field + .wpcf-pseudo-field {
763
+ border: 0;
764
+ }
765
+ .wpcf-pseudo-field pre {
766
+ display: none;
767
+ }
768
+
769
+
770
+ /**
771
+ * Custom CSS
772
+ */
773
+
774
+ .wpcf-field.wpcf-field-background .wpcf--preview {
775
+ font-size: 16px;
776
+ line-height: 20px;
777
+ padding: 20px;
778
+ color: #222;
779
+ border: 1px solid #eee;
780
+ background-color: #fff;
781
+ height: 150px;
782
+ border-radius: 2.5px;
783
+ user-select: none;
784
+ -webkit-user-select: none;
785
+ transition: background-color 0.2s, border-color 0.2s;
786
+ }
787
+
788
+ .wpcf-field.wpcf-field-background .wpcf--block-preview {
789
+ cursor: pointer;
790
+ position: relative;
791
+ overflow: hidden;
792
+ margin-top: 10px;
793
+ width: 100%;
794
+ }
795
+
796
+ .wpcf-field.wpcf-field-background .wpcf--black-background {
797
+ border-color: #000;
798
+ background-color: #000;
799
+ }
800
+
801
+ .wpcf-field.wpcf-field-background .wpcf--toggle {
802
+ position: absolute;
803
+ top: 5px;
804
+ right: 10px;
805
+ color: #999;
806
+ }
807
+
808
+
809
+ /**
810
+ * 03. 05. Field: border, spacing, dimensions
811
+ */
812
+ .wpcf-field-column .wpcf--inputs,
813
+ .wpcf-field-border .wpcf--inputs,
814
+ .wpcf-field-spacing .wpcf--inputs,
815
+ .wpcf-field-dimensions_advanced .wpcf--inputs,
816
+ .wpcf-field-dimensions .wpcf--inputs {
817
+ float: left;
818
+ display: flex;
819
+ flex-wrap: wrap;
820
+ }
821
+ .wpcf-field-dimensions_advanced .wpcf--input,
822
+ .wpcf-field-column .wpcf--input,
823
+ .wpcf-field-border .wpcf--input,
824
+ .wpcf-field-spacing .wpcf--input,
825
+ .wpcf-field-dimensions .wpcf--input {
826
+ display: flex;
827
+ padding-right: 6px;
828
+ padding-bottom: 4px;
829
+ box-sizing: border-box;
830
+ }
831
+ .wpcf-field-dimensions_advanced .wpcf--input select,
832
+ .wpcf-field-column .wpcf--input select,
833
+ .wpcf-field-border .wpcf--input select,
834
+ .wpcf-field-spacing .wpcf--input select,
835
+ .wpcf-field-dimensions .wpcf--input select {
836
+ margin: 0;
837
+ }
838
+ .wpcf-field-dimensions_advanced .wpcf--input input,
839
+ .wpcf-field-column .wpcf--input input,
840
+ .wpcf-field-border .wpcf--input input,
841
+ .wpcf-field-spacing .wpcf--input input,
842
+ .wpcf-field-dimensions .wpcf--input input {
843
+ position: relative;
844
+ z-index: 1;
845
+ margin: 0;
846
+ width: 65px;
847
+ max-width: 100%;
848
+ text-align: center;
849
+ padding: 0;
850
+ }
851
+ .wpcf-field-dimensions_advanced .wpcf--color,
852
+ .wpcf-field-column .wpcf--color,
853
+ .wpcf-field-border .wpcf--color,
854
+ .wpcf-field-spacing .wpcf--color,
855
+ .wpcf-field-dimensions .wpcf--color {
856
+ float: left;
857
+ }
858
+ .wpcf-field-dimensions_advanced .wpcf--label,
859
+ .wpcf-field-column .wpcf--label,
860
+ .wpcf-field-border .wpcf--label,
861
+ .wpcf-field-spacing .wpcf--label,
862
+ .wpcf-field-dimensions .wpcf--label {
863
+ display: flex;
864
+ flex-direction: column;
865
+ justify-content: center;
866
+ user-select: none;
867
+ min-width: 20px;
868
+ max-width: 100%;
869
+ padding: 0 4px;
870
+ font-size: 12px;
871
+ text-align: center;
872
+ color: #555;
873
+ border: 1px solid #7b776c;
874
+ background-color: #f5f5f5;
875
+ }
876
+ .wpcf-field-dimensions_advanced .wpcf--icon,
877
+ .wpcf-field-column .wpcf--icon,
878
+ .wpcf-field-border .wpcf--icon,
879
+ .wpcf-field-spacing .wpcf--icon,
880
+ .wpcf-field-dimensions .wpcf--icon {
881
+ border-right: 0;
882
+ border-radius: 4px 0 0 4px;
883
+ }
884
+ .wpcf-field-dimensions_advanced .wpcf--icon + input,
885
+ .wpcf-field-column .wpcf--icon + input,
886
+ .wpcf-field-border .wpcf--icon + input,
887
+ .wpcf-field-spacing .wpcf--icon + input,
888
+ .wpcf-field-dimensions .wpcf--icon + input {
889
+ border-top-left-radius: 0 !important;
890
+ border-bottom-left-radius: 0 !important;
891
+ }
892
+ .wpcf-field-dimensions_advanced .wpcf--unit,
893
+ .wpcf-field-column .wpcf--unit,
894
+ .wpcf-field-border .wpcf--unit,
895
+ .wpcf-field-spacing .wpcf--unit,
896
+ .wpcf-field-dimensions .wpcf--unit {
897
+ border-left: 0;
898
+ border-radius: 0 4px 4px 0;
899
+ }
900
+ .wpcf-field-dimensions_advanced .wpcf--is-unit,
901
+ .wpcf-field-column .wpcf--is-unit,
902
+ .wpcf-field-border .wpcf--is-unit,
903
+ .wpcf-field-spacing .wpcf--is-unit,
904
+ .wpcf-field-dimensions .wpcf--is-unit {
905
+ border-top-right-radius: 0 !important;
906
+ border-bottom-right-radius: 0 !important;
907
+ }
908
+
909
+ /**
910
+ * 03. 06. Field: button_set
911
+ */
912
+ .wpcf-field-button_set .wpcf--buttons {
913
+ display: inline-block;
914
+ }
915
+ .wpcf-field-button_set .wpcf--button {
916
+ position: relative;
917
+ z-index: 1;
918
+ float: left;
919
+ cursor: pointer;
920
+ padding: 7px 14px;
921
+ min-width: 16px;
922
+ text-align: center;
923
+ color: #555;
924
+ border: 1px solid #cccccc;
925
+ background-color: #f7f7f7;
926
+ user-select: none;
927
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
928
+ }
929
+ .wpcf-field-button_set .wpcf--button:first-child {
930
+ border-radius: 4px 0 0 4px;
931
+ }
932
+ .wpcf-field-button_set .wpcf--button:last-child {
933
+ border-radius: 0 4px 4px 0;
934
+ }
935
+ .wpcf-field-button_set .wpcf--button:not(:first-child) {
936
+ margin-left: -1px;
937
+ }
938
+ .wpcf-field-button_set .wpcf--button:hover {
939
+ background-color: #eee;
940
+ }
941
+ .wpcf-field-button_set .wpcf--active:hover,
942
+ .wpcf-field-button_set .wpcf--active {
943
+ z-index: 2;
944
+ color: #fff;
945
+ border-color: #006799;
946
+ background-color: #0085ba;
947
+ }
948
+ .wpcf-field-button_set input {
949
+ display: none;
950
+ }
951
+
952
+ /**
953
+ * 03. 07. Field: checkbox, radio
954
+ */
955
+ .wpcf-field-checkbox ul,
956
+ .wpcf-field-radio ul {
957
+ margin: 0;
958
+ padding: 0;
959
+ list-style-type: none;
960
+ overflow-y: auto;
961
+ max-height: 305px;
962
+ }
963
+ .wpcf-field-checkbox ul li,
964
+ .wpcf-field-radio ul li {
965
+ margin-bottom: 6px;
966
+ }
967
+ .wpcf-field-checkbox ul ul,
968
+ .wpcf-field-radio ul ul {
969
+ max-height: none;
970
+ }
971
+ .wpcf-field-checkbox ul ul li,
972
+ .wpcf-field-radio ul ul li {
973
+ margin-left: 8px;
974
+ }
975
+ .wpcf-field-checkbox ul ul li:first-child,
976
+ .wpcf-field-radio ul ul li:first-child {
977
+ margin-left: 0;
978
+ }
979
+ .wpcf-field-checkbox input,
980
+ .wpcf-field-radio input {
981
+ margin: 0 1px;
982
+ }
983
+ .wpcf-field-checkbox .wpcf--inline-list li,
984
+ .wpcf-field-radio .wpcf--inline-list li {
985
+ display: inline-block;
986
+ margin-right: 15px;
987
+ }
988
+ .wpcf-field-checkbox .wpcf--text,
989
+ .wpcf-field-radio .wpcf--text {
990
+ margin-left: 5px;
991
+ vertical-align: middle;
992
+ }
993
+ .wpcf-field-checkbox .wpcf-checker,
994
+ .wpcf-field-radio .wpcf-checker {
995
+ cursor: pointer;
996
+ }
997
+
998
+ /**
999
+ * 03. 08. Field: code_editor
1000
+ */
1001
+ .wpcf-field-code_editor .CodeMirror {
1002
+ width: 100%;
1003
+ height: 400px;
1004
+ }
1005
+ .wpcf-field-code_editor .cm-s-default {
1006
+ border: 1px solid #ccd0d4;
1007
+ }
1008
+ .wpcf-field-code_editor textarea {
1009
+ width: 100%;
1010
+ height: 400px;
1011
+ }
1012
+
1013
+ /**
1014
+ * 03. 09. Field: color
1015
+ */
1016
+ .wpcf-field-color > input {
1017
+ opacity: 0.75;
1018
+ width: 115px;
1019
+ max-width: 100%;
1020
+ }
1021
+ .wpcf-field-color .button.wp-picker-clear {
1022
+ padding: 0 8px;
1023
+ margin-left: 6px;
1024
+ line-height: 2.54545455;
1025
+ min-height: 30px;
1026
+ }
1027
+
1028
+ /**
1029
+ * 03. 10. Field: color_group
1030
+ */
1031
+ .wpcf-field-color_group .wpcf--left {
1032
+ float: left;
1033
+ margin-right: 10px;
1034
+ margin-bottom: 5px;
1035
+ }
1036
+ .wpcf-field-color_group .wpcf--title {
1037
+ color: #999;
1038
+ margin-bottom: 5px;
1039
+ }
1040
+
1041
+
1042
+ /**
1043
+ * 03. 13. Field: gallery
1044
+ */
1045
+
1046
+ .wpcf-field-gallery input {
1047
+ display: none;
1048
+ }
1049
+
1050
+ .wpcf-field-gallery ul {
1051
+ margin: 0;
1052
+ padding: 0;
1053
+ list-style-type: none;
1054
+ }
1055
+
1056
+ .wpcf-field-gallery ul.sp-gallery-images li {
1057
+ display: inline-block;
1058
+ position: relative;
1059
+ padding: 4px;
1060
+ margin: 0 5px 10px 0;
1061
+ border: 1px solid #ccc;
1062
+ background-color: #f9f9f9;
1063
+ -moz-border-radius: 2px;
1064
+ -webkit-border-radius: 2px;
1065
+ border-radius: 2px;
1066
+ -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1067
+ -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1068
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1069
+ }
1070
+
1071
+ .wpcf-field-gallery ul.sp-gallery-images li img {
1072
+ max-height: 100px;
1073
+ display: inline-block;
1074
+ vertical-align: middle;
1075
+ }
1076
+
1077
+ .wpcf-field-gallery .button:focus,
1078
+ .wpcf-field-gallery .button:hover,
1079
+ .wpcf-field-gallery .button {
1080
+ margin-right: 5px;
1081
+ margin-bottom: 5px;
1082
+ /* SP Style */
1083
+ width: 110px;
1084
+ height: 110px;
1085
+ text-align: center;
1086
+ line-height: 15px;
1087
+ color: #fff;
1088
+ border: none;
1089
+ border-radius: 2px;
1090
+ display: flex;
1091
+ justify-content: center;
1092
+ flex-direction: column;
1093
+ font-weight: 600;
1094
+ }
1095
+
1096
+ .wpcf-field-gallery .button-primary.wpcf-button {
1097
+ background: #4eb631;
1098
+ box-shadow: none;
1099
+ text-shadow: none;
1100
+ }
1101
+
1102
+ .wpcf-field-gallery .button.wpcf-edit-gallery {
1103
+ background: #6a7885;
1104
+ }
1105
+
1106
+ .wpcf-field-gallery .button i {
1107
+ font-size: 24px;
1108
+ margin-bottom: 10px;
1109
+ }
1110
+
1111
+ .wpcf-field-gallery a,
1112
+ .wpcf-field-gallery ul.sp-gallery-images li {
1113
+ display: inline-block;
1114
+ padding: 4px;
1115
+ border: 1px solid #ccc;
1116
+ margin: 0 5px 10px 0;
1117
+ background-color: #f9f9f9;
1118
+ -moz-border-radius: 2px;
1119
+ -webkit-border-radius: 2px;
1120
+ border-radius: 2px;
1121
+ -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1122
+ -webkit-box-shadow: 0 1px 0 rgb(0 0 0 / 8%);
1123
+ box-shadow: 0 1px 0 rgb(0 0 0 / 8%);
1124
+ }
1125
+ .wpcf-field-gallery ul li img {
1126
+ max-height: 100px;
1127
+ display: inline-block;
1128
+ vertical-align: middle;
1129
+ }
1130
+ .wpcf-field-gallery a, .wpcf-field-gallery li {
1131
+ float: left;
1132
+ }
1133
+
1134
+ /**
1135
+ * 03. 16. Field: image_select
1136
+ */
1137
+ .wpcf-field-icon_select .wpcf--icon,
1138
+ .wpcf-field-image_select .wpcf--image {
1139
+ display: inline-block;
1140
+ margin: 0 5px 5px 0;
1141
+ }
1142
+ .wpcf-field-icon_select .wpcf--inline-list .wpcf--icon,
1143
+ .wpcf-field-image_select .wpcf--inline-list .wpcf--image {
1144
+ display: inline-block;
1145
+ }
1146
+ .wpcf-field-icon_select figure,
1147
+ .wpcf-field-image_select figure {
1148
+ cursor: pointer;
1149
+ position: relative;
1150
+ display: inline-block;
1151
+ max-width: 100%;
1152
+ margin: 0;
1153
+ vertical-align: bottom;
1154
+ border: 2px solid transparent;
1155
+ background-color: #fff;
1156
+ user-select: none;
1157
+ transition: all 0.2s;
1158
+ }
1159
+ .wpcf-field-icon_select figure:before,
1160
+ .wpcf-field-image_select figure:before {
1161
+ position: absolute;
1162
+ top: 0;
1163
+ left: 0;
1164
+ text-align: center;
1165
+ font-size: 10px;
1166
+ font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome";
1167
+ font-weight: 900;
1168
+ content: "\f00c";
1169
+ width: 16px;
1170
+ height: 16px;
1171
+ line-height: 14px;
1172
+ opacity: 0;
1173
+ color: #fff;
1174
+ background-color: #222;
1175
+ transition: opacity 0.2s;
1176
+ }
1177
+ .wpcf-field-image_select label,
1178
+ .wpcf-field-icon_select label {
1179
+ display: inline-block;
1180
+ margin: 5px;
1181
+ }
1182
+ .wpcf-field-icon_select figure {
1183
+ padding: 8px 10px;
1184
+ font-size: 20px;
1185
+ line-height: 20px;
1186
+ }
1187
+ .wpcf-field-image_select figure img,
1188
+ .wpcf-field-icon_select figure {
1189
+ /* max-width: 100%;
1190
+ vertical-align: bottom;
1191
+ background-color: #fff;
1192
+ border: 2px solid #eee; */
1193
+ /* opacity: 0.75; */
1194
+ /* -moz-transition: all 0.15s ease-out;
1195
+ -o-transition: all 0.15s ease-out;
1196
+ -webkit-transition: all 0.15s ease-out;
1197
+ transition: all 0.15s ease-out; */
1198
+ }
1199
+
1200
+ .wpcf-field-icon_select .wpcf--active figure {
1201
+ border-color: #52b3d9;
1202
+ opacity: 1;
1203
+ }
1204
+ /* .wpcf-field-icon_select .wpcf--active figure,
1205
+ .wpcf-field-image_select .wpcf--active figure {
1206
+ border-color: #222;
1207
+ box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
1208
+ } */
1209
+ .wpcf-field-icon_select .wpcf--active figure:before,
1210
+ .wpcf-field-image_select .wpcf--active figure:before {
1211
+ opacity: 1;
1212
+ }
1213
+ .wpcf-field-icon_select figure,
1214
+ .wpcf-field-image_select img {
1215
+ max-width: 100%;
1216
+ height: auto;
1217
+ vertical-align: top;
1218
+ }
1219
+ .wpcf-field-icon_select input,
1220
+ .wpcf-field-image_select input {
1221
+ display: none;
1222
+ }
1223
+
1224
+
1225
+ /**
1226
+ * 03. 19. Field: media
1227
+ */
1228
+ .wpcf-field-media .wpcf--placeholder {
1229
+ display: flex;
1230
+ align-items: flex-start;
1231
+ }
1232
+ .wpcf-field-media .wpcf--placeholder input {
1233
+ width: 100%;
1234
+ margin: 0;
1235
+ }
1236
+ .wpcf-field-media .button {
1237
+ margin-left: 5px;
1238
+ }
1239
+ .wpcf-field-media .hidden + .button {
1240
+ margin-left: 0;
1241
+ }
1242
+ .wpcf-field-media .wpcf--preview {
1243
+ position: relative;
1244
+ }
1245
+
1246
+
1247
+ /**
1248
+ * 03. 22. Field: select
1249
+ */
1250
+ .wpcf-field-select .wpcf-fieldset {
1251
+ min-height: 30px;
1252
+ }
1253
+ .wpcf-field-select .wpcf-chosen {
1254
+ display: none;
1255
+ }
1256
+ .wpcf-field-select select {
1257
+ max-width: 100%;
1258
+ margin: 0;
1259
+ float: left;
1260
+ }
1261
+ .wpcf-field-select .wpcf-hide-select {
1262
+ display: none !important;
1263
+ }
1264
+
1265
+ /**
1266
+ * 03. 23. Field: slider
1267
+ */
1268
+ .wpcf-field-slider .wpcf--wrap {
1269
+ display: flex;
1270
+ align-items: center;
1271
+ }
1272
+ .wpcf-field-slider .wpcf--input {
1273
+ display: flex;
1274
+ }
1275
+ .wpcf-field-slider .wpcf--unit {
1276
+ display: flex;
1277
+ justify-content: center;
1278
+ flex-direction: column;
1279
+ user-select: none;
1280
+ padding: 0 6px;
1281
+ font-size: 11px;
1282
+ line-height: 1;
1283
+ border-radius: 0 4px 4px 0;
1284
+ color: #555;
1285
+ border: 1px solid #7e8993;
1286
+ border-left: 0;
1287
+ background-color: #f5f5f5;
1288
+ }
1289
+ .wpcf-field-slider .wpcf-slider-ui {
1290
+ margin-right: 15px;
1291
+ }
1292
+ .wpcf-field-slider input[type="number"] {
1293
+ position: relative;
1294
+ z-index: 1;
1295
+ margin: 0;
1296
+ width: 50px;
1297
+ text-align: center;
1298
+ }
1299
+ .wpcf-field-slider .wpcf--is-unit {
1300
+ border-top-right-radius: 0 !important;
1301
+ border-bottom-right-radius: 0 !important;
1302
+ }
1303
+ .wpcf-field-slider .ui-slider {
1304
+ position: relative;
1305
+ width: 100%;
1306
+ height: 3px;
1307
+ border: none;
1308
+ background: #ddd;
1309
+ border-radius: 2px;
1310
+ }
1311
+ .wpcf-field-slider .ui-slider-range {
1312
+ height: 3px;
1313
+ border: none;
1314
+ background: #333;
1315
+ border-radius: 2px;
1316
+ }
1317
+ .wpcf-field-slider .ui-slider-handle {
1318
+ position: absolute;
1319
+ width: 16px;
1320
+ height: 16px;
1321
+ top: -7px;
1322
+ margin-left: -8px;
1323
+ border: none;
1324
+ background: #333;
1325
+ border-radius: 2px;
1326
+ }
1327
+ .wpcf-field-slider .ui-state-active,
1328
+ .wpcf-field-slider .ui-slider-handle:hover {
1329
+ cursor: pointer;
1330
+ background: #111;
1331
+ }
1332
+
1333
+ /**
1334
+ * 03. 26. Field: spinner
1335
+ */
1336
+ .wpcf-field-spinner .wpcf--spin {
1337
+ display: flex;
1338
+ float: left;
1339
+ }
1340
+ .wpcf-field-spinner .ui-spinner {
1341
+ display: flex;
1342
+ }
1343
+ .wpcf-field-spinner .ui-button {
1344
+ display: flex;
1345
+ flex-direction: column;
1346
+ justify-content: center;
1347
+ text-align: center;
1348
+ min-width: 20px;
1349
+ padding: 0 4px;
1350
+ color: #555;
1351
+ border: 1px solid #7e8993;
1352
+ background-color: #f5f5f5;
1353
+ }
1354
+ .wpcf-field-spinner .ui-spinner-button {
1355
+ cursor: pointer;
1356
+ }
1357
+ .wpcf-field-spinner .ui-spinner-button:hover {
1358
+ background-color: #e7e7e7;
1359
+ }
1360
+ .wpcf-field-spinner .ui-spinner-button:active {
1361
+ background-color: #ddd;
1362
+ }
1363
+ .wpcf-field-spinner .ui-spinner-button:before {
1364
+ font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome";
1365
+ font-weight: 900;
1366
+ font-size: 14px;
1367
+ line-height: 14px;
1368
+ }
1369
+ .wpcf-field-spinner .ui-spinner-down {
1370
+ order: 1;
1371
+ border-right: 0;
1372
+ border-radius: 4px 0 0 4px;
1373
+ }
1374
+ .wpcf-field-spinner .ui-spinner-down:before {
1375
+ content: "\f0d9";
1376
+ }
1377
+ .wpcf-field-spinner .ui-spinner-input {
1378
+ order: 2;
1379
+ }
1380
+ .wpcf-field-spinner .wpcf--unit {
1381
+ order: 3;
1382
+ border-left: 0;
1383
+ user-select: none;
1384
+ }
1385
+ .wpcf-field-spinner .ui-spinner-up {
1386
+ order: 4;
1387
+ border-left: 0;
1388
+ border-radius: 0 4px 4px 0;
1389
+ }
1390
+ .wpcf-field-spinner .ui-spinner-up:before {
1391
+ content: "\f0da";
1392
+ }
1393
+ .wpcf-field-spinner input {
1394
+ position: relative;
1395
+ z-index: 1;
1396
+ width: 50px;
1397
+ text-align: center;
1398
+ margin: 0;
1399
+ padding: 0 8px;
1400
+ border-radius: 0;
1401
+ }
1402
+ .wpcf-field-spinner .ui-button-text,
1403
+ .wpcf-field-spinner .ui-button-icon,
1404
+ .wpcf-field-spinner .ui-button-icon-space {
1405
+ display: none;
1406
+ }
1407
+
1408
+ /**
1409
+ * 03. 27. Field: switcher
1410
+ */
1411
+ .wpcf-field-switcher .wpcf--switcher {
1412
+ float: left;
1413
+ cursor: pointer;
1414
+ position: relative;
1415
+ width: 60px;
1416
+ height: 26px;
1417
+ padding: 0;
1418
+ margin: 0;
1419
+ overflow: hidden;
1420
+ border-radius: 4px;
1421
+ background-color: #ed6f6f;
1422
+ user-select: none;
1423
+ -webkit-user-select: none;
1424
+ }
1425
+ .wpcf-field-switcher .wpcf--ball {
1426
+ position: absolute;
1427
+ top: 4px;
1428
+ left: 4px;
1429
+ width: 24px;
1430
+ height: 18px;
1431
+ background-color: #fff;
1432
+ border-radius: 4px;
1433
+ transition: all 0.1s;
1434
+ box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15);
1435
+ }
1436
+ .wpcf-field-switcher .wpcf--on,
1437
+ .wpcf-field-switcher .wpcf--off {
1438
+ position: absolute;
1439
+ top: 0;
1440
+ left: 0;
1441
+ right: 0;
1442
+ font-size: 11px;
1443
+ line-height: 26px;
1444
+ font-weight: 500;
1445
+ font-style: normal;
1446
+ text-align: center;
1447
+ text-transform: uppercase;
1448
+ color: #fff;
1449
+ padding-right: 28px;
1450
+ opacity: 0;
1451
+ transition: all 0.1s;
1452
+ }
1453
+ .wpcf-field-switcher .wpcf--off {
1454
+ padding-right: 0;
1455
+ padding-left: 28px;
1456
+ opacity: 1;
1457
+ }
1458
+ .wpcf-field-switcher .wpcf--active {
1459
+ background: #4fb845;
1460
+ }
1461
+ .wpcf-field-switcher .wpcf--active .wpcf--on {
1462
+ opacity: 1;
1463
+ }
1464
+ .wpcf-field-switcher .wpcf--active .wpcf--off {
1465
+ opacity: 0;
1466
+ }
1467
+ .wpcf-field-switcher .wpcf--active .wpcf--ball {
1468
+ left: 100%;
1469
+ margin-left: -28px;
1470
+ }
1471
+ .wpcf-field-switcher .wpcf--label {
1472
+ float: left;
1473
+ margin-top: 4px;
1474
+ margin-left: 8px;
1475
+ font-weight: 400;
1476
+ color: #999;
1477
+ }
1478
+
1479
+ /**
1480
+ * 03. 29. Field: text
1481
+ */
1482
+ .wpcf-field-text input {
1483
+ width: 340px;
1484
+ margin: 0;
1485
+ min-height: 36px;
1486
+ float: left;
1487
+ }
1488
+
1489
+ /**
1490
+ * 03. 30. Field: textarea
1491
+ */
1492
+ .wpcf-field-textarea textarea {
1493
+ width: 100%;
1494
+ max-width: 100%;
1495
+ min-height: 125px;
1496
+ }
1497
+ .wpcf-field-textarea .wpcf-shortcode-button {
1498
+ margin-bottom: 10px;
1499
+ margin-right: 5px;
1500
+ }
1501
+
1502
+ /**
1503
+ * 03. 31. Field: typography
1504
+ */
1505
+ .wpcf-field-typography textarea,
1506
+ .wpcf-field-typography select {
1507
+ margin: 0;
1508
+ min-width: 100%;
1509
+ max-width: 100%;
1510
+ }
1511
+ .wpcf-field-typography .wpcf--title {
1512
+ color: #777;
1513
+ margin: 0 0 2px 0;
1514
+ font-size: 12px;
1515
+ }
1516
+ .wpcf-field-typography .wpcf--title small {
1517
+ vertical-align: top;
1518
+ }
1519
+ .wpcf-field-typography .wpcf--blocks {
1520
+ display: flex;
1521
+ flex-wrap: wrap;
1522
+
1523
+ }
1524
+ .wpcf-field-typography .wpcf--block.wpcf--block-font-color {
1525
+ overflow: hidden;
1526
+ float: left;
1527
+ }
1528
+ .wpcf-field-typography .wpcf--block {
1529
+ flex: 1;
1530
+ max-width: 100%;
1531
+ padding-right: 6px;
1532
+ padding-bottom: 6px;
1533
+ }
1534
+ .wpcf-field-typography .wpcf--input {
1535
+ margin: 0;
1536
+ min-width: 100%;
1537
+ }
1538
+ .wpcf-field-typography .wpcf--input-wrap {
1539
+ position: relative;
1540
+ }
1541
+ .wpcf-field-typography .wpcf--unit {
1542
+ position: absolute;
1543
+ z-index: 1;
1544
+ right: 4px;
1545
+ top: 4px;
1546
+ bottom: 4px;
1547
+ padding: 2px 6px;
1548
+ color: #666;
1549
+ font-size: 11px;
1550
+ line-height: 1;
1551
+ border-radius: 2px;
1552
+ background: #eee;
1553
+ user-select: none;
1554
+ display: flex;
1555
+ justify-content: center;
1556
+ flex-direction: column;
1557
+ }
1558
+ .wpcf-field-background .wpcf--preview,
1559
+ .wpcf-field-typography .wpcf--preview {
1560
+ font-size: 16px;
1561
+ line-height: 20px;
1562
+ padding: 20px;
1563
+ color: #222;
1564
+ border: 1px solid #eee;
1565
+ background-color: #fff;
1566
+ border-radius: 2.5px;
1567
+ user-select: none;
1568
+ -webkit-user-select: none;
1569
+ transition: background-color 0.2s, border-color 0.2s;
1570
+ }
1571
+ .wpcf-field-background .wpcf--block-preview,
1572
+ .wpcf-field-typography .wpcf--block-preview {
1573
+ cursor: pointer;
1574
+ position: relative;
1575
+ overflow: hidden;
1576
+ margin-top: 10px;
1577
+ width: 100%;
1578
+ }
1579
+ .wpcf-field-typography .wpcf--black-background {
1580
+ border-color: #000;
1581
+ background-color: #000;
1582
+ }
1583
+ .wpcf-field-typography .wpcf--toggle {
1584
+ position: absolute;
1585
+ top: 5px;
1586
+ right: 10px;
1587
+ color: #999;
1588
+ }
1589
+ .wpcf-field-typography .wpcf--block-extra-styles {
1590
+ margin-top: 5px;
1591
+ }
1592
+
1593
+
1594
+ /**
1595
+ * 03. 34. Field: heading
1596
+ */
1597
+ .wpcf-field-heading {
1598
+ font-size: 1.5em;
1599
+ font-weight: bold;
1600
+ color: #23282d;
1601
+ background-color: #f5f5f5;
1602
+ }
1603
+
1604
+ /**
1605
+ * 03. 35. Field: subheading
1606
+ */
1607
+ .wpcf-field-subheading {
1608
+ font-size: 14px;
1609
+ font-weight: bold;
1610
+ padding-top: 17px;
1611
+ padding-bottom: 17px;
1612
+ color: #23282d;
1613
+ background-color: #f7f7f7;
1614
+ }
1615
+
1616
+ /**
1617
+ * 03. 36. Field: submessage
1618
+ */
1619
+ .wpcf-field-submessage {
1620
+ padding: 0 !important;
1621
+ border: 0 !important;
1622
+ }
1623
+ .wpcf-field-submessage + .wpcf-field {
1624
+ border-top: 0 !important;
1625
+ }
1626
+
1627
+ .wpcf-submessage {
1628
+ font-size: 12px;
1629
+ padding: 17px 30px;
1630
+ border-top: 1px solid transparent;
1631
+ border-bottom: 1px solid transparent;
1632
+ }
1633
+
1634
+ .wpcf-submessage-success {
1635
+ color: #3c763d;
1636
+ border-color: #d6e9c6;
1637
+ background-color: #dff0d8;
1638
+ }
1639
+
1640
+ .wpcf-submessage-info {
1641
+ color: #31708f;
1642
+ border-color: #bce8f1;
1643
+ background-color: #d9edf7;
1644
+ }
1645
+
1646
+ .wpcf-submessage-warning {
1647
+ color: #8a6d3b;
1648
+ border-color: #faebcc;
1649
+ background-color: #fcf8e3;
1650
+ }
1651
+
1652
+ .wpcf-submessage-danger {
1653
+ color: #a94442;
1654
+ border-color: #ebccd1;
1655
+ background-color: #f2dede;
1656
+ }
1657
+
1658
+ .wpcf-submessage-normal {
1659
+ color: #23282d;
1660
+ border-color: #eee;
1661
+ background-color: #f7f7f7;
1662
+ }
1663
+
1664
+ /**
1665
+ * 03. 37. Field: notice
1666
+ */
1667
+ .wpcf-field-notice {
1668
+ background-color: transparent;
1669
+ }
1670
+
1671
+ .wpcf-notice {
1672
+ color: #999;
1673
+ font-style: italic;
1674
+ font-size: 13px;
1675
+ padding: 12px 12px 12px 0!important;
1676
+ border: none!important;
1677
+ }
1678
+
1679
+ .wpcf-notice-success {
1680
+ border-color: #46b450;
1681
+ }
1682
+
1683
+ .wpcf-notice-info {
1684
+ border-color: #339fd4;
1685
+ }
1686
+
1687
+ .wpcf-notice-warning {
1688
+ border-color: #ffbc00;
1689
+ }
1690
+
1691
+ .wpcf-notice-danger {
1692
+ border-color: #dc3232;
1693
+ }
1694
+
1695
+ .wpcf-notice-normal {
1696
+ border-color: #222;
1697
+ }
1698
+ .wpcf-field.wpcf-field-notice.pro_notice{
1699
+ padding-top: 0;
1700
+ }
1701
+
1702
+ /**
1703
+ * 03. 38. Field: number
1704
+ */
1705
+ .wpcf-field-number input {
1706
+ width: 70px;
1707
+ margin: 0;
1708
+ height: 36px;
1709
+ line-height: 34px;
1710
+ padding-left: 12px;
1711
+ min-height: 36px;
1712
+ }
1713
+ .wpcf-field-number .wpcf--wrap {
1714
+ position: relative;
1715
+ float: left;
1716
+ width: 100px;
1717
+ }
1718
+ .wpcf-field-number .wpcf--unit {
1719
+ position: absolute;
1720
+ z-index: 1;
1721
+ left: 75px;
1722
+ top: 4px;
1723
+ bottom: 4px;
1724
+ padding: 2px 6px;
1725
+ color: #666;
1726
+ font-size: 11px;
1727
+ line-height: 1;
1728
+ border-radius: 2px;
1729
+ background: #eee;
1730
+ user-select: none;
1731
+ display: flex;
1732
+ justify-content: center;
1733
+ flex-direction: column;
1734
+ }
1735
+
1736
+ /**
1737
+ * 03. 40. others
1738
+ */
1739
+
1740
+ .wpcf-help {
1741
+ position: static;
1742
+ cursor: help;
1743
+ /* top: 50%;
1744
+ transform: translateY(-50%);
1745
+ padding: 5px; */
1746
+ font-size: 14px;
1747
+ color: #aaa;
1748
+ width: 15px;
1749
+ line-height: 28px;
1750
+ padding-left: 5px;
1751
+ float: left;
1752
+ }
1753
+ .wpcf-help .wpcf-help-text {
1754
+ display: none;
1755
+ }
1756
+
1757
+ .wpcf--preview {
1758
+ max-width: 100%;
1759
+ }
1760
+
1761
+ .wpcf-image-preview {
1762
+ display: inline-flex;
1763
+ align-items: center;
1764
+ justify-content: center;
1765
+ flex-direction: column;
1766
+ position: relative;
1767
+ padding: 6px;
1768
+ max-width: 120px;
1769
+ max-height: 120px;
1770
+ min-width: 40px;
1771
+ min-height: 40px;
1772
+ margin-bottom: 10px;
1773
+ text-align: center;
1774
+ border-radius: 2px;
1775
+ border: 1px solid #ccc;
1776
+ background-color: #f9f9f9;
1777
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1778
+ }
1779
+ .wpcf-image-preview i {
1780
+ cursor: pointer;
1781
+ position: absolute;
1782
+ z-index: 1;
1783
+ right: 4px;
1784
+ top: 4px;
1785
+ font-size: 14px;
1786
+ width: 22px;
1787
+ height: 22px;
1788
+ line-height: 22px;
1789
+ text-align: center;
1790
+ text-decoration: none;
1791
+ color: #fff;
1792
+ background-color: #dd3333;
1793
+ opacity: 0.75;
1794
+ border-radius: 2px;
1795
+ transition: all 0.2s;
1796
+ }
1797
+ .wpcf-image-preview i:hover {
1798
+ opacity: 1;
1799
+ }
1800
+ .wpcf-image-preview i:focus {
1801
+ box-shadow: none;
1802
+ }
1803
+ .wpcf-image-preview span {
1804
+ position: relative;
1805
+ overflow: hidden;
1806
+ display: flex;
1807
+ height: 100%;
1808
+ width: 100%;
1809
+ }
1810
+ .wpcf-image-preview img {
1811
+ max-width: 100%;
1812
+ height: auto;
1813
+ object-fit: contain;
1814
+ }
1815
+
1816
+ .wpcf-field-custom .wpcf-field {
1817
+ padding: 0;
1818
+ }
1819
+
1820
+ .wpcf-field .chosen-container-single .chosen-single {
1821
+ height: 28px;
1822
+ line-height: 26px;
1823
+ }
1824
+ .wpcf-field .chosen-container-single .chosen-single abbr {
1825
+ top: 0;
1826
+ right: 20px;
1827
+ font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome";
1828
+ font-weight: 900;
1829
+ font-size: 12px;
1830
+ height: 100%;
1831
+ width: 18px;
1832
+ color: #aaa;
1833
+ text-align: center;
1834
+ background: none;
1835
+ }
1836
+ .wpcf-field .chosen-container-single .chosen-single abbr:before {
1837
+ content: "\f00d";
1838
+ }
1839
+ .wpcf-field .chosen-container-single .chosen-single abbr:hover {
1840
+ color: #555;
1841
+ }
1842
+ .wpcf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
1843
+ font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome";
1844
+ font-weight: 900;
1845
+ font-size: 12px;
1846
+ height: 100%;
1847
+ width: 18px;
1848
+ color: #aaa;
1849
+ text-align: center;
1850
+ background: none;
1851
+ }
1852
+ .wpcf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:before {
1853
+ content: "\f00d";
1854
+ display: inline-block;
1855
+ padding-top: 3px;
1856
+ }
1857
+ .wpcf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
1858
+ color: #555;
1859
+ }
1860
+ .wpcf-field .chosen-container-single .chosen-single div b {
1861
+ font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome";
1862
+ font-weight: 900;
1863
+ font-size: 14px;
1864
+ color: #aaa;
1865
+ background: none;
1866
+ }
1867
+ .wpcf-field .chosen-container-single .chosen-single div b:before {
1868
+ content: "\f107";
1869
+ }
1870
+ .wpcf-field .chosen-container-single .chosen-single div b:hover {
1871
+ color: #555;
1872
+ }
1873
+ .wpcf-field .chosen-container-multi .chosen-choices li.search-choice-placeholder {
1874
+ border: 1px dashed #aaa;
1875
+ margin: 3px 5px 3px 0;
1876
+ }
1877
+ .wpcf-field .chosen-container-multi .ui-sortable li.search-choice span {
1878
+ cursor: move;
1879
+ }
1880
+ .wpcf-field .chosen-container-active.chosen-with-drop .chosen-single div b:before {
1881
+ content: "\f106";
1882
+ }
1883
+ .wpcf-field .chosen-container-single .chosen-single-with-deselect span {
1884
+ margin-right: 40px;
1885
+ }
1886
+ .wpcf-field .chosen-container-single .chosen-search input[type="text"] {
1887
+ background: none;
1888
+ }
1889
+ .wpcf-field .chosen-container-single .chosen-search:before {
1890
+ font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome";
1891
+ font-weight: 900;
1892
+ font-size: 11px;
1893
+ content: "\f002";
1894
+ position: absolute;
1895
+ right: 12px;
1896
+ top: 10px;
1897
+ color: #aaa;
1898
+ }
1899
+ .wpcf-field .wp-picker-container {
1900
+ display: inline-block;
1901
+ }
1902
+ .wpcf-field .wp-picker-container .wp-color-result.button {
1903
+ margin-bottom: 0;
1904
+ }
1905
+ .wpcf-field .wpcf--transparent-wrap {
1906
+ display: none;
1907
+ position: relative;
1908
+ top: -1px;
1909
+ width: 235px;
1910
+ padding: 9px 10px;
1911
+ border: 1px solid #dfdfdf;
1912
+ border-top: none;
1913
+ background-color: #fff;
1914
+ }
1915
+ .wpcf-field .wp-picker-active .wpcf--transparent-wrap {
1916
+ display: block;
1917
+ }
1918
+ .wpcf-field .wpcf--transparent-slider {
1919
+ position: absolute;
1920
+ width: 190px;
1921
+ margin-left: 2px;
1922
+ height: 18px;
1923
+ }
1924
+ .wpcf-field .wpcf--transparent-slider .ui-slider-handle {
1925
+ position: absolute;
1926
+ top: -3px;
1927
+ bottom: -3px;
1928
+ z-index: 5;
1929
+ border-color: #aaa;
1930
+ border-style: solid;
1931
+ border-width: 4px 3px;
1932
+ width: 10px;
1933
+ height: 16px;
1934
+ margin: 0 -5px;
1935
+ background: none;
1936
+ cursor: ew-resize;
1937
+ opacity: 0.9;
1938
+ border-radius: 4px;
1939
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
1940
+ }
1941
+ .wpcf-field .wpcf--transparent-slider .ui-slider-handle:before {
1942
+ content: " ";
1943
+ position: absolute;
1944
+ left: -2px;
1945
+ right: -2px;
1946
+ top: -3px;
1947
+ bottom: -3px;
1948
+ border: 2px solid #fff;
1949
+ border-radius: 3px;
1950
+ }
1951
+ .wpcf-field .wpcf--transparent-offset {
1952
+ height: 18px;
1953
+ width: 200px;
1954
+ background: url(../images/checkerboard.png) repeat-y center left scroll #fff;
1955
+ border-radius: 2px;
1956
+ box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.4);
1957
+ }
1958
+ .wpcf-field .wpcf--transparent-text {
1959
+ position: absolute;
1960
+ top: 12px;
1961
+ right: 10px;
1962
+ width: 30px;
1963
+ font-size: 12px;
1964
+ line-height: 12px;
1965
+ text-align: center;
1966
+ color: #999;
1967
+ }
1968
+ .wpcf-field .wpcf--transparent-button {
1969
+ cursor: pointer;
1970
+ user-select: none;
1971
+ margin-top: 10px;
1972
+ font-size: 11px;
1973
+ text-align: center;
1974
+ border-radius: 2px;
1975
+ padding: 3px 7px;
1976
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
1977
+ letter-spacing: 0.2px;
1978
+ color: #777;
1979
+ border: 1px solid #ccc;
1980
+ background-color: #f7f7f7;
1981
+ transition: background-color 0.2s, border-color 0.2s, color 0.2s;
1982
+ }
1983
+ .wpcf-field .wpcf--transparent-active .wp-color-result {
1984
+ background-image: url(../images/checkerboard.png);
1985
+ background-size: 135px;
1986
+ background-position: center left;
1987
+ background-color: transparent !important;
1988
+ }
1989
+ .wpcf-field .wpcf--transparent-active .wpcf--transparent-button {
1990
+ color: #fff;
1991
+ border-color: #3ea032;
1992
+ background-color: #4fb845;
1993
+ }
1994
+ .wpcf-field .wpcf--transparent-active .fa:before {
1995
+ content: "\f205";
1996
+ }
1997
+
1998
+ /**
1999
+ * 08. Nav Menu
2000
+ */
2001
+ .wpcf-nav-menu-options {
2002
+ clear: both;
2003
+ float: left;
2004
+ width: 100%;
2005
+ }
2006
+ .wpcf-nav-menu-options > .wpcf-fields {
2007
+ margin-left: -10px;
2008
+ margin-top: 10px;
2009
+ margin-bottom: 10px;
2010
+ border-top: 1px solid #eee;
2011
+ border-bottom: 1px solid #eee;
2012
+ }
2013
+ .wpcf-nav-menu-options > .wpcf-fields > .wpcf-field {
2014
+ padding: 12px 14px 12px 12px;
2015
+ }
2016
+ .wpcf-nav-menu-options > .wpcf-fields > .wpcf-field .wpcf-title {
2017
+ float: none;
2018
+ width: 100%;
2019
+ margin-bottom: 5px;
2020
+ }
2021
+ .wpcf-nav-menu-options > .wpcf-fields > .wpcf-field .wpcf-fieldset {
2022
+ float: none;
2023
+ width: 100%;
2024
+ }
2025
+ .wpcf-nav-menu-options .wpcf-field-text input {
2026
+ width: 100%;
2027
+ }
2028
+ .wpcf-nav-menu-options .wpcf-field-notice .wpcf-notice {
2029
+ padding: 15px;
2030
+ }
2031
+
2032
+ .wpcf-nav-menu-title {
2033
+ padding: 12px 14px 12px 12px;
2034
+ background-color: #f5f5f5;
2035
+ border-top: 1px solid #eee;
2036
+ border-bottom: 1px solid #eee;
2037
+ }
2038
+ .wpcf-nav-menu-title:first-child {
2039
+ border-top: 0;
2040
+ }
2041
+ .wpcf-nav-menu-title h4 {
2042
+ margin: 0;
2043
+ padding: 0;
2044
+ color: #23282d;
2045
+ }
2046
+
2047
+ .wpcf-nav-menu-icon {
2048
+ margin-right: 5px;
2049
+ }
2050
+
2051
+ /**
2052
+ * 10. Helper
2053
+ */
2054
+ .wpcf-subtitle-text {
2055
+ margin-top: 6px;
2056
+ font-weight: 400;
2057
+ color: #999;
2058
+ font-style: italic;
2059
+ }
2060
+
2061
+ .wpcf-desc-text {
2062
+ clear: both;
2063
+ float: left;
2064
+ width: 100%;
2065
+ margin-top: 6px;
2066
+ font-weight: 400;
2067
+ color: #999;
2068
+ }
2069
+
2070
+ .wpcf-error-text {
2071
+ margin-top: 6px;
2072
+ color: #d02c21;
2073
+ }
2074
+
2075
+ .wpcf-before-text {
2076
+ margin-bottom: 6px;
2077
+ }
2078
+
2079
+ .wpcf-after-text {
2080
+ margin-top: 6px;
2081
+ }
2082
+
2083
+ .wpcf-metabox-hide {
2084
+ display: none !important;
2085
+ }
2086
+
2087
+ .wpcf-metabox-show {
2088
+ display: block !important;
2089
+ }
2090
+
2091
+ .wpcf-depend-hidden.wpcf-depend-on {
2092
+ display: none;
2093
+ }
2094
+
2095
+ .wpcf-depend-visible.wpcf-depend-on {
2096
+ display: block;
2097
+ opacity: 0.75;
2098
+ filter: grayscale(1);
2099
+ user-select: none;
2100
+ border-top: 1px solid #eee;
2101
+ }
2102
+ .wpcf-depend-visible.wpcf-depend-on .clear:before {
2103
+ content: "";
2104
+ left: 0;
2105
+ top: 0;
2106
+ right: 0;
2107
+ bottom: 0;
2108
+ position: absolute;
2109
+ background-color: #eee;
2110
+ opacity: 0.25;
2111
+ z-index: 10;
2112
+ }
2113
+
2114
+ .wpcf-warning-primary {
2115
+ color: #fff !important;
2116
+ border-color: #dc3545 !important;
2117
+ background: #dc3545 !important;
2118
+ }
2119
+ .wpcf-warning-primary:hover,
2120
+ .wpcf-warning-primary:focus {
2121
+ border-color: #bd2130 !important;
2122
+ background: #bd2130 !important;
2123
+ }
2124
+ .wpcf-warning-primary:focus {
2125
+ box-shadow: 0 0 0 1px #fff, 0 0 0 3px #bd2130 !important;
2126
+ }
2127
+ .wpcf-warning-primary:active {
2128
+ border-color: #bd2130 !important;
2129
+ background: #bd2130 !important;
2130
+ }
2131
+
2132
+ .wpcf-form-result {
2133
+ display: none;
2134
+ padding: 12px;
2135
+ margin: 0 0 15px 0;
2136
+ background-color: #fff;
2137
+ border-left: 4px solid #555;
2138
+ -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
2139
+ -webkit-box-shadow: 0 1px 1px rgb(0 0 0 / 10%);
2140
+ box-shadow: 0 1px 1px rgb(0 0 0 / 10%);
2141
+ }
2142
+
2143
+ .wpcf-form-show {
2144
+ display: block;
2145
+ }
2146
+
2147
+ .wpcf-form-success {
2148
+ /* color: #fff; */
2149
+ border-left-color: #46b450;
2150
+ }
2151
+
2152
+ .wpcf-form-warning {
2153
+ /* color: #8a6d3b; */
2154
+ border-left-color: #faebcc;
2155
+ }
2156
+
2157
+ .wpcf-label-error {
2158
+ position: relative;
2159
+ top: -2px;
2160
+ display: inline-block;
2161
+ font-size: 10px;
2162
+ line-height: 10px;
2163
+ height: 10px;
2164
+ width: 10px;
2165
+ padding: 1px;
2166
+ font-style: normal;
2167
+ text-align: center;
2168
+ color: #fff;
2169
+ vertical-align: middle;
2170
+ background-color: #e10000;
2171
+ border-radius: 2px;
2172
+ }
2173
+
2174
+ .wpcf-no-option {
2175
+ padding: 30px;
2176
+ }
2177
+
2178
+ .wpcf-field-spinner .wpcf-input-number {
2179
+ -moz-appearance: textfield;
2180
+ }
2181
+
2182
+ .wpcf-field-spinner .wpcf-input-number::-webkit-inner-spin-button,
2183
+ .wpcf-field-spinner .wpcf-input-number::-webkit-outer-spin-button {
2184
+ -webkit-appearance: none;
2185
+ margin: 0;
2186
+ }
2187
+
2188
+ .wpcf-fa5-shims .wpcf .fas,
2189
+ .wpcf-fa5-shims .wpcf .far,
2190
+ .wpcf-fa5-shims .wpcf .fab {
2191
+ font-family: "FontAwesome";
2192
+ font-style: normal;
2193
+ }
2194
+
2195
+ /**
2196
+ * 12. Responsive
2197
+ */
2198
+ @media only screen and (max-width: 1200px) {
2199
+ .wpcf-metabox .wpcf-field .wpcf-title {
2200
+ float: none;
2201
+ width: 100%;
2202
+ margin-bottom: 10px;
2203
+ }
2204
+ .wpcf-metabox .wpcf-field .wpcf-fieldset {
2205
+ float: none;
2206
+ width: 100%;
2207
+ }
2208
+ }
2209
+ @media only screen and (max-width: 782px) {
2210
+ .wpcf-header-inner {
2211
+ text-align: center;
2212
+ }
2213
+ .wpcf-header-inner h1 {
2214
+ width: 100%;
2215
+ margin-bottom: 10px;
2216
+ }
2217
+
2218
+ .wpcf-form-result {
2219
+ float: none;
2220
+ margin-right: 0;
2221
+ margin-bottom: 10px;
2222
+ }
2223
+
2224
+ .wpcf-search,
2225
+ .wpcf-header-right,
2226
+ .wpcf-header-left {
2227
+ width: 100%;
2228
+ }
2229
+
2230
+ .wpcf-search {
2231
+ text-align: center;
2232
+ margin-bottom: 15px;
2233
+ }
2234
+
2235
+ .wpcf-footer {
2236
+ text-align: center;
2237
+ }
2238
+
2239
+ .wpcf-buttons {
2240
+ float: none;
2241
+ }
2242
+
2243
+ .wpcf-copyright {
2244
+ float: none;
2245
+ margin-top: 10px;
2246
+ }
2247
+
2248
+ .wpcf-nav,
2249
+ .wpcf-expand-all,
2250
+ .wpcf-reset-section,
2251
+ .wpcf-nav-background {
2252
+ display: none !important;
2253
+ }
2254
+
2255
+ .wpcf-nav-normal + .wpcf-content {
2256
+ margin-left: 0;
2257
+ }
2258
+
2259
+ .wpcf-section-title,
2260
+ .wpcf-section {
2261
+ display: block !important;
2262
+ }
2263
+
2264
+ .wpcf-field .wpcf-title {
2265
+ float: none;
2266
+ width: 100%;
2267
+ margin-bottom: 10px;
2268
+ }
2269
+ .wpcf-field .wpcf-fieldset {
2270
+ float: none;
2271
+ width: 100%;
2272
+ }
2273
+
2274
+ .wpcf-field-color .button.wp-picker-clear {
2275
+ padding: 0 8px;
2276
+ line-height: 2.14285714;
2277
+ min-height: 32px;
2278
+ }
2279
+
2280
+ .wpcf-modal-inner {
2281
+ width: 350px;
2282
+ height: 400px;
2283
+ }
2284
+
2285
+ .wpcf-modal-content {
2286
+ height: 237px;
2287
+ }
2288
+
2289
+ .wpcf-icon-dialog .wpcf-modal-inner {
2290
+ width: 305px;
2291
+ height: 380px;
2292
+ }
2293
+ .wpcf-icon-dialog .wpcf-modal-content {
2294
+ height: 267px;
2295
+ }
2296
+
2297
+ .wpcf-modal-icon .wpcf-modal-inner {
2298
+ width: 330px;
2299
+ height: 385px;
2300
+ }
2301
+ .wpcf-modal-icon .wpcf-modal-content {
2302
+ height: 252px;
2303
+ }
2304
+
2305
+ .wpcf-profile-options > .wpcf-field > .wpcf-title,
2306
+ .wpcf-taxonomy-edit-fields > .wpcf-field > .wpcf-title {
2307
+ float: none;
2308
+ width: 100%;
2309
+ margin-bottom: 10px;
2310
+ }
2311
+ .wpcf-profile-options > .wpcf-field > .wpcf-fieldset,
2312
+ .wpcf-taxonomy-edit-fields > .wpcf-field > .wpcf-fieldset {
2313
+ float: none;
2314
+ width: 100%;
2315
+ }
2316
+
2317
+ .wpcf-nav-menu-options > .wpcf-fields {
2318
+ margin-left: -10px;
2319
+ margin-right: -10px;
2320
+ }
2321
+ .wpcf-nav-menu-options > .wpcf-fields > .wpcf-field {
2322
+ padding: 10px;
2323
+ }
2324
+ }
2325
+ /**
2326
+ * Chosen JS Styles
2327
+ */
2328
+ .chosen-container {
2329
+ position: relative;
2330
+ /* display: inline-block; */
2331
+ vertical-align: middle;
2332
+ font-size: 13px;
2333
+ user-select: none;
2334
+ max-width: 390px;
2335
+ float: left;
2336
+
2337
+ }
2338
+
2339
+ .chosen-container * {
2340
+ box-sizing: border-box;
2341
+ }
2342
+
2343
+ .chosen-container .chosen-drop {
2344
+ position: absolute;
2345
+ top: 100%;
2346
+ z-index: 1010;
2347
+ max-width: 390px;
2348
+ width: 100%;
2349
+ border: 1px solid #aaa;
2350
+ border-top: 0;
2351
+ background-color: #fff;
2352
+ box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
2353
+ clip: rect(0, 0, 0, 0);
2354
+ clip-path: inset(100% 100%);
2355
+ }
2356
+
2357
+ .chosen-container.chosen-with-drop .chosen-drop {
2358
+ clip: auto;
2359
+ clip-path: none;
2360
+ }
2361
+
2362
+ .chosen-container a {
2363
+ cursor: pointer;
2364
+ }
2365
+
2366
+ .chosen-container .search-choice .group-name,
2367
+ .chosen-container .chosen-single .group-name {
2368
+ margin-right: 4px;
2369
+ overflow: hidden;
2370
+ white-space: nowrap;
2371
+ text-overflow: ellipsis;
2372
+ font-weight: normal;
2373
+ color: #999999;
2374
+ }
2375
+
2376
+ .chosen-container .search-choice .group-name:after,
2377
+ .chosen-container .chosen-single .group-name:after {
2378
+ content: ":";
2379
+ padding-left: 2px;
2380
+ vertical-align: top;
2381
+ }
2382
+
2383
+ .chosen-container-single .chosen-single {
2384
+ position: relative;
2385
+ display: block;
2386
+ overflow: hidden;
2387
+ padding: 0 0 0 8px;
2388
+ height: 25px;
2389
+ border: 1px solid #aaa;
2390
+ border-radius: 5px;
2391
+ background-color: #fff;
2392
+ background: linear-gradient(#fff 20%, #f6f6f6 50%, #eee 52%, #f4f4f4 100%);
2393
+ background-clip: padding-box;
2394
+ box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(0, 0, 0, 0.1);
2395
+ color: #444;
2396
+ text-decoration: none;
2397
+ white-space: nowrap;
2398
+ line-height: 24px;
2399
+ }
2400
+
2401
+ .chosen-container-single .chosen-default {
2402
+ color: #999;
2403
+ }
2404
+
2405
+ .chosen-container-single .chosen-single span {
2406
+ display: block;
2407
+ overflow: hidden;
2408
+ margin-right: 26px;
2409
+ text-overflow: ellipsis;
2410
+ white-space: nowrap;
2411
+ }
2412
+
2413
+ .chosen-container-single .chosen-single-with-deselect span {
2414
+ margin-right: 38px;
2415
+ }
2416
+
2417
+ .chosen-container-single .chosen-single abbr {
2418
+ position: absolute;
2419
+ top: 6px;
2420
+ right: 26px;
2421
+ display: block;
2422
+ width: 12px;
2423
+ height: 12px;
2424
+ font-size: 1px;
2425
+ }
2426
+
2427
+ .chosen-container-single .chosen-single div {
2428
+ position: absolute;
2429
+ top: 0;
2430
+ right: 0;
2431
+ display: block;
2432
+ width: 18px;
2433
+ height: 100%;
2434
+ }
2435
+
2436
+ .chosen-container-single .chosen-single div b {
2437
+ display: block;
2438
+ width: 100%;
2439
+ height: 100%;
2440
+ }
2441
+
2442
+ .chosen-container-single .chosen-search {
2443
+ position: relative;
2444
+ z-index: 1010;
2445
+ margin: 0;
2446
+ padding: 3px 4px;
2447
+ white-space: nowrap;
2448
+ }
2449
+
2450
+ .chosen-container-single .chosen-search input[type="text"] {
2451
+ margin: 1px 0;
2452
+ padding: 4px 20px 4px 5px;
2453
+ width: 100%;
2454
+ height: auto;
2455
+ outline: 0;
2456
+ border: 1px solid #aaa;
2457
+ font-size: 1em;
2458
+ font-family: sans-serif;
2459
+ line-height: normal;
2460
+ border-radius: 0;
2461
+ }
2462
+
2463
+ .chosen-container-single .chosen-drop {
2464
+ margin-top: -1px;
2465
+ border-radius: 0 0 4px 4px;
2466
+ background-clip: padding-box;
2467
+ }
2468
+
2469
+ .chosen-container-single.chosen-container-single-nosearch .chosen-search {
2470
+ position: absolute;
2471
+ clip: rect(0, 0, 0, 0);
2472
+ clip-path: inset(100% 100%);
2473
+ }
2474
+
2475
+ .chosen-container .chosen-results {
2476
+ color: #444;
2477
+ position: relative;
2478
+ overflow-x: hidden;
2479
+ overflow-y: auto;
2480
+ margin: 0 4px 4px 0;
2481
+ padding: 0 0 0 4px;
2482
+ max-height: 240px;
2483
+ -webkit-overflow-scrolling: touch;
2484
+ }
2485
+
2486
+ .chosen-container .chosen-results li {
2487
+ display: none;
2488
+ margin: 0;
2489
+ padding: 5px 6px;
2490
+ list-style: none;
2491
+ line-height: 15px;
2492
+ word-wrap: break-word;
2493
+ -webkit-touch-callout: none;
2494
+ }
2495
+
2496
+ .chosen-container .chosen-results li.active-result {
2497
+ display: list-item;
2498
+ cursor: pointer;
2499
+ }
2500
+
2501
+ .chosen-container .chosen-results li.disabled-result {
2502
+ display: list-item;
2503
+ color: #ccc;
2504
+ cursor: default;
2505
+ }
2506
+
2507
+ .chosen-container .chosen-results li.highlighted {
2508
+ background-color: #3875d7;
2509
+ background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
2510
+ color: #fff;
2511
+ }
2512
+
2513
+ .chosen-container .chosen-results li.no-results {
2514
+ color: #777;
2515
+ display: list-item;
2516
+ background: #f4f4f4;
2517
+ }
2518
+
2519
+ .chosen-container .chosen-results li.group-result {
2520
+ display: list-item;
2521
+ font-weight: bold;
2522
+ cursor: default;
2523
+ }
2524
+
2525
+ .chosen-container .chosen-results li.group-option {
2526
+ padding-left: 15px;
2527
+ }
2528
+
2529
+ .chosen-container .chosen-results li em {
2530
+ font-style: normal;
2531
+ text-decoration: underline;
2532
+ }
2533
+
2534
+ .chosen-container-multi .chosen-choices {
2535
+ position: relative;
2536
+ overflow: hidden;
2537
+ margin: 0;
2538
+ padding: 0 5px;
2539
+ max-width: 390px;
2540
+ width: 100%;
2541
+ height: auto;
2542
+ border: 1px solid #aaa;
2543
+ background-color: #fff;
2544
+ background-image: linear-gradient(#eee 1%, #fff 15%);
2545
+ cursor: text;
2546
+ }
2547
+
2548
+ .chosen-container-multi .chosen-choices li {
2549
+ float: left;
2550
+ list-style: none;
2551
+ }
2552
+
2553
+ .chosen-container-multi .chosen-choices li.search-field {
2554
+ margin: 0;
2555
+ padding: 0;
2556
+ white-space: nowrap;
2557
+ }
2558
+
2559
+ .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
2560
+ margin: 1px 0;
2561
+ padding: 0;
2562
+ outline: 0;
2563
+ border: 0 !important;
2564
+ background: transparent !important;
2565
+ box-shadow: none;
2566
+ color: #999;
2567
+ font-size: 100%;
2568
+ font-family: sans-serif;
2569
+ line-height: normal;
2570
+ border-radius: 0;
2571
+ width: 25px;
2572
+ height: 25px;
2573
+ min-height: 25px;
2574
+ }
2575
+
2576
+ .chosen-container-multi .chosen-choices li.search-choice {
2577
+ position: relative;
2578
+ margin: 3px 5px 3px 0;
2579
+ padding: 3px 20px 3px 6px;
2580
+ border: 1px solid #aaa;
2581
+ max-width: 100%;
2582
+ border-radius: 3px;
2583
+ background-color: #eeeeee;
2584
+ background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
2585
+ background-size: 100% 19px;
2586
+ background-repeat: repeat-x;
2587
+ background-clip: padding-box;
2588
+ box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
2589
+ color: #333;
2590
+ line-height: 13px;
2591
+ cursor: default;
2592
+ }
2593
+
2594
+ .chosen-container-multi .chosen-choices li.search-choice span {
2595
+ word-wrap: break-word;
2596
+ white-space: nowrap;
2597
+ }
2598
+
2599
+ .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
2600
+ position: absolute;
2601
+ top: 0;
2602
+ right: 0;
2603
+ display: block;
2604
+ width: 12px;
2605
+ height: 12px;
2606
+ font-size: 1px;
2607
+ }
2608
+
2609
+ .chosen-container-multi .chosen-choices li.search-choice-disabled {
2610
+ padding-right: 5px;
2611
+ border: 1px solid #ccc;
2612
+ background-color: #e4e4e4;
2613
+ background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
2614
+ color: #666;
2615
+ }
2616
+
2617
+ .chosen-container-multi .chosen-choices li.search-choice-focus {
2618
+ background: #d4d4d4;
2619
+ }
2620
+
2621
+ .chosen-container-multi .chosen-results {
2622
+ margin: 0;
2623
+ padding: 0;
2624
+ }
2625
+
2626
+ .chosen-container-multi .chosen-drop .result-selected {
2627
+ /* display: list-item; */
2628
+ color: #ccc;
2629
+ cursor: default;
2630
+ }
2631
+
2632
+ .chosen-container-active .chosen-single {
2633
+ border: 1px solid #5897fb;
2634
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
2635
+ }
2636
+
2637
+ .chosen-container-active.chosen-with-drop .chosen-single {
2638
+ border: 1px solid #aaa;
2639
+ border-bottom-right-radius: 0;
2640
+ border-bottom-left-radius: 0;
2641
+ background-image: linear-gradient(#eee 20%, #fff 80%);
2642
+ box-shadow: 0 1px 0 #fff inset;
2643
+ }
2644
+
2645
+ .chosen-container-active.chosen-with-drop .chosen-single div {
2646
+ border-left: none;
2647
+ background: transparent;
2648
+ }
2649
+
2650
+ .chosen-container-active .chosen-choices {
2651
+ border: 1px solid #5897fb;
2652
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
2653
+ }
2654
+
2655
+ .chosen-container-active .chosen-choices li.search-field input[type="text"] {
2656
+ color: #222 !important;
2657
+ }
2658
+
2659
+ .chosen-disabled {
2660
+ opacity: 0.5 !important;
2661
+ cursor: default;
2662
+ }
2663
+
2664
+ .chosen-disabled .chosen-single {
2665
+ cursor: default;
2666
+ }
2667
+
2668
+ .chosen-disabled .chosen-choices .search-choice .search-choice-close {
2669
+ cursor: default;
2670
+ }
2671
+
2672
+ .chosen-rtl {
2673
+ text-align: right;
2674
+ }
2675
+
2676
+ .chosen-rtl .chosen-single {
2677
+ overflow: visible;
2678
+ padding: 0 8px 0 0;
2679
+ }
2680
+
2681
+ .chosen-rtl .chosen-single span {
2682
+ margin-right: 0;
2683
+ margin-left: 26px;
2684
+ direction: rtl;
2685
+ }
2686
+
2687
+ .chosen-rtl .chosen-single-with-deselect span {
2688
+ margin-left: 38px;
2689
+ }
2690
+
2691
+ .chosen-rtl .chosen-single div {
2692
+ right: auto;
2693
+ left: 3px;
2694
+ }
2695
+
2696
+ .chosen-rtl .chosen-single abbr {
2697
+ right: auto;
2698
+ left: 26px;
2699
+ }
2700
+
2701
+ .chosen-rtl .chosen-choices li {
2702
+ float: right;
2703
+ }
2704
+
2705
+ .chosen-rtl .chosen-choices li.search-field input[type="text"] {
2706
+ direction: rtl;
2707
+ }
2708
+
2709
+ .chosen-rtl .chosen-choices li.search-choice {
2710
+ margin: 3px 5px 3px 0;
2711
+ padding: 3px 5px 3px 19px;
2712
+ }
2713
+
2714
+ .chosen-rtl .chosen-choices li.search-choice .search-choice-close {
2715
+ right: auto;
2716
+ left: 4px;
2717
+ }
2718
+
2719
+ .chosen-rtl.chosen-container-single .chosen-results {
2720
+ margin: 0 0 4px 4px;
2721
+ padding: 0 4px 0 0;
2722
+ }
2723
+
2724
+ .chosen-rtl .chosen-results li.group-option {
2725
+ padding-right: 15px;
2726
+ padding-left: 0;
2727
+ }
2728
+
2729
+ .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
2730
+ border-right: none;
2731
+ }
2732
+
2733
+ .chosen-rtl .chosen-search input[type="text"] {
2734
+ padding: 4px 5px 4px 20px;
2735
+ direction: rtl;
2736
+ }
2737
+
2738
+ /*--------------------------------------------------------
2739
+ SP_TP_Framework
2740
+ --------------------------------------------------------*/
2741
+ .text-center {
2742
+ text-align: center;
2743
+ }
2744
+ .sp-after-text {
2745
+ padding-left: 5px;
2746
+ }
2747
+ /* .wpcf.wpcf-options .wpcf-content {
2748
+ margin-left: 0;
2749
+ } */
2750
+ .sp-wqvpro-framework .wpcf-nav-inline.wpcf-nav {
2751
+ position: inherit;
2752
+ float: none;
2753
+ width: 100%;
2754
+ background: #f1f1f1;
2755
+ -webkit-box-shadow: inset 3px -1px 1px -1px rgba(0, 0, 0, 0.04);
2756
+ -moz-box-shadow: inset 3px -1px 1px -1px rgba(0, 0, 0, 0.04);
2757
+ box-shadow: inset 3px -1px 1px -1px rgba(0, 0, 0, 0.04);
2758
+ }
2759
+ .wpcf-theme-light .wpcf-nav-inline {
2760
+ border-bottom: 0;
2761
+ }
2762
+
2763
+ .wpcf.wpcf-options .wpcf-nav ul li {
2764
+ margin-bottom: -1px;
2765
+ /* display: inline-block; */
2766
+ }
2767
+
2768
+ .wpcf.wpcf-options .wpcf-nav-background {
2769
+ width: 235px;
2770
+ background-color: #e3e3e3;
2771
+ }
2772
+
2773
+ .wpcf.wpcf-options .wpcf-nav ul li a {
2774
+ /* background-color: #994294;
2775
+ border-top: 1px solid #994294; */
2776
+ font-size: 13px;
2777
+ padding: 16px 15px;
2778
+ line-height: 1.4;
2779
+ border-bottom: 2px solid #cecece;
2780
+ color: #ffffff;
2781
+ /* border-right: 1px solid #e2e2e1; */
2782
+ text-transform: uppercase;
2783
+ font-weight: 600;
2784
+ margin-bottom: -1px;
2785
+ }
2786
+
2787
+ .wpcf.wpcf-options .wpcf-nav ul li.wpcf-tab-expanded a {
2788
+ color: #000;
2789
+ }
2790
+
2791
+ .wpcf.wpcf-options .wpcf-nav ul li.wpcf-tab-expanded a i {
2792
+ color: #4498be;
2793
+ }
2794
+
2795
+ .wpcf.wpcf-options .wpcf-nav ul li :after {
2796
+ display: none;
2797
+ }
2798
+
2799
+ /* .sp-element {
2800
+ padding: 22px 30px;
2801
+ border-bottom: 1px solid rgba(238, 238, 238, 0.1);
2802
+ }
2803
+
2804
+ .sp-element:hover {
2805
+ background-color: transparent;
2806
+ }
2807
+
2808
+ .sp-element .sp-field-number input {
2809
+ margin-right: 5px;
2810
+ } */
2811
+
2812
+ /*
2813
+ ButtonSet field.
2814
+ */
2815
+ .sp-field-button-set label input {
2816
+ display: none;
2817
+ }
2818
+ .sp-field-button-set label span {
2819
+ background: linear-gradient(to bottom, white, #eeeeee);
2820
+ padding: 9px 17px;
2821
+ margin: 0;
2822
+ vertical-align: middle;
2823
+ border: solid 1px #ccc;
2824
+ border-radius: 0;
2825
+ cursor: pointer;
2826
+ border-right: none;
2827
+ }
2828
+ .sp-field-button-set label input ~ span:hover {
2829
+ background: #fff;
2830
+ }
2831
+ .sp-field-button-set label:first-child span {
2832
+ border-radius: 4px 0 0 4px;
2833
+ }
2834
+ .sp-field-button-set label:last-child span {
2835
+ border-radius: 0 4px 4px 0;
2836
+ border-right: solid 1px #ccc;
2837
+ }
2838
+ .sp-field-button-set label input:checked ~ span {
2839
+ background: linear-gradient(to bottom, #51ccfb, #058cbf);
2840
+ color: #fff;
2841
+ cursor: default;
2842
+ box-shadow: none;
2843
+ }
2844
+
2845
+ /**
2846
+ Slider Field
2847
+ */
2848
+ .wpcf-field-slider input {
2849
+ display: inline-block;
2850
+ width: 42px;
2851
+ background: #fff;
2852
+ }
2853
+ .wpcf-field-slider input[type="slider"]:before {
2854
+ width: 35px;
2855
+ height: 35px;
2856
+ display: block;
2857
+ background: red;
2858
+ content: "%";
2859
+ position: absolute;
2860
+ right: 0;
2861
+ top: 0;
2862
+ float: right;
2863
+ margin-right: -20px;
2864
+ color: #fff;
2865
+ }
2866
+
2867
+ .wpcf--wrap {
2868
+ display: inline-block;
2869
+ margin: 0 20px 0 0;
2870
+ width: 50%;
2871
+ vertical-align: super;
2872
+ }
2873
+
2874
+ .wpcf-field-slider .ui-slider {
2875
+ position: relative;
2876
+ width: 100%;
2877
+ height: 8px;
2878
+ background: #f8f8f8;
2879
+ border: 1px solid #e2e2e2;
2880
+ border-radius: 2px;
2881
+ }
2882
+
2883
+ .wpcf-field-slider .ui-slider-range {
2884
+ background: #dddddd;
2885
+ height: 8px;
2886
+ }
2887
+
2888
+ .wpcf-field-slider .ui-slider-handle {
2889
+ height: 16px;
2890
+ width: 16px;
2891
+ background: #22aade;
2892
+ position: absolute;
2893
+ top: -4px;
2894
+ border-radius: 2px;
2895
+ cursor: pointer;
2896
+ }
2897
+
2898
+ @media (min-width: 1400px) {
2899
+ .wpcf.wpcf-options .wpcf--wrap,
2900
+ .sp-metabox-framework .wpcf--wrap {
2901
+ width: 35%;
2902
+ }
2903
+ }
2904
+
2905
+ /* Help Page */
2906
+ div.sp-wqvpro-help .feature-section .sp-wqvpro-feature {
2907
+ background-color: #fff;
2908
+ padding: 20px 20px;
2909
+ border: 1px solid #ddd;
2910
+ }
2911
+ div.sp-wqvpro-help .feature-section .sp-wqvpro-feature h3 {
2912
+ font-size: 16px;
2913
+ margin-top: 18px;
2914
+ }
2915
+
2916
+ div.sp-wqvpro-help .feature-section i.sp-font {
2917
+ font-size: 30px;
2918
+ display: block;
2919
+ color: #994294;
2920
+ }
2921
+
2922
+ div.sp-wqvpro-help.about-wrap h1 {
2923
+ font-size: 2.6em;
2924
+ }
2925
+
2926
+ div.sp-wqvpro-help .headline-feature.feature-video iframe {
2927
+ position: absolute;
2928
+ top: 0;
2929
+ left: 0;
2930
+ width: 100%;
2931
+ height: 100%;
2932
+ }
2933
+
2934
+ /* div.sp-wqvpro-help.about-wrap .wp-badge {
2935
+ background: url(../images/logo.png);
2936
+ background-repeat: no-repeat;
2937
+ box-shadow: none;
2938
+ background-position: top right;
2939
+ } */
2940
+
2941
+ /*
2942
+ More Plugins
2943
+ */
2944
+ .about-wrap .plugin-section .three-col .col {
2945
+ background: #ffffff;
2946
+ }
2947
+ .about-wrap .plugin-section .three-col .col .sp-wqvpro-plugin {
2948
+ border: 1px solid #ddd;
2949
+ }
2950
+ .about-wrap .plugin-section .three-col .col .sp-wqvpro-plugin .sp-wqvpro-plugin-content {
2951
+ padding-left: 20px;
2952
+ padding-right: 20px;
2953
+ padding-bottom: 20px;
2954
+ }
2955
+ .about-wrap .plugin-section .three-col .col .sp-wqvpro-plugin .sp-wqvpro-plugin-content h3 {
2956
+ margin-top: 20px;
2957
+ margin-bottom: 8px;
2958
+ font-weight: 500;
2959
+ }
2960
+
2961
+ .about-wrap .plugin-section .three-col .col .sp-wqvpro-plugin .sp-wqvpro-plugin-content p {
2962
+ margin-top: 0;
2963
+ }
2964
+
2965
+ .about-wrap .plugin-section .sp-plugin-section-title h2 {
2966
+ font-size: 2.2em;
2967
+ color: #32373c;
2968
+ font-weight: 400;
2969
+ }
2970
+
2971
+ .about-wrap .plugin-section .sp-plugin-section-title h4 {
2972
+ font-weight: 400;
2973
+ text-align: center;
2974
+ font-size: 18px;
2975
+ color: #555d66;
2976
+ margin-top: 15px;
2977
+ margin-bottom: 40px;
2978
+ }
2979
+
2980
+ /**
2981
+ Advanced Typography Field*/
2982
+ .sp-divider {
2983
+ width: 100%;
2984
+ display: block;
2985
+ height: 10px;
2986
+ }
2987
+
2988
+ .wpcf.wpcf-options .sp-font-preview {
2989
+ width: 45%;
2990
+ padding: 10px;
2991
+ border: 1px solid #e6e6e6;
2992
+ color: #7b7b7b;
2993
+ margin-top: 20px;
2994
+ background-color: #fff;
2995
+ font-size: 16px;
2996
+ }
2997
+ .wpcf_margin_field .sp-font-left,
2998
+ .wpcf_margin_field .sp-font-top,
2999
+ .wpcf_margin_field .sp-font-bottom,
3000
+ .wpcf_margin_field .sp-font-right {
3001
+ margin-right: 30px;
3002
+ }
3003
+ .wpcf_margin_field .sp-font-left:before,
3004
+ .wpcf_margin_field .sp-font-top:before,
3005
+ .wpcf_margin_field .sp-font-bottom:before,
3006
+ .wpcf_margin_field .sp-font-right:before {
3007
+ content: "px";
3008
+ position: absolute;
3009
+ top: 19px;
3010
+ right: -20px;
3011
+ height: 34px;
3012
+ width: 29px;
3013
+ line-height: 34px;
3014
+ text-align: center;
3015
+ background-color: #f5f5f5;
3016
+ display: block;
3017
+ border: 1px solid #ddd;
3018
+ border-left: none;
3019
+ }
3020
+
3021
+ .wpcf.wpcf-options .sp-content .sp-section-title {
3022
+ background-color: #994294;
3023
+ }
3024
+
3025
+ /* Carousel Type */
3026
+
3027
+ .wpcf-field-carousel_type .wpcf--image {
3028
+ cursor: pointer;
3029
+ position: relative;
3030
+ display: inline-block;
3031
+ max-width: 100%;
3032
+ margin: 0 5px 5px 0;
3033
+ vertical-align: bottom;
3034
+ border: 2px solid transparent;
3035
+ background-color: #fff;
3036
+ user-select: none;
3037
+ -webkit-user-select: none;
3038
+ -moz-transition: all 0.2s;
3039
+ -o-transition: all 0.2s;
3040
+ -webkit-transition: all 0.2s;
3041
+ transition: all 0.2s;
3042
+ }
3043
+
3044
+ .wpcf-field-image_select .wpcf--image:before {
3045
+ position: absolute;
3046
+ top: 0;
3047
+ left: 0;
3048
+ text-align: center;
3049
+ font-size: 11px;
3050
+ font-family: FontAwesome;
3051
+ content: "\f00c";
3052
+ width: 15px;
3053
+ height: 15px;
3054
+ line-height: 15px;
3055
+ opacity: 0;
3056
+ color: #fff;
3057
+ background-color: #1ea4b0;
3058
+ transition: opacity 0.2s;
3059
+ }
3060
+
3061
+ /* .wpcf-field-image_select .wpcf--active {
3062
+ border-color: #1EA4B0;
3063
+ box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
3064
+ } */
3065
+
3066
+ .wpcf-field-image_select img {
3067
+ vertical-align: top;
3068
+ }
3069
+
3070
+ .wpcf-field-image_select input,
3071
+ .wpcf-field-carousel_type input {
3072
+ display: none;
3073
+ }
3074
+
3075
+ .wpcf-field-carousel_type .wpcf--image {
3076
+ background: #e8ecef;
3077
+ color: #7b8898;
3078
+ border: solid 3px #e8ecef;
3079
+ border-radius: 2px;
3080
+ cursor: pointer;
3081
+ text-align: center;
3082
+ width: 120px;
3083
+ height: 80px;
3084
+ box-shadow: inset 0 0 0px 3px #fff;
3085
+ }
3086
+
3087
+ .wpcf-field-carousel_type i {
3088
+ font-size: 30px;
3089
+ width: 32px;
3090
+ height: 30px;
3091
+ margin-top: 15px;
3092
+ }
3093
+
3094
+ .wpcf-field-carousel_type p {
3095
+ margin-top: 5px;
3096
+ font-weight: 500;
3097
+ }
3098
+
3099
+ .wpcf-field-carousel_type .wpcf--image.wpcf--active {
3100
+ border-color: #1ea4b0;
3101
+ }
3102
+
3103
+ /* Settings */
3104
+
3105
+ .wpcf.wpcf-options .sp-field-sorter .sp-modules {
3106
+ width: 100%;
3107
+ }
3108
+ /* .wpcf.wpcf-options .wpcf-header-inner input {
3109
+ text-shadow: 0 0 0;
3110
+ border: 0;
3111
+ border-radius: 0;
3112
+ padding: 3px 15px;
3113
+ height: auto;
3114
+ -webkit-transition: all 0.4s;
3115
+ -moz-transition: all 0.4s;
3116
+ -ms-transition: all 0.4s;
3117
+ -o-transition: all 0.4s;
3118
+ transition: all 0.4s;
3119
+ } */
3120
+ .wpcf.wpcf-options .wpcf-header-inner input {
3121
+ text-shadow: 0 0 0;
3122
+ border: 0;
3123
+ border-radius: 0;
3124
+ height: 38px;
3125
+ border-radius: 4px;
3126
+ padding: 0px 16px;
3127
+ font-size: 13px;
3128
+ margin-left: 8px;
3129
+ text-transform: uppercase;
3130
+ -webkit-transition: all 0.4s;
3131
+ -moz-transition: all 0.4s;
3132
+ -ms-transition: all 0.4s;
3133
+ -o-transition: all 0.4s;
3134
+ transition: all 0.4s;
3135
+ }
3136
+ .wpcf.wpcf-options .wpcf-header-inner input.button-primary {
3137
+ /* box-shadow: 0 3px 0 #369ec7; */
3138
+ background-color: #02cc7b;
3139
+ color: #ffffff;
3140
+ }
3141
+ .wpcf.wpcf-options .wpcf-header-inner input.button-primary:hover {
3142
+ /* box-shadow: 0 3px 0 #1784af; */
3143
+ background-color: #02bb71;
3144
+ }
3145
+ .wpcf.wpcf-options .wpcf-header-inner input.wpcf-reset-section {
3146
+ /* box-shadow: 0 3px 0 #666666; */
3147
+ background-color: #77777c;
3148
+ color: #ffffff;
3149
+ margin-left: 8px;
3150
+ }
3151
+ .wpcf.wpcf-options .wpcf-header-inner input.wpcf-reset-section:hover {
3152
+ /* box-shadow: 0 3px 0 #4a4949; */
3153
+ background-color: #616169;
3154
+ color: #ffffff;
3155
+ }
3156
+
3157
+ .wpcf.wpcf-options .wpcf-nav ul li a {
3158
+ background: #efefef;
3159
+ color: #000;
3160
+ border-bottom: 2px solid #cecece;
3161
+ padding: 15px 15px;
3162
+ border-right: 0;
3163
+ border-top: 1px solid transparent;
3164
+ border-right: 1px solid #cecece;
3165
+ }
3166
+ .wpcf.wpcf-options .wpcf-nav ul li:last-child a {
3167
+ border-bottom: 1px solid #cecece;
3168
+ }
3169
+ .wpcf.wpcf-options .wpcf-nav ul li.wpcf-tab-expanded a {
3170
+ /* box-shadow: 0 3px 0 0 #4498be inset; */
3171
+ background-color: #ffffff;
3172
+ /* color: #4498be; */
3173
+ background-color: #fff;
3174
+ border-right: 1px solid #fff;
3175
+ /* border-bottom: 1px solid #cecece; */
3176
+ border-top: 1px solid #fff;
3177
+ box-shadow: 3px 0 0 0 #178087 inset;
3178
+ }
3179
+ .wpcf.wpcf-options .wpcf-nav ul ul:before {
3180
+ background-color: transparent;
3181
+ }
3182
+ .wpcf.wpcf-options .wpcf-nav ul ul {
3183
+ border-bottom: 1px solid #cecece;
3184
+ }
3185
+ .wpcf.wpcf-options .wpcf-nav ul ul li a {
3186
+ background-color: #f8fdff;
3187
+ padding: 13px 15px 13px 24px;
3188
+ }
3189
+
3190
+ @media only screen and (max-width: 782px) {
3191
+ .wpcf.wpcf-options .wpcf-header-inner h1 {
3192
+ float: none;
3193
+ }
3194
+ }
3195
+
3196
+ /* Extra CSS */
3197
+
3198
+ #wpcf_shortcode_options {
3199
+ border-top-color: #f1f1f1;
3200
+ }
3201
+
3202
+ #wpcf_shortcode_options .wpcf-nav ul li {
3203
+ margin-bottom: -1px;
3204
+ }
3205
+
3206
+ #wpcf_shortcode_options .wpcf-nav.wpcf-nav-metabox {
3207
+ border-right-color: #f1f1f1;
3208
+ border-right-color: #f1f1f1;
3209
+ background: #f1f1f1;
3210
+ margin-right: -2px;
3211
+ }
3212
+
3213
+ #wpcf_shortcode_options .wpcf-content {
3214
+ border-top: 1px solid #e5e5e5;
3215
+ box-shadow: 0 -1px 1px rgba(0, 0, 0, 0.04);
3216
+ }
3217
+
3218
+ .wpcf-field.wpcf-field-carousel_type {
3219
+ padding-bottom: 0;
3220
+ }
3221
+
3222
+ #sp_wpcp_upload_options .wpcf-field-carousel_type .wpcf-title,
3223
+ #sp_wpcp_upload_options .wpcf-field-gallery .wpcf-title,
3224
+ .wpcf_carousel_content_wrapper .wpcf-title,
3225
+ .wpcf-video-description .wpcf-title,
3226
+ .wpcf_carousel_content_bg .wpcf-title,
3227
+ .wpcf-video-field-wrapper > .wpcf-title {
3228
+ width: 100%;
3229
+ }
3230
+ .wpcf_carousel_content_bg .wpcf-fieldset,
3231
+ #sp_wpcp_upload_options .wpcf-field-carousel_type .wpcf-fieldset,
3232
+ #sp_wpcp_upload_options .wpcf-field-gallery .wpcf-fieldset,
3233
+ .wpcf_carousel_content_wrapper .wpcf-fieldset,
3234
+ .wpcf-video-description .wpcf-fieldset,
3235
+ .wpcf-video-field-wrapper > .wpcf-fieldset {
3236
+ margin-top: 30px;
3237
+ margin-left: 0;
3238
+ float: none;
3239
+ width: auto;
3240
+ }
3241
+ .wpcf-field.wpcf-field-switcher .wpcf-fieldset,
3242
+ .wpcf-field.wpcf-field-select.wpcf_taxonomy_terms .wpcf-fieldset,
3243
+ .wpcf-field.wpcf-field-select.wpcf_taxonomy_operator .wpcf-fieldset,
3244
+ .wpcf-field.wpcf-field-spinner .wpcf-fieldset {
3245
+ position: relative;
3246
+ }
3247
+ /* sp_wpcp_upload_options */
3248
+ #sp_wpcp_display_shortcode .postbox-header,
3249
+ #sp_wpcp_shortcode_options .postbox-header,
3250
+ #sp_wpcp_upload_options .postbox-header,
3251
+ #sp_wpcp_display_shortcode .hndle,
3252
+ #sp_wpcp_display_shortcode .handlediv,
3253
+ #sp_wpcp_shortcode_options .hndle,
3254
+ #sp_wpcp_shortcode_options .handlediv,
3255
+ #sp_wpcp_upload_options .handlediv,
3256
+ #sp_wpcp_upload_options .hndle {
3257
+ display: none;
3258
+ }
3259
+ #wpcf-section-sp_wpcp_upload_options_0,
3260
+ #wpcf-section-sp_wpcp_display_shortcode_0{
3261
+ display: block;
3262
+ }
3263
+ /* Image select */
3264
+ .wpcf-field-icon_select figure:before,
3265
+ .wpcf-field-image_select figure:before {
3266
+ color: #fff;
3267
+ background-color: #1ea4b0;
3268
+ }
3269
+
3270
+ .wpcf-field-image_select .wpcf--active img {
3271
+ outline-color: #1ea4b0;
3272
+ }
3273
+
3274
+ .wpcf-field-image_select figure .sp-carousel-type {
3275
+ text-align: center;
3276
+ margin-bottom: 0;
3277
+ }
3278
+ .wpcf-field-image_select .wpcf--image img {
3279
+ color: #7b8898;
3280
+ margin-right: 10px;
3281
+ outline: solid 3px transparent;
3282
+ border-radius: 2px;
3283
+ cursor: pointer;
3284
+ text-align: center;
3285
+ width: 80px;
3286
+ outline-offset: -3px;
3287
+ }
3288
+
3289
+ .wpcf-field-image_select .wpcf--image.wpcf--active img {
3290
+ outline-color: #1ea4b0;
3291
+ }
3292
+
3293
+ /* Admin header */
3294
+
3295
+ #sp_wpcp_upload_options .wpcp-admin-header {
3296
+ background-color: #157592;
3297
+ background: linear-gradient(-45deg, #22afba, #157592);
3298
+ padding: 20px 26px;
3299
+ overflow: hidden;
3300
+ height: 33px;
3301
+ }
3302
+
3303
+ #sp_wpcp_upload_options .wpcp-admin-header .support {
3304
+ margin-left: 16px;
3305
+ float: right;
3306
+ }
3307
+
3308
+ #sp_wpcp_upload_options .wpcp-admin-header .support a {
3309
+ color: #ffffff;
3310
+ text-decoration: none;
3311
+ line-height: 35px;
3312
+ font-size: 15px;
3313
+ font-weight: 500;
3314
+ }
3315
+ #sp_wpcp_upload_options .wpcp-admin-header img {
3316
+ max-width: 200px;
3317
+ }
3318
+
3319
+ /* spinner help */
3320
+ .wpcf-field.wpcf-field-spinner .wpcf-help {
3321
+ left: 110px;
3322
+ }
3323
+
3324
+ .wpcf-field-text.wpcf-field .wpcf-fieldset {
3325
+ position: relative;
3326
+ }
3327
+
3328
+ .wpcf-field-text.wpcf-field .wpcf-help {
3329
+ left: 345px;
3330
+ }
3331
+ .wpcf-field.wpcf-field-column .wpcf-help {
3332
+ position: static;
3333
+ top: auto;
3334
+ transform: translateY(0);
3335
+ padding: 0;
3336
+ float: left;
3337
+ }
3338
+ /*
3339
+ * Shortcode footer.
3340
+ */
3341
+ #sp_wpcp_display_shortcode .wpcf-field.wpcf-field-shortcode.wpcp-admin-footer {
3342
+ display: flex;
3343
+ padding: 0;
3344
+ flex-wrap: wrap;
3345
+ }
3346
+
3347
+ .wpcf-field-shortcode.wpcp-admin-footer .wpcf-shortcode-selectable {
3348
+ background-color: rgba(82, 179, 217, 0.11);
3349
+ padding: 10px 15px 10px 33px;
3350
+ display: inline-block;
3351
+ -webkit-touch-callout: all;
3352
+ -webkit-user-select: all;
3353
+ -khtml-user-select: all;
3354
+ -moz-user-select: all;
3355
+ -ms-user-select: all;
3356
+ user-select: all;
3357
+ border: 1px solid rgba(82, 179, 217, 0.2);
3358
+ border-radius: 2px;
3359
+ cursor: pointer;
3360
+ background-image: url(../images/copy.svg);
3361
+ background-size: 16px;
3362
+ background-position: 8px center;
3363
+ background-repeat: no-repeat;
3364
+ }
3365
+ .wpcf-field-shortcode.wpcp-admin-footer .sptp-copy-btn {
3366
+ width: 16px;
3367
+ margin-left: 13px;
3368
+ position: absolute;
3369
+ top: 50%;
3370
+ margin-top: -8px;
3371
+ }
3372
+ #wpcf-section-sp_wpcp_display_shortcode_1 .wpcf-field {
3373
+ display: flex;
3374
+ padding: 0;
3375
+ flex-wrap: wrap;
3376
+ }
3377
+ .wpcf-field-shortcode.wpcp-admin-footer .wpcf-scode-wrap:first-of-type {
3378
+ border-right: 1px solid #ddd;
3379
+ }
3380
+
3381
+ .wpcf-field-shortcode.wpcp-admin-footer .wpcf-scode-wrap {
3382
+ padding-top: 22px;
3383
+ padding-bottom: 22px;
3384
+ text-align: center;
3385
+ width: 49%;
3386
+ }
3387
+
3388
+ .wpcf-field-shortcode.wpcp-admin-footer .wpcf-sc-title {
3389
+ font-weight: 500;
3390
+ font-size: 14px !important;
3391
+ padding-top: 0 !important;
3392
+ color: #4c5158;
3393
+ margin-right: 5px;
3394
+ }
3395
+
3396
+ @media only screen and (max-width: 990px) {
3397
+ .wpcf-field-shortcode.wpcp-admin-footer .wpcf-scode-wrap:first-of-type {
3398
+ border-right: none;
3399
+ border-bottom: 1px solid #ddd;
3400
+ }
3401
+
3402
+ .wpcf-field-shortcode.wpcp-admin-footer .wpcf-scode-wrap {
3403
+ width: 100%;
3404
+ }
3405
+ }
3406
+ /* help */
3407
+ .wpcf-field.wpcf-field-checkbox .wpcf-help {
3408
+ display: inline-block;
3409
+ float: none;
3410
+ }
3411
+
3412
+ /* Import export css */
3413
+ .wpcf-field.wpcf-field-button_set.wpcp_export {
3414
+ margin-top: 0;
3415
+ padding-top: 0;
3416
+ }
3417
+
3418
+ .wpcf-field-button_set.wpcp_export .wpcf--button:hover,
3419
+ .wpcf-field.wpcf-field-custom_import.wpcp_import button:hover {
3420
+ background: #135e96;
3421
+ border-color: #135e96;
3422
+ color: #fff;
3423
+ }
3424
+
3425
+ .wpcf-field.wpcf-field-custom_import.wpcp_import button,
3426
+ .wpcf-field-button_set.wpcp_export .wpcf--button {
3427
+ background: #2271b1;
3428
+ border-color: #2271b1;
3429
+ color: #fff;
3430
+ text-decoration: none;
3431
+ text-shadow: none;
3432
+ display: inline-block;
3433
+ text-decoration: none;
3434
+ font-size: 13px;
3435
+ line-height: 2.15384615;
3436
+ min-height: 30px;
3437
+ margin: 0;
3438
+ padding: 0 10px;
3439
+ cursor: pointer;
3440
+ border-width: 1px;
3441
+ border-style: solid;
3442
+ -webkit-appearance: none;
3443
+ border-radius: 3px;
3444
+ white-space: nowrap;
3445
+ box-sizing: border-box;
3446
+ }
3447
+
3448
+ .sp-lcp-options .wpcf-field-select .wpcf-fieldset {
3449
+ position: relative;
3450
+ }
3451
+
3452
+ .wpcf-field.wpcf-field-custom_import.wpcp_import .wpcf-fieldset {
3453
+ position: relative;
3454
+ }
3455
+
3456
+ .wpcf-field.wpcf-field-custom_import.wpcp_import p {
3457
+ padding-bottom: 0;
3458
+ margin-bottom: 1px;
3459
+ }
3460
+
3461
+ .wpcf-field.wpcf-field-custom_import.wpcp_import button {
3462
+ margin-top: 10px;
3463
+ padding-bottom: 0px;
3464
+ }
3465
+
3466
+ .wpcf-field.wpcf-field-custom_import.wpcp_import .wpcf-help {
3467
+ cursor: help;
3468
+ position: absolute;
3469
+ top: 80%;
3470
+ transform: translateY(-50%);
3471
+ padding: 5px;
3472
+ font-size: 14px;
3473
+ color: #aaa;
3474
+ width: 15px;
3475
+ left: 64px;
3476
+ }
3477
+
3478
+ .wpcf-field.wpcf-field-select.wpcp_post_ids .chosen-container .chosen-drop {
3479
+ max-width: 400px;
3480
+ }
3481
+
3482
+ /* .wpcf-field.wpcf-field-select.wpcp_post_ids .chosen-container {
3483
+ max-width: 400px;
3484
+ } */
3485
+
3486
+ .wpcf-field.wpcf-field-select.wpcp_post_ids {
3487
+ padding-top: 0;
3488
+ }
3489
+
3490
+ .wpcf-options .wpcf-header-inner h1.export-import img {
3491
+ height: 24px;
3492
+ height: 24px;
3493
+ float: left;
3494
+ width: 28px;
3495
+ margin-right: 8px;
3496
+ padding-top: 6px;
3497
+ }
3498
+
3499
+ .wpcf-options.wpcp_tools .wpcf-nav-options li:nth-child(1) a {
3500
+ background-image: url(../images/export-icon.svg);
3501
+ }
3502
+
3503
+ .wpcf-options.wpcp_tools .wpcf-nav-options li:nth-child(2) a {
3504
+ background-image: url(../images/import.svg);
3505
+ }
3506
+
3507
+ .wpcf-options.wpcp_tools .wpcf-nav-options li:nth-child(1) a.wpcf-active {
3508
+ background-image: url(../images/file-export-icon1.svg);
3509
+ }
3510
+
3511
+ .wpcf-options.wpcp_tools .wpcf-nav-options li:nth-child(2) a.wpcf-active {
3512
+ background-image: url(../images/file-import-icon1.svg);
3513
+ }
3514
+
3515
+ .wpcf-options.wpcp_tools .wpcf-nav-options ul li a {
3516
+ padding: 15px 30px;
3517
+ background-size: 14px;
3518
+ background-position: 10px center;
3519
+ background-repeat: no-repeat;
3520
+ }
3521
+ .wpcf-field-upload input{
3522
+ width: 50%;
3523
+ }
3524
+ .carousel_video_source_id .wpcf-help {
3525
+ position: static;
3526
+ }
3527
+ /**
3528
+ Free version CSS.
3529
+ */
3530
+ .wpcf-field-carousel_type .wpcf--image:nth-child(4),
3531
+ .wpcf-field-carousel_type .wpcf--image:nth-child(5),
3532
+ .wpcf-field-carousel_type .wpcf--image:nth-child(6) {
3533
+ pointer-events: none;
3534
+ }
3535
+ .wpcf-field-carousel_type .wpcf--image {
3536
+ position: relative;
3537
+ }
3538
+ .wpcf-field-carousel_type .wpcf--image label strong {
3539
+ position: absolute;
3540
+ top: 3px;
3541
+ right: 3px;
3542
+ background: #cbd6df;
3543
+ padding: 0px 5px;
3544
+ font-size: 10px;
3545
+ }
3546
+ /* Pro only field css */
3547
+ .wpcf-field-image_select .wpcf--image.wpcf-pro-only,
3548
+ .wpcf-field-button_set .wpcf--button.wpcf-pro-only {
3549
+ color: rgba(85, 85, 85, 0.6) !important;
3550
+ pointer-events: none;
3551
+ position: relative;
3552
+ }
3553
+ .wpcf-field-button_set .wpcf--button.wpcf-pro-only {
3554
+ background-color: rgba(247, 247, 247, 0.4) !important;
3555
+ }
3556
+
3557
+ .wpcf-field.wpcf-field-switcher.only_pro_switcher .wpcf--ball::after{
3558
+ content: "PRO";
3559
+ position: relative;
3560
+ text-align: center;
3561
+ width: 24px;
3562
+ float: right;
3563
+ font-weight: 600;
3564
+ font-size: 8px;
3565
+ color: #a5a5a5;
3566
+ opacity: 1;
3567
+ line-height: 18px;
3568
+ }
3569
+ .wpcf-field.wpcf-field-switcher.only_pro_switcher .wpcf--switcher{
3570
+ background: #cbcfd0;
3571
+ pointer-events: none;
3572
+ }
3573
+ .wpcf-field-button_set .wpcf--button.wpcf-pro-only:after,
3574
+ .wpcf-field-image_select .wpcf--image.wpcf-pro-only:after {
3575
+ position: absolute;
3576
+ top: 0;
3577
+ right: 0;
3578
+ color: #a5a5a5;
3579
+ background-color: #e0e0e0;
3580
+ font-weight: 500;
3581
+ padding: 0 4px;
3582
+ content: "PRO";
3583
+ text-align: center;
3584
+ font-size: 8px;
3585
+ line-height: 11px;
3586
+ opacity: 1;
3587
+ }
3588
+ .wpcf-field-image_select .wpcf--image.wpcf-pro-only:after {
3589
+ top: 2px;
3590
+ right: 12px;
3591
+ border-radius: 0 1px 0 0;
3592
+ }
3593
+ .wpcf-field.wpcf-field-switcher.only_pro_switcher .sp_wpcp--switcher{
3594
+ background: #cbcfd0;
3595
+ pointer-events: none;
3596
+ }
3597
+ /* Carousel Row style */
3598
+ .wpcf-field-column.wpcp_carousel_row_pro_only {
3599
+ opacity: .7;
3600
+ pointer-events: none;
3601
+ }
3602
+ .wpcf-field-column.wpcp_carousel_row_pro_only .wpcf--inputs .wpcf--input:nth-child(5){
3603
+ position: relative;
3604
+ }
3605
+ .wpcf-field-column.wpcp_carousel_row_pro_only .wpcf--inputs .wpcf--input:nth-child(5)::after {
3606
+ position: absolute;
3607
+ content: "PRO";
3608
+ background-color: #d4d4d4;
3609
+ padding: 2px 4px;
3610
+ font-size: 8px;
3611
+ border-radius: 2px;
3612
+ height: 11px;
3613
+ margin-left: 5px;
3614
+ margin-top: 7px;
3615
+ right: -20px;
3616
+ }
admin/views/sp-framework/assets/css/style.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .wpcf{position:relative}.wpcf label{padding:0;margin:0;display:inline-block}.wpcf-ab-icon{top:2px}#screen-meta-links+.wpcf-options{margin-top:40px}.wpcf-options{margin-top:20px;margin-right:20px}.wpcf-header{position:relative}.wpcf-header-inner{padding:25px;transition:box-shadow .3s ease}.wpcf-header-inner h1 svg{float:left;height:26px;width:28px;margin-right:8px;padding-top:6px}.wpcf-header-inner h1{float:left;margin:0;font-size:22px;color:#444;font-weight:600;line-height:35px}.wpcf-header-inner h1 small{font-size:11px;font-weight:500}.wpcf-sticky .wpcf-header-inner{position:fixed;z-index:99;top:32px;box-shadow:0 5px 10px rgba(0,0,0,.1)}.wpcf-buttons{float:right}.wpcf-buttons .button{margin:0 2px;line-height:26px}.wpcf-buttons .button:focus{outline:0!important;box-shadow:none!important}.wpcf-buttons .wpcf-save{min-width:72px}.wpcf-header-left{float:left}.wpcf-header-right{float:right}.wpcf-nav:not(.wpcf-nav-inline){display:block;position:relative;z-index:10;float:left}.wpcf-nav ul{clear:left;margin:0;list-style-type:none}.wpcf-nav ul li{margin-bottom:0}.wpcf-nav ul li a{font-size:13px;position:relative;display:block;padding:14px 12px;text-decoration:none;transition-property:color,background;transition-duration:.2s;transition-timing-function:ease}.wpcf-nav .fa{width:20px;margin-right:5px;font-size:14px;text-align:center}.wpcf-nav ul li a:focus{outline:0;box-shadow:none}.wpcf-nav ul li .wpcf-arrow:after{content:"\f054";display:inline-block;font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;font-size:9px;line-height:1;position:absolute;right:10px;top:50%;margin-top:-4px}.wpcf-nav ul li.wpcf-tab-expanded .wpcf-arrow:after{transform:rotate(90deg)}#wpcf_shortcode_options .wpcf-theme-light .wpcf-nav ul li .wpcf-active i,.sp-wpcf-options.wpcf-theme-light .wpcf-nav ul li .wpcf-active i{color:#178087}.wpcf-nav ul li.wpcf-tab-expanded ul{display:block}.wpcf-nav ul ul{display:none;position:relative}.wpcf-nav ul ul li a{font-size:12px;padding:12px 14px 12px 24px}.wpcf-nav .wpcf-tab-icon{width:20px;margin-right:5px;font-size:13px;text-align:center}.wpcf-nav .wpcf-label-error{margin-left:4px;vertical-align:top}.wpcf-nav-normal{width:235px}.wpcf-nav-normal+.wpcf-content{margin-left:235px}.wpcf-nav-inline ul li{display:inline-block;vertical-align:top}.wpcf-nav-background{position:absolute;top:0;left:0;bottom:0;z-index:9;width:235px}.wpcf-wrapper{position:relative}.wpcf-content{background-color:#fff;background-color:#fff;-moz-transition:opacity .2s;-o-transition:opacity .2s;-webkit-transition:opacity .2s;transition:opacity .2s}.wpcf-sections{float:left;width:100%}.wpcf-section-title{display:none;padding:20px 30px;background-color:#f5f5f5;border-top:1px solid #eee;border-bottom:1px solid #eee}.wpcf-section-title h3{margin:0;padding:0;font-size:13px;font-weight:700;text-transform:uppercase}.wpcf-section-title .wpcf-section-icon{margin-right:5px}.wpcf-footer{padding:20px;font-size:11px}.wpcf-copyright{float:left;margin-top:5px}.wpcf-search-all .wpcf-nav,.wpcf-search-all .wpcf-nav-background,.wpcf-show-all .wpcf-nav,.wpcf-show-all .wpcf-nav-background{display:none}.wpcf-search-all .wpcf-content,.wpcf-show-all .wpcf-content{margin-left:0}.wpcf-search-all .wpcf-section,.wpcf-search-all .wpcf-section-title,.wpcf-show-all .wpcf-section-title{display:block!important}.wpcf-search-all .wpcf-section-title{display:none!important}.wpcf-expand-all{float:left;padding:0 8px;margin-right:4px;z-index:1;font-size:13px;line-height:30px;cursor:pointer;user-select:none;border-radius:2px;transition:all .2s}.wpcf-expand-all span{font-size:11px;vertical-align:middle}.wpcf-search{float:left}.wpcf-search input{margin:0 2px 0 0;border:none;font-size:12px;line-height:30px;min-height:30px;text-align:inherit;padding:0 10px;border-radius:2px;box-shadow:none}.wpcf-search input:focus{box-shadow:none}.wpcf-saving .wpcf-buttons,.wpcf-saving .wpcf-content{cursor:default;pointer-events:none;opacity:.5}.wpcf-metabox{margin:-6px -12px -12px -12px}.wpcf-metabox .wpcf-field{padding:20px}.wpcf-metabox .wpcf-section-title{padding:20px}.block-editor-page .wpcf-metabox{margin:-6px -14px -14px -14px}.block-editor-editor-skeleton__content .wpcf-metabox{border-left:1px solid #e2e4e7;border-right:1px solid #e2e4e7}.wpcf-sections-reset{float:left;width:100%;text-align:right;border-top:1px solid #eee}.wpcf-sections-reset .wpcf-button-cancel,.wpcf-sections-reset input{display:none}.wpcf-sections-reset label{padding:10px}.wpcf-sections-reset span{-webkit-user-select:none;user-select:none}.wpcf-sections-reset input:checked~.wpcf-button-reset{display:none}.wpcf-sections-reset input:checked~.wpcf-button-cancel{display:inline-block}#side-sortables .wpcf-section-title{padding:12px}#side-sortables .wpcf-field{padding:10px 15px}#side-sortables .wpcf-field .wpcf-title{float:none;width:100%;margin-bottom:6px}#side-sortables .wpcf-field .wpcf-fieldset{float:none;width:100%}#side-sortables .wpcf-field-text input{width:100%}#side-sortables .wpcf-notice{padding:10px 15px}.wpcf-comment-metabox{margin:-6px -12px -12px -12px}.wpcf-comment-metabox .wpcf-field{padding:20px}.wpcf-comment-metabox .wpcf-section-title{padding:20px}.wpcf-tooltip{position:absolute;z-index:5000001;font-size:12px;line-height:1.4;text-align:center;text-decoration:none;padding:6px 12px;max-width:200px;color:#fff;background-color:#000;background-color:rgba(0,0,0,.85);border-radius:4px}.wpcf-theme-dark .wpcf-header-inner{background-color:#050505}.wpcf-theme-dark .wpcf-header-inner h1{color:#fff}.wpcf-theme-dark .wpcf-header-inner h1 small{color:#555}.wpcf-theme-dark .wpcf-expand-all{color:#999;background-color:#222}.wpcf-theme-dark .wpcf-expand-all:hover{color:#fff;background-color:#333}.wpcf-theme-dark .wpcf-search input{color:#fff;background-color:#222}.wpcf-theme-dark .wpcf-search:focus{background-color:#444}.wpcf-theme-dark .wpcf-search::-webkit-input-placeholder{color:#666}.wpcf-theme-dark .wpcf-nav ul li a{color:#999;border-color:#2f2f2f;background-color:#222}.wpcf-theme-dark .wpcf-nav ul li a:hover{color:#fff}.wpcf-theme-dark .wpcf-nav ul li .wpcf-active i{color:#178087}.wpcf-theme-dark .wpcf-nav ul li .wpcf-active{color:#fff;background-color:#111}.wpcf-theme-dark .wpcf-nav ul ul li a{border-color:#2f2f2f;background-color:#191919}.wpcf-theme-dark .wpcf-nav ul ul li .wpcf-active{background-color:#101010}.wpcf-theme-dark .wpcf-nav ul ul:before{background-color:rgba(34,34,34,.75)}.wpcf-theme-dark .wpcf-nav>ul>li:last-child>a{border:none}.wpcf-theme-dark .wpcf-nav-normal ul li a{border-bottom-width:1px;border-bottom-style:solid}.wpcf-theme-dark .wpcf-nav-normal ul li .wpcf-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}.wpcf-theme-dark .wpcf-nav-inline{background-color:#222}.wpcf-theme-dark .wpcf-nav-inline ul li a{text-align:center;border-right-width:1px;border-right-style:solid}.wpcf-theme-dark .wpcf-nav-inline ul li .wpcf-active:after{content:" ";position:absolute;left:50%;bottom:0;height:0;width:0;pointer-events:none;border:solid transparent;border-bottom-color:#fff;border-width:4px;margin-left:-4px}.wpcf-theme-dark .wpcf-nav-background{background-color:#222}.wpcf-theme-dark .wpcf-footer{color:#555;background-color:#050505}.wpcf-theme-light .wpcf-container{border:1px solid #ccd0d4;box-shadow:0 0 15 rgba(0,0,0,.04)}.wpcf-theme-light .wpcf-header-inner{background-color:#f2f2f2;border-bottom:1px solid #cecece;padding:22px 28px}.wpcf-theme-light .wpcf-header-inner h1 small{color:#999}.wpcf-theme-light .wpcf-expand-all{color:#999;background-color:#eee}.wpcf-theme-light .wpcf-expand-all:hover{color:#555}.wpcf-theme-light .wpcf-search input{color:#555;background-color:#eee}.wpcf-theme-light .wpcf-search input::-webkit-input-placeholder{color:#999}.wpcf-theme-light .wpcf-nav ul li a{background-color:#178087;border-top:1px solid #178087;border-right:1px solid #e2e2e1;border-bottom:1px solid #ddd;color:#fff;font-size:13px;font-weight:600;line-height:1.4;padding:14px 15px;text-transform:uppercase}.wpcf-theme-light .wpcf-nav ul li .wpcf-active{color:#000;background-color:#fff}.wpcf-theme-light .wpcf-nav ul ul li a{background-color:#eee}.wpcf-theme-light .wpcf-nav-normal>ul{margin-right:-1px;margin-bottom:-1px}.wpcf-theme-light .wpcf-nav-normal>ul li a{border-bottom:1px solid #ccd0d4;border-right:1px solid #ccd0d4}.wpcf-theme-light .wpcf-nav-normal>ul li .wpcf-active{border-right-color:#fff}.wpcf-theme-light .wpcf-nav-inline{background-color:#f5f5f5;border-bottom:1px solid #ccd0d4}.wpcf-theme-light .wpcf-nav-inline>ul{margin-bottom:-1px;margin-right:-1px}.wpcf-theme-light .wpcf-nav-inline>ul li a{text-align:center;border-bottom:1px solid #ccd0d4}.wpcf-theme-light .wpcf-nav-inline>ul li .wpcf-active i{color:#178087}.wpcf-theme-light .wpcf-nav-inline>ul li .wpcf-active{border-bottom:1px solid #fff;border-top:1px solid #178087;box-shadow:0 3px 0 0 #178087 inset;border-bottom-color:#fff}.wpcf-theme-light .wpcf-nav-inline>ul ul{display:none!important}.wpcf-theme-light .wpcf-nav-inline .wpcf-arrow:after{display:none}.wpcf-theme-light .wpcf-nav-background{background-color:#f5f5f5;border-right:1px solid #ccd0d4}.wpcf-theme-light .wpcf-footer{color:#555;border-top:1px solid #ccd0d4;background-color:#f5f5f5;background:linear-gradient(#fafafa,#f5f5f5)}.wpcf-field{position:relative;padding:30px}.wpcf-field p:first-child{margin-top:0}.wpcf-field p:last-child{margin-bottom:0}.wpcf-field:after,.wpcf-field:before{content:" ";display:table}.wpcf-field:after{clear:both}.wpcf-field h4{margin-top:0}.wpcf-field .wpcf-title{position:relative;width:20%;float:left}.wpcf-field .wpcf-title h4{margin:0;color:#23282d}.wpcf-field .wpcf-fieldset{float:right;width:calc(80% - 20px)}.wpcf-pseudo-field{padding:0 5px 0 0!important;display:inline-block}.wpcf-pseudo-field+.wpcf-pseudo-field{border:0}.wpcf-pseudo-field pre{display:none}.wpcf-field.wpcf-field-background .wpcf--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}.wpcf-field.wpcf-field-background .wpcf--block-preview{cursor:pointer;position:relative;overflow:hidden;margin-top:10px;width:100%}.wpcf-field.wpcf-field-background .wpcf--black-background{border-color:#000;background-color:#000}.wpcf-field.wpcf-field-background .wpcf--toggle{position:absolute;top:5px;right:10px;color:#999}.wpcf-field-border .wpcf--inputs,.wpcf-field-column .wpcf--inputs,.wpcf-field-dimensions .wpcf--inputs,.wpcf-field-dimensions_advanced .wpcf--inputs,.wpcf-field-spacing .wpcf--inputs{float:left;display:flex;flex-wrap:wrap}.wpcf-field-border .wpcf--input,.wpcf-field-column .wpcf--input,.wpcf-field-dimensions .wpcf--input,.wpcf-field-dimensions_advanced .wpcf--input,.wpcf-field-spacing .wpcf--input{display:flex;padding-right:6px;padding-bottom:4px;box-sizing:border-box}.wpcf-field-border .wpcf--input select,.wpcf-field-column .wpcf--input select,.wpcf-field-dimensions .wpcf--input select,.wpcf-field-dimensions_advanced .wpcf--input select,.wpcf-field-spacing .wpcf--input select{margin:0}.wpcf-field-border .wpcf--input input,.wpcf-field-column .wpcf--input input,.wpcf-field-dimensions .wpcf--input input,.wpcf-field-dimensions_advanced .wpcf--input input,.wpcf-field-spacing .wpcf--input input{position:relative;z-index:1;margin:0;width:65px;max-width:100%;text-align:center;padding:0}.wpcf-field-border .wpcf--color,.wpcf-field-column .wpcf--color,.wpcf-field-dimensions .wpcf--color,.wpcf-field-dimensions_advanced .wpcf--color,.wpcf-field-spacing .wpcf--color{float:left}.wpcf-field-border .wpcf--label,.wpcf-field-column .wpcf--label,.wpcf-field-dimensions .wpcf--label,.wpcf-field-dimensions_advanced .wpcf--label,.wpcf-field-spacing .wpcf--label{display:flex;flex-direction:column;justify-content:center;user-select:none;min-width:20px;max-width:100%;padding:0 4px;font-size:12px;text-align:center;color:#555;border:1px solid #7b776c;background-color:#f5f5f5}.wpcf-field-border .wpcf--icon,.wpcf-field-column .wpcf--icon,.wpcf-field-dimensions .wpcf--icon,.wpcf-field-dimensions_advanced .wpcf--icon,.wpcf-field-spacing .wpcf--icon{border-right:0;border-radius:4px 0 0 4px}.wpcf-field-border .wpcf--icon+input,.wpcf-field-column .wpcf--icon+input,.wpcf-field-dimensions .wpcf--icon+input,.wpcf-field-dimensions_advanced .wpcf--icon+input,.wpcf-field-spacing .wpcf--icon+input{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.wpcf-field-border .wpcf--unit,.wpcf-field-column .wpcf--unit,.wpcf-field-dimensions .wpcf--unit,.wpcf-field-dimensions_advanced .wpcf--unit,.wpcf-field-spacing .wpcf--unit{border-left:0;border-radius:0 4px 4px 0}.wpcf-field-border .wpcf--is-unit,.wpcf-field-column .wpcf--is-unit,.wpcf-field-dimensions .wpcf--is-unit,.wpcf-field-dimensions_advanced .wpcf--is-unit,.wpcf-field-spacing .wpcf--is-unit{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.wpcf-field-button_set .wpcf--buttons{display:inline-block}.wpcf-field-button_set .wpcf--button{position:relative;z-index:1;float:left;cursor:pointer;padding:7px 14px;min-width:16px;text-align:center;color:#555;border:1px solid #ccc;background-color:#f7f7f7;user-select:none;box-shadow:0 1px 0 rgba(0,0,0,.1)}.wpcf-field-button_set .wpcf--button:first-child{border-radius:4px 0 0 4px}.wpcf-field-button_set .wpcf--button:last-child{border-radius:0 4px 4px 0}.wpcf-field-button_set .wpcf--button:not(:first-child){margin-left:-1px}.wpcf-field-button_set .wpcf--button:hover{background-color:#eee}.wpcf-field-button_set .wpcf--active,.wpcf-field-button_set .wpcf--active:hover{z-index:2;color:#fff;border-color:#006799;background-color:#0085ba}.wpcf-field-button_set input{display:none}.wpcf-field-checkbox ul,.wpcf-field-radio ul{margin:0;padding:0;list-style-type:none;overflow-y:auto;max-height:305px}.wpcf-field-checkbox ul li,.wpcf-field-radio ul li{margin-bottom:6px}.wpcf-field-checkbox ul ul,.wpcf-field-radio ul ul{max-height:none}.wpcf-field-checkbox ul ul li,.wpcf-field-radio ul ul li{margin-left:8px}.wpcf-field-checkbox ul ul li:first-child,.wpcf-field-radio ul ul li:first-child{margin-left:0}.wpcf-field-checkbox input,.wpcf-field-radio input{margin:0 1px}.wpcf-field-checkbox .wpcf--inline-list li,.wpcf-field-radio .wpcf--inline-list li{display:inline-block;margin-right:15px}.wpcf-field-checkbox .wpcf--text,.wpcf-field-radio .wpcf--text{margin-left:5px;vertical-align:middle}.wpcf-field-checkbox .wpcf-checker,.wpcf-field-radio .wpcf-checker{cursor:pointer}.wpcf-field-code_editor .CodeMirror{width:100%;height:400px}.wpcf-field-code_editor .cm-s-default{border:1px solid #ccd0d4}.wpcf-field-code_editor textarea{width:100%;height:400px}.wpcf-field-color>input{opacity:.75;width:115px;max-width:100%}.wpcf-field-color .button.wp-picker-clear{padding:0 8px;margin-left:6px;line-height:2.54545455;min-height:30px}.wpcf-field-color_group .wpcf--left{float:left;margin-right:10px;margin-bottom:5px}.wpcf-field-color_group .wpcf--title{color:#999;margin-bottom:5px}.wpcf-field-gallery input{display:none}.wpcf-field-gallery ul{margin:0;padding:0;list-style-type:none}.wpcf-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)}.wpcf-field-gallery ul.sp-gallery-images li img{max-height:100px;display:inline-block;vertical-align:middle}.wpcf-field-gallery .button,.wpcf-field-gallery .button:focus,.wpcf-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}.wpcf-field-gallery .button-primary.wpcf-button{background:#4eb631;box-shadow:none;text-shadow:none}.wpcf-field-gallery .button.wpcf-edit-gallery{background:#6a7885}.wpcf-field-gallery .button i{font-size:24px;margin-bottom:10px}.wpcf-field-gallery a,.wpcf-field-gallery ul.sp-gallery-images li{display:inline-block;padding:4px;border:1px solid #ccc;margin:0 5px 10px 0;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 rgb(0 0 0 / 8%);box-shadow:0 1px 0 rgb(0 0 0 / 8%)}.wpcf-field-gallery ul li img{max-height:100px;display:inline-block;vertical-align:middle}.wpcf-field-gallery a,.wpcf-field-gallery li{float:left}.wpcf-field-icon_select .wpcf--icon,.wpcf-field-image_select .wpcf--image{display:inline-block;margin:0 5px 5px 0}.wpcf-field-icon_select .wpcf--inline-list .wpcf--icon,.wpcf-field-image_select .wpcf--inline-list .wpcf--image{display:inline-block}.wpcf-field-icon_select figure,.wpcf-field-image_select figure{cursor:pointer;position:relative;display:inline-block;max-width:100%;margin:0;vertical-align:bottom;border:2px solid transparent;background-color:#fff;user-select:none;transition:all .2s}.wpcf-field-icon_select figure:before,.wpcf-field-image_select figure:before{position:absolute;top:0;left:0;text-align:center;font-size:10px;font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;content:"\f00c";width:16px;height:16px;line-height:14px;opacity:0;color:#fff;background-color:#222;transition:opacity .2s}.wpcf-field-icon_select label,.wpcf-field-image_select label{display:inline-block;margin:5px}.wpcf-field-icon_select figure{padding:8px 10px;font-size:20px;line-height:20px}.wpcf-field-icon_select .wpcf--active figure{border-color:#52b3d9;opacity:1}.wpcf-field-icon_select .wpcf--active figure:before,.wpcf-field-image_select .wpcf--active figure:before{opacity:1}.wpcf-field-icon_select figure,.wpcf-field-image_select img{max-width:100%;height:auto;vertical-align:top}.wpcf-field-icon_select input,.wpcf-field-image_select input{display:none}.wpcf-field-media .wpcf--placeholder{display:flex;align-items:flex-start}.wpcf-field-media .wpcf--placeholder input{width:100%;margin:0}.wpcf-field-media .button{margin-left:5px}.wpcf-field-media .hidden+.button{margin-left:0}.wpcf-field-media .wpcf--preview{position:relative}.wpcf-field-select .wpcf-fieldset{min-height:30px}.wpcf-field-select .wpcf-chosen{display:none}.wpcf-field-select select{max-width:100%;margin:0;float:left}.wpcf-field-select .wpcf-hide-select{display:none!important}.wpcf-field-slider .wpcf--wrap{display:flex;align-items:center}.wpcf-field-slider .wpcf--input{display:flex}.wpcf-field-slider .wpcf--unit{display:flex;justify-content:center;flex-direction:column;user-select:none;padding:0 6px;font-size:11px;line-height:1;border-radius:0 4px 4px 0;color:#555;border:1px solid #7e8993;border-left:0;background-color:#f5f5f5}.wpcf-field-slider .wpcf-slider-ui{margin-right:15px}.wpcf-field-slider input[type=number]{position:relative;z-index:1;margin:0;width:50px;text-align:center}.wpcf-field-slider .wpcf--is-unit{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.wpcf-field-slider .ui-slider{position:relative;width:100%;height:3px;border:none;background:#ddd;border-radius:2px}.wpcf-field-slider .ui-slider-range{height:3px;border:none;background:#333;border-radius:2px}.wpcf-field-slider .ui-slider-handle{position:absolute;width:16px;height:16px;top:-7px;margin-left:-8px;border:none;background:#333;border-radius:2px}.wpcf-field-slider .ui-slider-handle:hover,.wpcf-field-slider .ui-state-active{cursor:pointer;background:#111}.wpcf-field-spinner .wpcf--spin{display:flex;float:left}.wpcf-field-spinner .ui-spinner{display:flex}.wpcf-field-spinner .ui-button{display:flex;flex-direction:column;justify-content:center;text-align:center;min-width:20px;padding:0 4px;color:#555;border:1px solid #7e8993;background-color:#f5f5f5}.wpcf-field-spinner .ui-spinner-button{cursor:pointer}.wpcf-field-spinner .ui-spinner-button:hover{background-color:#e7e7e7}.wpcf-field-spinner .ui-spinner-button:active{background-color:#ddd}.wpcf-field-spinner .ui-spinner-button:before{font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;font-size:14px;line-height:14px}.wpcf-field-spinner .ui-spinner-down{order:1;border-right:0;border-radius:4px 0 0 4px}.wpcf-field-spinner .ui-spinner-down:before{content:"\f0d9"}.wpcf-field-spinner .ui-spinner-input{order:2}.wpcf-field-spinner .wpcf--unit{order:3;border-left:0;user-select:none}.wpcf-field-spinner .ui-spinner-up{order:4;border-left:0;border-radius:0 4px 4px 0}.wpcf-field-spinner .ui-spinner-up:before{content:"\f0da"}.wpcf-field-spinner input{position:relative;z-index:1;width:50px;text-align:center;margin:0;padding:0 8px;border-radius:0}.wpcf-field-spinner .ui-button-icon,.wpcf-field-spinner .ui-button-icon-space,.wpcf-field-spinner .ui-button-text{display:none}.wpcf-field-switcher .wpcf--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}.wpcf-field-switcher .wpcf--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)}.wpcf-field-switcher .wpcf--off,.wpcf-field-switcher .wpcf--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}.wpcf-field-switcher .wpcf--off{padding-right:0;padding-left:28px;opacity:1}.wpcf-field-switcher .wpcf--active{background:#4fb845}.wpcf-field-switcher .wpcf--active .wpcf--on{opacity:1}.wpcf-field-switcher .wpcf--active .wpcf--off{opacity:0}.wpcf-field-switcher .wpcf--active .wpcf--ball{left:100%;margin-left:-28px}.wpcf-field-switcher .wpcf--label{float:left;margin-top:4px;margin-left:8px;font-weight:400;color:#999}.wpcf-field-text input{width:340px;margin:0;min-height:36px;float:left}.wpcf-field-textarea textarea{width:100%;max-width:100%;min-height:125px}.wpcf-field-textarea .wpcf-shortcode-button{margin-bottom:10px;margin-right:5px}.wpcf-field-typography select,.wpcf-field-typography textarea{margin:0;min-width:100%;max-width:100%}.wpcf-field-typography .wpcf--title{color:#777;margin:0 0 2px 0;font-size:12px}.wpcf-field-typography .wpcf--title small{vertical-align:top}.wpcf-field-typography .wpcf--blocks{display:flex;flex-wrap:wrap}.wpcf-field-typography .wpcf--block.wpcf--block-font-color{overflow:hidden;float:left}.wpcf-field-typography .wpcf--block{flex:1;max-width:100%;padding-right:6px;padding-bottom:6px}.wpcf-field-typography .wpcf--input{margin:0;min-width:100%}.wpcf-field-typography .wpcf--input-wrap{position:relative}.wpcf-field-typography .wpcf--unit{position:absolute;z-index:1;right:4px;top:4px;bottom:4px;padding:2px 6px;color:#666;font-size:11px;line-height:1;border-radius:2px;background:#eee;user-select:none;display:flex;justify-content:center;flex-direction:column}.wpcf-field-background .wpcf--preview,.wpcf-field-typography .wpcf--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}.wpcf-field-background .wpcf--block-preview,.wpcf-field-typography .wpcf--block-preview{cursor:pointer;position:relative;overflow:hidden;margin-top:10px;width:100%}.wpcf-field-typography .wpcf--black-background{border-color:#000;background-color:#000}.wpcf-field-typography .wpcf--toggle{position:absolute;top:5px;right:10px;color:#999}.wpcf-field-typography .wpcf--block-extra-styles{margin-top:5px}.wpcf-field-heading{font-size:1.5em;font-weight:700;color:#23282d;background-color:#f5f5f5}.wpcf-field-subheading{font-size:14px;font-weight:700;padding-top:17px;padding-bottom:17px;color:#23282d;background-color:#f7f7f7}.wpcf-field-submessage{padding:0!important;border:0!important}.wpcf-field-submessage+.wpcf-field{border-top:0!important}.wpcf-submessage{font-size:12px;padding:17px 30px;border-top:1px solid transparent;border-bottom:1px solid transparent}.wpcf-submessage-success{color:#3c763d;border-color:#d6e9c6;background-color:#dff0d8}.wpcf-submessage-info{color:#31708f;border-color:#bce8f1;background-color:#d9edf7}.wpcf-submessage-warning{color:#8a6d3b;border-color:#faebcc;background-color:#fcf8e3}.wpcf-submessage-danger{color:#a94442;border-color:#ebccd1;background-color:#f2dede}.wpcf-submessage-normal{color:#23282d;border-color:#eee;background-color:#f7f7f7}.wpcf-field-notice{background-color:transparent}.wpcf-notice{color:#999;font-style:italic;font-size:13px;padding:12px 12px 12px 0!important;border:none!important}.wpcf-notice-success{border-color:#46b450}.wpcf-notice-info{border-color:#339fd4}.wpcf-notice-warning{border-color:#ffbc00}.wpcf-notice-danger{border-color:#dc3232}.wpcf-notice-normal{border-color:#222}.wpcf-field.wpcf-field-notice.pro_notice{padding-top:0}.wpcf-field-number input{width:70px;margin:0;height:36px;line-height:34px;padding-left:12px;min-height:36px}.wpcf-field-number .wpcf--wrap{position:relative;float:left;width:100px}.wpcf-field-number .wpcf--unit{position:absolute;z-index:1;left:75px;top:4px;bottom:4px;padding:2px 6px;color:#666;font-size:11px;line-height:1;border-radius:2px;background:#eee;user-select:none;display:flex;justify-content:center;flex-direction:column}.wpcf-help{position:static;cursor:help;font-size:14px;color:#aaa;width:15px;line-height:28px;padding-left:5px;float:left}.wpcf-help .wpcf-help-text{display:none}.wpcf--preview{max-width:100%}.wpcf-image-preview{display:inline-flex;align-items:center;justify-content:center;flex-direction:column;position:relative;padding:6px;max-width:120px;max-height:120px;min-width:40px;min-height:40px;margin-bottom:10px;text-align:center;border-radius:2px;border:1px solid #ccc;background-color:#f9f9f9;box-shadow:0 1px 0 rgba(0,0,0,.08)}.wpcf-image-preview i{cursor:pointer;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:.75;border-radius:2px;transition:all .2s}.wpcf-image-preview i:hover{opacity:1}.wpcf-image-preview i:focus{box-shadow:none}.wpcf-image-preview span{position:relative;overflow:hidden;display:flex;height:100%;width:100%}.wpcf-image-preview img{max-width:100%;height:auto;object-fit:contain}.wpcf-field-custom .wpcf-field{padding:0}.wpcf-field .chosen-container-single .chosen-single{height:28px;line-height:26px}.wpcf-field .chosen-container-single .chosen-single abbr{top:0;right:20px;font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;font-size:12px;height:100%;width:18px;color:#aaa;text-align:center;background:0 0}.wpcf-field .chosen-container-single .chosen-single abbr:before{content:"\f00d"}.wpcf-field .chosen-container-single .chosen-single abbr:hover{color:#555}.wpcf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close{font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;font-size:12px;height:100%;width:18px;color:#aaa;text-align:center;background:0 0}.wpcf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:before{content:"\f00d";display:inline-block;padding-top:3px}.wpcf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{color:#555}.wpcf-field .chosen-container-single .chosen-single div b{font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;font-size:14px;color:#aaa;background:0 0}.wpcf-field .chosen-container-single .chosen-single div b:before{content:"\f107"}.wpcf-field .chosen-container-single .chosen-single div b:hover{color:#555}.wpcf-field .chosen-container-multi .chosen-choices li.search-choice-placeholder{border:1px dashed #aaa;margin:3px 5px 3px 0}.wpcf-field .chosen-container-multi .ui-sortable li.search-choice span{cursor:move}.wpcf-field .chosen-container-active.chosen-with-drop .chosen-single div b:before{content:"\f106"}.wpcf-field .chosen-container-single .chosen-single-with-deselect span{margin-right:40px}.wpcf-field .chosen-container-single .chosen-search input[type=text]{background:0 0}.wpcf-field .chosen-container-single .chosen-search:before{font-family:"Font Awesome 5 Pro","Font Awesome 5 Free",FontAwesome;font-weight:900;font-size:11px;content:"\f002";position:absolute;right:12px;top:10px;color:#aaa}.wpcf-field .wp-picker-container{display:inline-block}.wpcf-field .wp-picker-container .wp-color-result.button{margin-bottom:0}.wpcf-field .wpcf--transparent-wrap{display:none;position:relative;top:-1px;width:235px;padding:9px 10px;border:1px solid #dfdfdf;border-top:none;background-color:#fff}.wpcf-field .wp-picker-active .wpcf--transparent-wrap{display:block}.wpcf-field .wpcf--transparent-slider{position:absolute;width:190px;margin-left:2px;height:18px}.wpcf-field .wpcf--transparent-slider .ui-slider-handle{position:absolute;top:-3px;bottom:-3px;z-index:5;border-color:#aaa;border-style:solid;border-width:4px 3px;width:10px;height:16px;margin:0 -5px;background:0 0;cursor:ew-resize;opacity:.9;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.2)}.wpcf-field .wpcf--transparent-slider .ui-slider-handle:before{content:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;border-radius:3px}.wpcf-field .wpcf--transparent-offset{height:18px;width:200px;background:url(../images/checkerboard.png) repeat-y center left scroll #fff;border-radius:2px;box-shadow:inset 0 0 5px rgba(0,0,0,.4)}.wpcf-field .wpcf--transparent-text{position:absolute;top:12px;right:10px;width:30px;font-size:12px;line-height:12px;text-align:center;color:#999}.wpcf-field .wpcf--transparent-button{cursor:pointer;user-select:none;margin-top:10px;font-size:11px;text-align:center;border-radius:2px;padding:3px 7px;box-shadow:0 1px 0 rgba(0,0,0,.1);letter-spacing:.2px;color:#777;border:1px solid #ccc;background-color:#f7f7f7;transition:background-color .2s,border-color .2s,color .2s}.wpcf-field .wpcf--transparent-active .wp-color-result{background-image:url(../images/checkerboard.png);background-size:135px;background-position:center left;background-color:transparent!important}.wpcf-field .wpcf--transparent-active .wpcf--transparent-button{color:#fff;border-color:#3ea032;background-color:#4fb845}.wpcf-field .wpcf--transparent-active .fa:before{content:"\f205"}.wpcf-nav-menu-options{clear:both;float:left;width:100%}.wpcf-nav-menu-options>.wpcf-fields{margin-left:-10px;margin-top:10px;margin-bottom:10px;border-top:1px solid #eee;border-bottom:1px solid #eee}.wpcf-nav-menu-options>.wpcf-fields>.wpcf-field{padding:12px 14px 12px 12px}.wpcf-nav-menu-options>.wpcf-fields>.wpcf-field .wpcf-title{float:none;width:100%;margin-bottom:5px}.wpcf-nav-menu-options>.wpcf-fields>.wpcf-field .wpcf-fieldset{float:none;width:100%}.wpcf-nav-menu-options .wpcf-field-text input{width:100%}.wpcf-nav-menu-options .wpcf-field-notice .wpcf-notice{padding:15px}.wpcf-nav-menu-title{padding:12px 14px 12px 12px;background-color:#f5f5f5;border-top:1px solid #eee;border-bottom:1px solid #eee}.wpcf-nav-menu-title:first-child{border-top:0}.wpcf-nav-menu-title h4{margin:0;padding:0;color:#23282d}.wpcf-nav-menu-icon{margin-right:5px}.wpcf-subtitle-text{margin-top:6px;font-weight:400;color:#999;font-style:italic}.wpcf-desc-text{clear:both;float:left;width:100%;margin-top:6px;font-weight:400;color:#999}.wpcf-error-text{margin-top:6px;color:#d02c21}.wpcf-before-text{margin-bottom:6px}.wpcf-after-text{margin-top:6px}.wpcf-metabox-hide{display:none!important}.wpcf-metabox-show{display:block!important}.wpcf-depend-hidden.wpcf-depend-on{display:none}.wpcf-depend-visible.wpcf-depend-on{display:block;opacity:.75;filter:grayscale(1);user-select:none;border-top:1px solid #eee}.wpcf-depend-visible.wpcf-depend-on .clear:before{content:"";left:0;top:0;right:0;bottom:0;position:absolute;background-color:#eee;opacity:.25;z-index:10}.wpcf-warning-primary{color:#fff!important;border-color:#dc3545!important;background:#dc3545!important}.wpcf-warning-primary:focus,.wpcf-warning-primary:hover{border-color:#bd2130!important;background:#bd2130!important}.wpcf-warning-primary:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #bd2130!important}.wpcf-warning-primary:active{border-color:#bd2130!important;background:#bd2130!important}.wpcf-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 rgb(0 0 0 / 10%);box-shadow:0 1px 1px rgb(0 0 0 / 10%)}.wpcf-form-show{display:block}.wpcf-form-success{border-left-color:#46b450}.wpcf-form-warning{border-left-color:#faebcc}.wpcf-label-error{position:relative;top:-2px;display:inline-block;font-size:10px;line-height:10px;height:10px;width:10px;padding:1px;font-style:normal;text-align:center;color:#fff;vertical-align:middle;background-color:#e10000;border-radius:2px}.wpcf-no-option{padding:30px}.wpcf-field-spinner .wpcf-input-number{-moz-appearance:textfield}.wpcf-field-spinner .wpcf-input-number::-webkit-inner-spin-button,.wpcf-field-spinner .wpcf-input-number::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.wpcf-fa5-shims .wpcf .fab,.wpcf-fa5-shims .wpcf .far,.wpcf-fa5-shims .wpcf .fas{font-family:FontAwesome;font-style:normal}@media only screen and (max-width:1200px){.wpcf-metabox .wpcf-field .wpcf-title{float:none;width:100%;margin-bottom:10px}.wpcf-metabox .wpcf-field .wpcf-fieldset{float:none;width:100%}}@media only screen and (max-width:782px){.wpcf-header-inner{text-align:center}.wpcf-header-inner h1{width:100%;margin-bottom:10px}.wpcf-form-result{float:none;margin-right:0;margin-bottom:10px}.wpcf-header-left,.wpcf-header-right,.wpcf-search{width:100%}.wpcf-search{text-align:center;margin-bottom:15px}.wpcf-footer{text-align:center}.wpcf-buttons{float:none}.wpcf-copyright{float:none;margin-top:10px}.wpcf-expand-all,.wpcf-nav,.wpcf-nav-background,.wpcf-reset-section{display:none!important}.wpcf-nav-normal+.wpcf-content{margin-left:0}.wpcf-section,.wpcf-section-title{display:block!important}.wpcf-field .wpcf-title{float:none;width:100%;margin-bottom:10px}.wpcf-field .wpcf-fieldset{float:none;width:100%}.wpcf-field-color .button.wp-picker-clear{padding:0 8px;line-height:2.14285714;min-height:32px}.wpcf-modal-inner{width:350px;height:400px}.wpcf-modal-content{height:237px}.wpcf-icon-dialog .wpcf-modal-inner{width:305px;height:380px}.wpcf-icon-dialog .wpcf-modal-content{height:267px}.wpcf-modal-icon .wpcf-modal-inner{width:330px;height:385px}.wpcf-modal-icon .wpcf-modal-content{height:252px}.wpcf-profile-options>.wpcf-field>.wpcf-title,.wpcf-taxonomy-edit-fields>.wpcf-field>.wpcf-title{float:none;width:100%;margin-bottom:10px}.wpcf-profile-options>.wpcf-field>.wpcf-fieldset,.wpcf-taxonomy-edit-fields>.wpcf-field>.wpcf-fieldset{float:none;width:100%}.wpcf-nav-menu-options>.wpcf-fields{margin-left:-10px;margin-right:-10px}.wpcf-nav-menu-options>.wpcf-fields>.wpcf-field{padding:10px}}.chosen-container{position:relative;vertical-align:middle;font-size:13px;user-select:none;max-width:390px;float:left}.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-color:#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}.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;width:100%;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;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;height:25px;min-height:25px}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:3px 20px 3px 6px;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;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:0;right:0;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{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}.text-center{text-align:center}.sp-after-text{padding-left:5px}.sp-wqvpro-framework .wpcf-nav-inline.wpcf-nav{position:inherit;float:none;width:100%;background:#f1f1f1;-webkit-box-shadow:inset 3px -1px 1px -1px rgba(0,0,0,.04);-moz-box-shadow:inset 3px -1px 1px -1px rgba(0,0,0,.04);box-shadow:inset 3px -1px 1px -1px rgba(0,0,0,.04)}.wpcf-theme-light .wpcf-nav-inline{border-bottom:0}.wpcf.wpcf-options .wpcf-nav ul li{margin-bottom:-1px}.wpcf.wpcf-options .wpcf-nav-background{width:235px;background-color:#e3e3e3}.wpcf.wpcf-options .wpcf-nav ul li a{font-size:13px;padding:16px 15px;line-height:1.4;border-bottom:2px solid #cecece;color:#fff;text-transform:uppercase;font-weight:600;margin-bottom:-1px}.wpcf.wpcf-options .wpcf-nav ul li.wpcf-tab-expanded a{color:#000}.wpcf.wpcf-options .wpcf-nav ul li.wpcf-tab-expanded a i{color:#4498be}.wpcf.wpcf-options .wpcf-nav ul li :after{display:none}.sp-field-button-set label input{display:none}.sp-field-button-set label span{background:linear-gradient(to bottom,#fff,#eee);padding:9px 17px;margin:0;vertical-align:middle;border:solid 1px #ccc;border-radius:0;cursor:pointer;border-right:none}.sp-field-button-set label input~span:hover{background:#fff}.sp-field-button-set label:first-child span{border-radius:4px 0 0 4px}.sp-field-button-set label:last-child span{border-radius:0 4px 4px 0;border-right:solid 1px #ccc}.sp-field-button-set label input:checked~span{background:linear-gradient(to bottom,#51ccfb,#058cbf);color:#fff;cursor:default;box-shadow:none}.wpcf-field-slider input{display:inline-block;width:42px;background:#fff}.wpcf-field-slider input[type=slider]:before{width:35px;height:35px;display:block;background:red;content:"%";position:absolute;right:0;top:0;float:right;margin-right:-20px;color:#fff}.wpcf--wrap{display:inline-block;margin:0 20px 0 0;width:50%;vertical-align:super}.wpcf-field-slider .ui-slider{position:relative;width:100%;height:8px;background:#f8f8f8;border:1px solid #e2e2e2;border-radius:2px}.wpcf-field-slider .ui-slider-range{background:#ddd;height:8px}.wpcf-field-slider .ui-slider-handle{height:16px;width:16px;background:#22aade;position:absolute;top:-4px;border-radius:2px;cursor:pointer}@media (min-width:1400px){.sp-metabox-framework .wpcf--wrap,.wpcf.wpcf-options .wpcf--wrap{width:35%}}div.sp-wqvpro-help .feature-section .sp-wqvpro-feature{background-color:#fff;padding:20px 20px;border:1px solid #ddd}div.sp-wqvpro-help .feature-section .sp-wqvpro-feature h3{font-size:16px;margin-top:18px}div.sp-wqvpro-help .feature-section i.sp-font{font-size:30px;display:block;color:#994294}div.sp-wqvpro-help.about-wrap h1{font-size:2.6em}div.sp-wqvpro-help .headline-feature.feature-video iframe{position:absolute;top:0;left:0;width:100%;height:100%}.about-wrap .plugin-section .three-col .col{background:#fff}.about-wrap .plugin-section .three-col .col .sp-wqvpro-plugin{border:1px solid #ddd}.about-wrap .plugin-section .three-col .col .sp-wqvpro-plugin .sp-wqvpro-plugin-content{padding-left:20px;padding-right:20px;padding-bottom:20px}.about-wrap .plugin-section .three-col .col .sp-wqvpro-plugin .sp-wqvpro-plugin-content h3{margin-top:20px;margin-bottom:8px;font-weight:500}.about-wrap .plugin-section .three-col .col .sp-wqvpro-plugin .sp-wqvpro-plugin-content p{margin-top:0}.about-wrap .plugin-section .sp-plugin-section-title h2{font-size:2.2em;color:#32373c;font-weight:400}.about-wrap .plugin-section .sp-plugin-section-title h4{font-weight:400;text-align:center;font-size:18px;color:#555d66;margin-top:15px;margin-bottom:40px}.sp-divider{width:100%;display:block;height:10px}.wpcf.wpcf-options .sp-font-preview{width:45%;padding:10px;border:1px solid #e6e6e6;color:#7b7b7b;margin-top:20px;background-color:#fff;font-size:16px}.wpcf_margin_field .sp-font-bottom,.wpcf_margin_field .sp-font-left,.wpcf_margin_field .sp-font-right,.wpcf_margin_field .sp-font-top{margin-right:30px}.wpcf_margin_field .sp-font-bottom:before,.wpcf_margin_field .sp-font-left:before,.wpcf_margin_field .sp-font-right:before,.wpcf_margin_field .sp-font-top:before{content:"px";position:absolute;top:19px;right:-20px;height:34px;width:29px;line-height:34px;text-align:center;background-color:#f5f5f5;display:block;border:1px solid #ddd;border-left:none}.wpcf.wpcf-options .sp-content .sp-section-title{background-color:#994294}.wpcf-field-carousel_type .wpcf--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}.wpcf-field-image_select .wpcf--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}.wpcf-field-image_select img{vertical-align:top}.wpcf-field-carousel_type input,.wpcf-field-image_select input{display:none}.wpcf-field-carousel_type .wpcf--image{background:#e8ecef;color:#7b8898;border:solid 3px #e8ecef;border-radius:2px;cursor:pointer;text-align:center;width:120px;height:80px;box-shadow:inset 0 0 0 3px #fff}.wpcf-field-carousel_type i{font-size:30px;width:32px;height:30px;margin-top:15px}.wpcf-field-carousel_type p{margin-top:5px;font-weight:500}.wpcf-field-carousel_type .wpcf--image.wpcf--active{border-color:#1ea4b0}.wpcf.wpcf-options .sp-field-sorter .sp-modules{width:100%}.wpcf.wpcf-options .wpcf-header-inner input{text-shadow:0 0 0;border:0;border-radius:0;height:38px;border-radius:4px;padding:0 16px;font-size:13px;margin-left:8px;text-transform:uppercase;-webkit-transition:all .4s;-moz-transition:all .4s;-ms-transition:all .4s;-o-transition:all .4s;transition:all .4s}.wpcf.wpcf-options .wpcf-header-inner input.button-primary{background-color:#02cc7b;color:#fff}.wpcf.wpcf-options .wpcf-header-inner input.button-primary:hover{background-color:#02bb71}.wpcf.wpcf-options .wpcf-header-inner input.wpcf-reset-section{background-color:#77777c;color:#fff;margin-left:8px}.wpcf.wpcf-options .wpcf-header-inner input.wpcf-reset-section:hover{background-color:#616169;color:#fff}.wpcf.wpcf-options .wpcf-nav ul li a{background:#efefef;color:#000;border-bottom:2px solid #cecece;padding:15px 15px;border-right:0;border-top:1px solid transparent;border-right:1px solid #cecece}.wpcf.wpcf-options .wpcf-nav ul li:last-child a{border-bottom:1px solid #cecece}.wpcf.wpcf-options .wpcf-nav ul li.wpcf-tab-expanded a{background-color:#fff;background-color:#fff;border-right:1px solid #fff;border-top:1px solid #fff;box-shadow:3px 0 0 0 #178087 inset}.wpcf.wpcf-options .wpcf-nav ul ul:before{background-color:transparent}.wpcf.wpcf-options .wpcf-nav ul ul{border-bottom:1px solid #cecece}.wpcf.wpcf-options .wpcf-nav ul ul li a{background-color:#f8fdff;padding:13px 15px 13px 24px}@media only screen and (max-width:782px){.wpcf.wpcf-options .wpcf-header-inner h1{float:none}}#wpcf_shortcode_options{border-top-color:#f1f1f1}#wpcf_shortcode_options .wpcf-nav ul li{margin-bottom:-1px}#wpcf_shortcode_options .wpcf-nav.wpcf-nav-metabox{border-right-color:#f1f1f1;border-right-color:#f1f1f1;background:#f1f1f1;margin-right:-2px}#wpcf_shortcode_options .wpcf-content{border-top:1px solid #e5e5e5;box-shadow:0 -1px 1px rgba(0,0,0,.04)}.wpcf-field.wpcf-field-carousel_type{padding-bottom:0}#sp_wpcp_upload_options .wpcf-field-carousel_type .wpcf-title,#sp_wpcp_upload_options .wpcf-field-gallery .wpcf-title,.wpcf-video-description .wpcf-title,.wpcf-video-field-wrapper>.wpcf-title,.wpcf_carousel_content_bg .wpcf-title,.wpcf_carousel_content_wrapper .wpcf-title{width:100%}#sp_wpcp_upload_options .wpcf-field-carousel_type .wpcf-fieldset,#sp_wpcp_upload_options .wpcf-field-gallery .wpcf-fieldset,.wpcf-video-description .wpcf-fieldset,.wpcf-video-field-wrapper>.wpcf-fieldset,.wpcf_carousel_content_bg .wpcf-fieldset,.wpcf_carousel_content_wrapper .wpcf-fieldset{margin-top:30px;margin-left:0;float:none;width:auto}.wpcf-field.wpcf-field-select.wpcf_taxonomy_operator .wpcf-fieldset,.wpcf-field.wpcf-field-select.wpcf_taxonomy_terms .wpcf-fieldset,.wpcf-field.wpcf-field-spinner .wpcf-fieldset,.wpcf-field.wpcf-field-switcher .wpcf-fieldset{position:relative}#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}#wpcf-section-sp_wpcp_display_shortcode_0,#wpcf-section-sp_wpcp_upload_options_0{display:block}.wpcf-field-icon_select figure:before,.wpcf-field-image_select figure:before{color:#fff;background-color:#1ea4b0}.wpcf-field-image_select .wpcf--active img{outline-color:#1ea4b0}.wpcf-field-image_select figure .sp-carousel-type{text-align:center;margin-bottom:0}.wpcf-field-image_select .wpcf--image img{color:#7b8898;margin-right:10px;outline:solid 3px transparent;border-radius:2px;cursor:pointer;text-align:center;width:80px;outline-offset:-3px}.wpcf-field-image_select .wpcf--image.wpcf--active img{outline-color:#1ea4b0}#sp_wpcp_upload_options .wpcp-admin-header{background-color:#157592;background:linear-gradient(-45deg,#22afba,#157592);padding:20px 26px;overflow:hidden;height:33px}#sp_wpcp_upload_options .wpcp-admin-header .support{margin-left:16px;float:right}#sp_wpcp_upload_options .wpcp-admin-header .support a{color:#fff;text-decoration:none;line-height:35px;font-size:15px;font-weight:500}#sp_wpcp_upload_options .wpcp-admin-header img{max-width:200px}.wpcf-field.wpcf-field-spinner .wpcf-help{left:110px}.wpcf-field-text.wpcf-field .wpcf-fieldset{position:relative}.wpcf-field-text.wpcf-field .wpcf-help{left:345px}.wpcf-field.wpcf-field-column .wpcf-help{position:static;top:auto;transform:translateY(0);padding:0;float:left}#sp_wpcp_display_shortcode .wpcf-field.wpcf-field-shortcode.wpcp-admin-footer{display:flex;padding:0;flex-wrap:wrap}.wpcf-field-shortcode.wpcp-admin-footer .wpcf-shortcode-selectable{background-color:rgba(82,179,217,.11);padding:10px 15px 10px 33px;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;background-image:url(../images/copy.svg);background-size:16px;background-position:8px center;background-repeat:no-repeat}.wpcf-field-shortcode.wpcp-admin-footer .sptp-copy-btn{width:16px;margin-left:13px;position:absolute;top:50%;margin-top:-8px}#wpcf-section-sp_wpcp_display_shortcode_1 .wpcf-field{display:flex;padding:0;flex-wrap:wrap}.wpcf-field-shortcode.wpcp-admin-footer .wpcf-scode-wrap:first-of-type{border-right:1px solid #ddd}.wpcf-field-shortcode.wpcp-admin-footer .wpcf-scode-wrap{padding-top:22px;padding-bottom:22px;text-align:center;width:49%}.wpcf-field-shortcode.wpcp-admin-footer .wpcf-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){.wpcf-field-shortcode.wpcp-admin-footer .wpcf-scode-wrap:first-of-type{border-right:none;border-bottom:1px solid #ddd}.wpcf-field-shortcode.wpcp-admin-footer .wpcf-scode-wrap{width:100%}}.wpcf-field.wpcf-field-checkbox .wpcf-help{display:inline-block;float:none}.wpcf-field.wpcf-field-button_set.wpcp_export{margin-top:0;padding-top:0}.wpcf-field-button_set.wpcp_export .wpcf--button:hover,.wpcf-field.wpcf-field-custom_import.wpcp_import button:hover{background:#135e96;border-color:#135e96;color:#fff}.wpcf-field-button_set.wpcp_export .wpcf--button,.wpcf-field.wpcf-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 .wpcf-field-select .wpcf-fieldset{position:relative}.wpcf-field.wpcf-field-custom_import.wpcp_import .wpcf-fieldset{position:relative}.wpcf-field.wpcf-field-custom_import.wpcp_import p{padding-bottom:0;margin-bottom:1px}.wpcf-field.wpcf-field-custom_import.wpcp_import button{margin-top:10px;padding-bottom:0}.wpcf-field.wpcf-field-custom_import.wpcp_import .wpcf-help{cursor:help;position:absolute;top:80%;transform:translateY(-50%);padding:5px;font-size:14px;color:#aaa;width:15px;left:64px}.wpcf-field.wpcf-field-select.wpcp_post_ids .chosen-container .chosen-drop{max-width:400px}.wpcf-field.wpcf-field-select.wpcp_post_ids{padding-top:0}.wpcf-options .wpcf-header-inner h1.export-import img{height:24px;height:24px;float:left;width:28px;margin-right:8px;padding-top:6px}.wpcf-options.wpcp_tools .wpcf-nav-options li:nth-child(1) a{background-image:url(../images/export-icon.svg)}.wpcf-options.wpcp_tools .wpcf-nav-options li:nth-child(2) a{background-image:url(../images/import.svg)}.wpcf-options.wpcp_tools .wpcf-nav-options li:nth-child(1) a.wpcf-active{background-image:url(../images/file-export-icon1.svg)}.wpcf-options.wpcp_tools .wpcf-nav-options li:nth-child(2) a.wpcf-active{background-image:url(../images/file-import-icon1.svg)}.wpcf-options.wpcp_tools .wpcf-nav-options ul li a{padding:15px 30px;background-size:14px;background-position:10px center;background-repeat:no-repeat}.wpcf-field-upload input{width:50%}.carousel_video_source_id .wpcf-help{position:static}.wpcf-field-carousel_type .wpcf--image:nth-child(4),.wpcf-field-carousel_type .wpcf--image:nth-child(5),.wpcf-field-carousel_type .wpcf--image:nth-child(6){pointer-events:none}.wpcf-field-carousel_type .wpcf--image{position:relative}.wpcf-field-carousel_type .wpcf--image label strong{position:absolute;top:3px;right:3px;background:#cbd6df;padding:0 5px;font-size:10px}.wpcf-field-button_set .wpcf--button.wpcf-pro-only,.wpcf-field-image_select .wpcf--image.wpcf-pro-only{color:rgba(85,85,85,.6)!important;pointer-events:none;position:relative}.wpcf-field-button_set .wpcf--button.wpcf-pro-only{background-color:rgba(247,247,247,.4)!important}.wpcf-field.wpcf-field-switcher.only_pro_switcher .wpcf--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}.wpcf-field.wpcf-field-switcher.only_pro_switcher .wpcf--switcher{background:#cbcfd0;pointer-events:none}.wpcf-field-button_set .wpcf--button.wpcf-pro-only:after,.wpcf-field-image_select .wpcf--image.wpcf-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}.wpcf-field-image_select .wpcf--image.wpcf-pro-only:after{top:2px;right:12px;border-radius:0 1px 0 0}.wpcf-field.wpcf-field-switcher.only_pro_switcher .sp_wpcp--switcher{background:#cbcfd0;pointer-events:none}.wpcf-field-column.wpcp_carousel_row_pro_only{opacity:.7;pointer-events:none}.wpcf-field-column.wpcp_carousel_row_pro_only .wpcf--inputs .wpcf--input:nth-child(5){position:relative}.wpcf-field-column.wpcp_carousel_row_pro_only .wpcf--inputs .wpcf--input:nth-child(5)::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;right:-20px}
admin/views/sp-framework/assets/images/checkerboard.png ADDED
Binary file
admin/views/{wpcfree-metabox → sp-framework}/assets/images/copy.svg RENAMED
File without changes
admin/views/{wpcfree-metabox → sp-framework}/assets/images/export-icon.svg RENAMED
File without changes
admin/views/{wpcfree-metabox → sp-framework}/assets/images/file-export-icon1.svg RENAMED
File without changes
admin/views/{wpcfree-metabox → sp-framework}/assets/images/file-import-icon1.svg RENAMED
File without changes
admin/views/{wpcfree-metabox → sp-framework}/assets/images/import.svg RENAMED
File without changes
admin/views/sp-framework/assets/images/wp-logo.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><rect x="0" fill="none" width="20" height="20"/><g><g fill="#fff"><path d="M20 10c0-5.52-4.48-10-10-10S0 4.48 0 10s4.48 10 10 10 10-4.48 10-10zM10 1.01c4.97 0 8.99 4.02 8.99 8.99s-4.02 8.99-8.99 8.99S1.01 14.97 1.01 10 5.03 1.01 10 1.01zM8.01 14.82L4.96 6.61c.49-.03 1.05-.08 1.05-.08.43-.05.38-1.01-.06-.99 0 0-1.29.1-2.13.1-.15 0-.33 0-.52-.01 1.44-2.17 3.9-3.6 6.7-3.6 2.09 0 3.99.79 5.41 2.09-.6-.08-1.45.35-1.45 1.42 0 .66.38 1.22.79 1.88.31.54.5 1.22.5 2.21 0 1.34-1.27 4.48-1.27 4.48l-2.71-7.5c.48-.03.75-.16.75-.16.43-.05.38-1.1-.05-1.08 0 0-1.3.11-2.14.11-.78 0-2.11-.11-2.11-.11-.43-.02-.48 1.06-.05 1.08l.84.08 1.12 3.04zm6.02 2.15L16.64 10s.67-1.69.39-3.81c.63 1.14.94 2.42.94 3.81 0 2.96-1.56 5.58-3.94 6.97zM2.68 6.77L6.5 17.25c-2.67-1.3-4.47-4.08-4.47-7.25 0-1.16.2-2.23.65-3.23zm7.45 4.53l2.29 6.25c-.75.27-1.57.42-2.42.42-.72 0-1.41-.11-2.06-.3z"/></g></g></svg>
admin/views/sp-framework/assets/images/wp-plugin-logo.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><rect x="0" fill="none" width="20" height="20"/><g><g fill="#fff"><path d="M13.11 4.36L9.87 7.6 8 5.73l3.24-3.24c.35-.34 1.05-.2 1.56.32.52.51.66 1.21.31 1.55zm-8 1.77l.91-1.12 9.01 9.01-1.19.84c-.71.71-2.63 1.16-3.82 1.16H6.14L4.9 17.26c-.59.59-1.54.59-2.12 0-.59-.58-.59-1.53 0-2.12l1.24-1.24v-3.88c0-1.13.4-3.19 1.09-3.89zm7.26 3.97l3.24-3.24c.34-.35 1.04-.21 1.55.31.52.51.66 1.21.31 1.55l-3.24 3.25z"/></g></g></svg>
admin/views/sp-framework/assets/js/main.js ADDED
@@ -0,0 +1,2632 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ; (function ($, window, document, undefined) {
3
+ 'use strict';
4
+
5
+ //
6
+ // Constants
7
+ //
8
+ var SP_WPCF = SP_WPCF || {};
9
+
10
+ SP_WPCF.funcs = {};
11
+
12
+ SP_WPCF.vars = {
13
+ onloaded: false,
14
+ $body: $('body'),
15
+ $window: $(window),
16
+ $document: $(document),
17
+ $form_warning: null,
18
+ is_confirm: false,
19
+ form_modified: false,
20
+ code_themes: [],
21
+ is_rtl: $('body').hasClass('rtl'),
22
+ };
23
+
24
+ //
25
+ // Helper Functions
26
+ //
27
+ SP_WPCF.helper = {
28
+
29
+ //
30
+ // Generate UID
31
+ //
32
+ uid: function (prefix) {
33
+ return (prefix || '') + Math.random().toString(36).substr(2, 9);
34
+ },
35
+
36
+ // Quote regular expression characters
37
+ //
38
+ preg_quote: function (str) {
39
+ return (str + '').replace(/(\[|\])/g, "\\$1");
40
+ },
41
+
42
+ //
43
+ // Reneme input names
44
+ //
45
+ name_nested_replace: function ($selector, field_id) {
46
+
47
+ var checks = [];
48
+ var regex = new RegExp(SP_WPCF.helper.preg_quote(field_id + '[\\d+]'), 'g');
49
+
50
+ $selector.find(':radio').each(function () {
51
+ if (this.checked || this.orginal_checked) {
52
+ this.orginal_checked = true;
53
+ }
54
+ });
55
+
56
+ $selector.each(function (index) {
57
+ $(this).find(':input').each(function () {
58
+ this.name = this.name.replace(regex, field_id + '[' + index + ']');
59
+ if (this.orginal_checked) {
60
+ this.checked = true;
61
+ }
62
+ });
63
+ });
64
+
65
+ },
66
+
67
+ //
68
+ // Debounce
69
+ //
70
+ debounce: function (callback, threshold, immediate) {
71
+ var timeout;
72
+ return function () {
73
+ var context = this, args = arguments;
74
+ var later = function () {
75
+ timeout = null;
76
+ if (!immediate) {
77
+ callback.apply(context, args);
78
+ }
79
+ };
80
+ var callNow = (immediate && !timeout);
81
+ clearTimeout(timeout);
82
+ timeout = setTimeout(later, threshold);
83
+ if (callNow) {
84
+ callback.apply(context, args);
85
+ }
86
+ };
87
+ },
88
+
89
+ //
90
+ // Get a cookie
91
+ //
92
+ get_cookie: function (name) {
93
+ var e
94
+
95
+ var b
96
+
97
+ var cookie = document.cookie
98
+
99
+ var p = name + '='
100
+
101
+ if (!cookie) {
102
+ return
103
+ }
104
+
105
+ b = cookie.indexOf('; ' + p)
106
+
107
+ if (b === -1) {
108
+ b = cookie.indexOf(p)
109
+
110
+ if (b !== 0) {
111
+ return null
112
+ }
113
+ } else {
114
+ b += 2
115
+ }
116
+
117
+ e = cookie.indexOf(';', b)
118
+
119
+ if (e === -1) {
120
+ e = cookie.length
121
+ }
122
+
123
+ return decodeURIComponent(cookie.substring(b + p.length, e))
124
+ },
125
+
126
+ //
127
+ // Set a cookie
128
+ //
129
+ set_cookie: function (name, value, expires, path, domain, secure) {
130
+ var d = new Date()
131
+
132
+ if (typeof expires === 'object' && expires.toGMTString) {
133
+ expires = expires.toGMTString()
134
+ } else if (parseInt(expires, 10)) {
135
+ d.setTime(d.getTime() + parseInt(expires, 10) * 1000)
136
+ expires = d.toGMTString()
137
+ } else {
138
+ expires = ''
139
+ }
140
+
141
+ document.cookie =
142
+ name +
143
+ '=' +
144
+ encodeURIComponent(value) +
145
+ (expires ? '; expires=' + expires : '') +
146
+ (path ? '; path=' + path : '') +
147
+ (domain ? '; domain=' + domain : '') +
148
+ (secure ? '; secure' : '')
149
+ },
150
+
151
+
152
+ };
153
+
154
+ //
155
+ // Custom clone for textarea and select clone() bug
156
+ //
157
+ $.fn.wpcf_clone = function () {
158
+
159
+ var base = $.fn.clone.apply(this, arguments),
160
+ clone = this.find('select').add(this.filter('select')),
161
+ cloned = base.find('select').add(base.filter('select'));
162
+
163
+ for (var i = 0; i < clone.length; ++i) {
164
+ for (var j = 0; j < clone[i].options.length; ++j) {
165
+
166
+ if (clone[i].options[j].selected === true) {
167
+ cloned[i].options[j].selected = true;
168
+ }
169
+
170
+ }
171
+ }
172
+
173
+ this.find(':radio').each(function () {
174
+ this.orginal_checked = this.checked;
175
+ });
176
+
177
+ return base;
178
+
179
+ };
180
+
181
+ //
182
+ // Expand All Options
183
+ //
184
+ $.fn.wpcf_expand_all = function () {
185
+ return this.each(function () {
186
+ $(this).on('click', function (e) {
187
+
188
+ e.preventDefault();
189
+ $('.wpcf-wrapper').toggleClass('wpcf-show-all');
190
+ $('.wpcf-section').wpcf_reload_script();
191
+ $(this).find('.fa').toggleClass('fa-indent').toggleClass('fa-outdent');
192
+
193
+ });
194
+ });
195
+ };
196
+
197
+ //
198
+ // Options Navigation
199
+ //
200
+ $.fn.wpcf_nav_options = function () {
201
+ return this.each(function () {
202
+
203
+ var $nav = $(this),
204
+ $window = $(window),
205
+ $wpwrap = $('#wpwrap'),
206
+ $links = $nav.find('a'),
207
+ $last;
208
+
209
+ $window.on('hashchange wpcf.hashchange', function () {
210
+
211
+ var hash = window.location.hash.replace('#tab=', '');
212
+ var slug = hash ? hash : $links.first().attr('href').replace('#tab=', '');
213
+ var $link = $('[data-tab-id="' + slug + '"]');
214
+
215
+ if ($link.length) {
216
+
217
+ $link.closest('.wpcf-tab-item').addClass('wpcf-tab-expanded').siblings().removeClass('wpcf-tab-expanded');
218
+
219
+ if ($link.next().is('ul')) {
220
+
221
+ $link = $link.next().find('li').first().find('a');
222
+ slug = $link.data('tab-id');
223
+
224
+ }
225
+
226
+ $links.removeClass('wpcf-active');
227
+ $link.addClass('wpcf-active');
228
+
229
+ if ($last) {
230
+ $last.addClass('hidden');
231
+ }
232
+
233
+ var $section = $('[data-section-id="' + slug + '"]');
234
+
235
+ $section.removeClass('hidden');
236
+ $section.wpcf_reload_script();
237
+
238
+ $('.wpcf-section-id').val($section.index() + 1);
239
+
240
+ $last = $section;
241
+
242
+ if ($wpwrap.hasClass('wp-responsive-open')) {
243
+ $('html, body').animate({ scrollTop: ($section.offset().top - 50) }, 200);
244
+ $wpwrap.removeClass('wp-responsive-open');
245
+ }
246
+
247
+ }
248
+
249
+ }).trigger('wpcf.hashchange');
250
+
251
+ });
252
+ };
253
+
254
+ //
255
+ // Metabox Tabs
256
+ //
257
+ // $.fn.wpcf_nav_metabox = function () {
258
+ // return this.each(function () {
259
+
260
+ // var $nav = $(this),
261
+ // $links = $nav.find('a'),
262
+ // $sections = $nav.parent().find('.wpcf-section'),
263
+ // $last;
264
+
265
+ // $links.each(function (index) {
266
+
267
+ // $(this).on('click', function (e) {
268
+
269
+ // e.preventDefault();
270
+
271
+ // var $link = $(this);
272
+
273
+ // $links.removeClass('wpcf-active');
274
+ // $link.addClass('wpcf-active');
275
+
276
+ // if ($last !== undefined) {
277
+ // $last.addClass('hidden');
278
+ // }
279
+
280
+ // var $section = $sections.eq(index);
281
+
282
+ // $section.removeClass('hidden');
283
+ // $section.wpcf_reload_script();
284
+
285
+ // $last = $section;
286
+
287
+ // });
288
+
289
+ // });
290
+
291
+ // $links.first().trigger('click');
292
+
293
+ // });
294
+ // };
295
+ //
296
+ // Metabox Tabs
297
+ //
298
+ $.fn.wpcf_nav_metabox = function () {
299
+ return this.each(function () {
300
+ var $nav = $(this)
301
+
302
+ var $links = $nav.find('a')
303
+
304
+ var unique_id = $nav.data('unique')
305
+
306
+ var post_id = $('#post_ID').val() || 'global'
307
+
308
+ var $last_section
309
+
310
+ var $last_link
311
+
312
+ $links.on('click', function (e) {
313
+ e.preventDefault()
314
+
315
+ var $link = $(this)
316
+
317
+ var section_id = $link.data('section')
318
+
319
+ if ($last_link !== undefined) {
320
+ $last_link.removeClass('wpcf-active')
321
+ }
322
+
323
+ if ($last_section !== undefined) {
324
+ $last_section.addClass('hidden');
325
+ }
326
+
327
+ $link.addClass('wpcf-active')
328
+
329
+ var $section = $('#wpcf-section-' + section_id)
330
+ $section.removeClass('hidden');
331
+ $section.wpcf_reload_script()
332
+
333
+ SP_WPCF.helper.set_cookie(
334
+ 'wpcf-last-metabox-tab-' + post_id + '-' + unique_id,
335
+ section_id
336
+ )
337
+
338
+ $last_section = $section
339
+ $last_link = $link
340
+ })
341
+
342
+ var get_cookie = SP_WPCF.helper.get_cookie(
343
+ 'wpcf-last-metabox-tab-' + post_id + '-' + unique_id
344
+ )
345
+
346
+ if (get_cookie) {
347
+ $nav.find('a[data-section="' + get_cookie + '"]').trigger('click')
348
+ } else {
349
+ $links.first('a').trigger('click')
350
+ }
351
+ })
352
+ }
353
+ //
354
+ // Metabox Page Templates Listener
355
+ //
356
+ $.fn.wpcf_page_templates = function () {
357
+ if (this.length) {
358
+
359
+ $(document).on('change', '.editor-page-attributes__template select, #page_template', function () {
360
+
361
+ var maybe_value = $(this).val() || 'default';
362
+
363
+ $('.wpcf-page-templates').removeClass('wpcf-metabox-show').addClass('wpcf-metabox-hide');
364
+ $('.wpcf-page-' + maybe_value.toLowerCase().replace(/[^a-zA-Z0-9]+/g, '-')).removeClass('wpcf-metabox-hide').addClass('wpcf-metabox-show');
365
+
366
+ });
367
+
368
+ }
369
+ };
370
+
371
+ //
372
+ // Metabox Post Formats Listener
373
+ //
374
+ $.fn.wpcf_post_formats = function () {
375
+ if (this.length) {
376
+
377
+ $(document).on('change', '.editor-post-format select, #formatdiv input[name="post_format"]', function () {
378
+
379
+ var maybe_value = $(this).val() || 'default';
380
+
381
+ // Fallback for classic editor version
382
+ maybe_value = (maybe_value === '0') ? 'default' : maybe_value;
383
+
384
+ $('.wpcf-post-formats').removeClass('wpcf-metabox-show').addClass('wpcf-metabox-hide');
385
+ $('.wpcf-post-format-' + maybe_value).removeClass('wpcf-metabox-hide').addClass('wpcf-metabox-show');
386
+
387
+ });
388
+
389
+ }
390
+ };
391
+
392
+ //
393
+ // Search
394
+ //
395
+ $.fn.wpcf_search = function () {
396
+ return this.each(function () {
397
+
398
+ var $this = $(this),
399
+ $input = $this.find('input');
400
+
401
+ $input.on('change keyup', function () {
402
+
403
+ var value = $(this).val(),
404
+ $wrapper = $('.wpcf-wrapper'),
405
+ $section = $wrapper.find('.wpcf-section'),
406
+ $fields = $section.find('> .wpcf-field:not(.wpcf-depend-on)'),
407
+ $titles = $fields.find('> .wpcf-title, .wpcf-search-tags');
408
+
409
+ if (value.length > 3) {
410
+
411
+ $fields.addClass('wpcf-metabox-hide');
412
+ $wrapper.addClass('wpcf-search-all');
413
+
414
+ $titles.each(function () {
415
+
416
+ var $title = $(this);
417
+
418
+ if ($title.text().match(new RegExp('.*?' + value + '.*?', 'i'))) {
419
+
420
+ var $field = $title.closest('.wpcf-field');
421
+
422
+ $field.removeClass('wpcf-metabox-hide');
423
+ $field.parent().wpcf_reload_script();
424
+
425
+ }
426
+
427
+ });
428
+
429
+ } else {
430
+
431
+ $fields.removeClass('wpcf-metabox-hide');
432
+ $wrapper.removeClass('wpcf-search-all');
433
+
434
+ }
435
+
436
+ });
437
+
438
+ });
439
+ };
440
+
441
+ //
442
+ // Sticky Header
443
+ //
444
+ $.fn.wpcf_sticky = function () {
445
+ return this.each(function () {
446
+
447
+ var $this = $(this),
448
+ $window = $(window),
449
+ $inner = $this.find('.wpcf-header-inner'),
450
+ padding = parseInt($inner.css('padding-left')) + parseInt($inner.css('padding-right')),
451
+ offset = 32,
452
+ scrollTop = 0,
453
+ lastTop = 0,
454
+ ticking = false,
455
+ stickyUpdate = function () {
456
+
457
+ var offsetTop = $this.offset().top,
458
+ stickyTop = Math.max(offset, offsetTop - scrollTop),
459
+ winWidth = $window.innerWidth();
460
+
461
+ if (stickyTop <= offset && winWidth > 782) {
462
+ $inner.css({ width: $this.outerWidth() - padding });
463
+ $this.css({ height: $this.outerHeight() }).addClass('wpcf-sticky');
464
+ } else {
465
+ $inner.removeAttr('style');
466
+ $this.removeAttr('style').removeClass('wpcf-sticky');
467
+ }
468
+
469
+ },
470
+ requestTick = function () {
471
+
472
+ if (!ticking) {
473
+ requestAnimationFrame(function () {
474
+ stickyUpdate();
475
+ ticking = false;
476
+ });
477
+ }
478
+
479
+ ticking = true;
480
+
481
+ },
482
+ onSticky = function () {
483
+
484
+ scrollTop = $window.scrollTop();
485
+ requestTick();
486
+
487
+ };
488
+
489
+ $window.on('scroll resize', onSticky);
490
+
491
+ onSticky();
492
+
493
+ });
494
+ };
495
+
496
+ //
497
+ // Dependency System
498
+ //
499
+ $.fn.wpcf_dependency = function () {
500
+ return this.each(function () {
501
+
502
+ var $this = $(this),
503
+ $fields = $this.children('[data-controller]');
504
+
505
+ if ($fields.length) {
506
+
507
+ var normal_ruleset = $.wpcf_deps.createRuleset(),
508
+ global_ruleset = $.wpcf_deps.createRuleset(),
509
+ normal_depends = [],
510
+ global_depends = [];
511
+
512
+ $fields.each(function () {
513
+
514
+ var $field = $(this),
515
+ controllers = $field.data('controller').split('|'),
516
+ conditions = $field.data('condition').split('|'),
517
+ values = $field.data('value').toString().split('|'),
518
+ is_global = $field.data('depend-global') ? true : false,
519
+ ruleset = (is_global) ? global_ruleset : normal_ruleset;
520
+
521
+ $.each(controllers, function (index, depend_id) {
522
+
523
+ var value = values[index] || '',
524
+ condition = conditions[index] || conditions[0];
525
+
526
+ ruleset = ruleset.createRule('[data-depend-id="' + depend_id + '"]', condition, value);
527
+
528
+ ruleset.include($field);
529
+
530
+ if (is_global) {
531
+ global_depends.push(depend_id);
532
+ } else {
533
+ normal_depends.push(depend_id);
534
+ }
535
+
536
+ });
537
+
538
+ });
539
+
540
+ if (normal_depends.length) {
541
+ $.wpcf_deps.enable($this, normal_ruleset, normal_depends);
542
+ }
543
+
544
+ if (global_depends.length) {
545
+ $.wpcf_deps.enable(SP_WPCF.vars.$body, global_ruleset, global_depends);
546
+ }
547
+
548
+ }
549
+
550
+ });
551
+ };
552
+ //
553
+ // Field: code_editor
554
+ //
555
+ $.fn.wpcf_field_code_editor = function () {
556
+ return this.each(function () {
557
+
558
+ if (typeof CodeMirror !== 'function') { return; }
559
+
560
+ var $this = $(this),
561
+ $textarea = $this.find('textarea'),
562
+ $inited = $this.find('.CodeMirror'),
563
+ data_editor = $textarea.data('editor');
564
+
565
+ if ($inited.length) {
566
+ $inited.remove();
567
+ }
568
+
569
+ var interval = setInterval(function () {
570
+ if ($this.is(':visible')) {
571
+
572
+ var code_editor = CodeMirror.fromTextArea($textarea[0], data_editor);
573
+
574
+ // load code-mirror theme css.
575
+ if (data_editor.theme !== 'default' && SP_WPCF.vars.code_themes.indexOf(data_editor.theme) === -1) {
576
+
577
+ var $cssLink = $('<link>');
578
+
579
+ $('#wpcf-codemirror-css').after($cssLink);
580
+
581
+ $cssLink.attr({
582
+ rel: 'stylesheet',
583
+ id: 'wpcf-codemirror-' + data_editor.theme + '-css',
584
+ href: data_editor.cdnURL + '/theme/' + data_editor.theme + '.min.css',
585
+ type: 'text/css',
586
+ media: 'all'
587
+ });
588
+
589
+ SP_WPCF.vars.code_themes.push(data_editor.theme);
590
+
591
+ }
592
+
593
+ CodeMirror.modeURL = data_editor.cdnURL + '/mode/%N/%N.min.js';
594
+ CodeMirror.autoLoadMode(code_editor, data_editor.mode);
595
+
596
+ code_editor.on('change', function (editor, event) {
597
+ $textarea.val(code_editor.getValue()).trigger('change');
598
+ });
599
+
600
+ clearInterval(interval);
601
+
602
+ }
603
+ });
604
+
605
+ });
606
+ };
607
+
608
+
609
+ //
610
+ // Field: gallery
611
+ //
612
+ $.fn.wpcf_field_gallery = function () {
613
+ return this.each(function () {
614
+
615
+ var $this = $(this),
616
+ $edit = $this.find('.wpcf-edit-gallery'),
617
+ $clear = $this.find('.wpcf-clear-gallery'),
618
+ $list = $this.find('ul.sp-gallery-images'),
619
+ $input = $this.find('input'),
620
+ $img = $this.find('img'),
621
+ wp_media_frame;
622
+
623
+ $this.on('click', '.wpcf-button, .wpcf-edit-gallery', function (e) {
624
+
625
+ var $el = $(this),
626
+ ids = $input.val(),
627
+ what = ($el.hasClass('wpcf-edit-gallery')) ? 'edit' : 'add',
628
+ state = (what === 'add' && !ids.length) ? 'gallery' : 'gallery-edit';
629
+
630
+ e.preventDefault();
631
+
632
+ if (typeof window.wp === 'undefined' || !window.wp.media || !window.wp.media.gallery) { return; }
633
+
634
+ // Open media with state
635
+ if (state === 'gallery') {
636
+
637
+ wp_media_frame = window.wp.media({
638
+ library: {
639
+ type: 'image'
640
+ },
641
+ frame: 'post',
642
+ state: 'gallery',
643
+ multiple: true
644
+ });
645
+
646
+ wp_media_frame.open();
647
+
648
+ } else {
649
+
650
+ wp_media_frame = window.wp.media.gallery.edit('[gallery ids="' + ids + '"]');
651
+
652
+ if (what === 'add') {
653
+ wp_media_frame.setState('gallery-library');
654
+ }
655
+
656
+ }
657
+
658
+ // Media Update
659
+ wp_media_frame.on('update', function (selection) {
660
+
661
+ $list.empty();
662
+
663
+ var selectedIds = selection.models.map(function (attachment) {
664
+
665
+ var item = attachment.toJSON();
666
+ var thumb = (item.sizes && item.sizes.thumbnail && item.sizes.thumbnail.url) ? item.sizes.thumbnail.url : item.url;
667
+
668
+ $list.append('<li><img src="' + thumb + '"></li>');
669
+
670
+ return item.id;
671
+
672
+ });
673
+
674
+ $input.val(selectedIds.join(',')).trigger('change');
675
+ $clear.removeClass('hidden');
676
+ $edit.removeClass('hidden');
677
+
678
+ });
679
+
680
+ });
681
+
682
+ $clear.on('click', function (e) {
683
+ e.preventDefault();
684
+ $list.empty();
685
+ $input.val('').trigger('change');
686
+ $clear.addClass('hidden');
687
+ $edit.addClass('hidden');
688
+ });
689
+
690
+ });
691
+
692
+ };
693
+
694
+
695
+ //
696
+ // Field: media
697
+ //
698
+ $.fn.wpcf_field_media = function () {
699
+ return this.each(function () {
700
+
701
+ var $this = $(this),
702
+ $upload_button = $this.find('.wpcf--button'),
703
+ $remove_button = $this.find('.wpcf--remove'),
704
+ $library = $upload_button.data('library') && $upload_button.data('library').split(',') || '',
705
+ $auto_attributes = ($this.hasClass('wpcf-assign-field-background')) ? $this.closest('.wpcf-field-background').find('.wpcf--auto-attributes') : false,
706
+ wp_media_frame;
707
+
708
+ $upload_button.on('click', function (e) {
709
+
710
+ e.preventDefault();
711
+
712
+ if (typeof window.wp === 'undefined' || !window.wp.media || !window.wp.media.gallery) {
713
+ return;
714
+ }
715
+
716
+ if (wp_media_frame) {
717
+ wp_media_frame.open();
718
+ return;
719
+ }
720
+
721
+ wp_media_frame = window.wp.media({
722
+ library: {
723
+ type: $library
724
+ }
725
+ });
726
+
727
+ wp_media_frame.on('select', function () {
728
+
729
+ var thumbnail;
730
+ var attributes = wp_media_frame.state().get('selection').first().attributes;
731
+ var preview_size = $upload_button.data('preview-size') || 'thumbnail';
732
+
733
+ if ($library.length && $library.indexOf(attributes.subtype) === -1 && $library.indexOf(attributes.type) === -1) {
734
+ return;
735
+ }
736
+
737
+ $this.find('.wpcf--id').val(attributes.id);
738
+ $this.find('.wpcf--width').val(attributes.width);
739
+ $this.find('.wpcf--height').val(attributes.height);
740
+ $this.find('.wpcf--alt').val(attributes.alt);
741
+ $this.find('.wpcf--title').val(attributes.title);
742
+ $this.find('.wpcf--description').val(attributes.description);
743
+
744
+ if (typeof attributes.sizes !== 'undefined' && typeof attributes.sizes.thumbnail !== 'undefined' && preview_size === 'thumbnail') {
745
+ thumbnail = attributes.sizes.thumbnail.url;
746
+ } else if (typeof attributes.sizes !== 'undefined' && typeof attributes.sizes.full !== 'undefined') {
747
+ thumbnail = attributes.sizes.full.url;
748
+ } else if (attributes.type === 'image') {
749
+ thumbnail = attributes.url;
750
+ } else {
751
+ thumbnail = attributes.icon;
752
+ }
753
+
754
+ console.log(attributes);
755
+
756
+ if ($auto_attributes) {
757
+ $auto_attributes.removeClass('wpcf--attributes-hidden');
758
+ }
759
+
760
+ $remove_button.removeClass('hidden');
761
+
762
+ $this.find('.wpcf--preview').removeClass('hidden');
763
+ $this.find('.wpcf--src').attr('src', thumbnail);
764
+ $this.find('.wpcf--thumbnail').val(thumbnail);
765
+ $this.find('.wpcf--url').val(attributes.url).trigger('change');
766
+
767
+ });
768
+
769
+ wp_media_frame.open();
770
+
771
+ });
772
+
773
+ $remove_button.on('click', function (e) {
774
+
775
+ e.preventDefault();
776
+
777
+ if ($auto_attributes) {
778
+ $auto_attributes.addClass('wpcf--attributes-hidden');
779
+ }
780
+
781
+ $remove_button.addClass('hidden');
782
+ $this.find('input').val('');
783
+ $this.find('.wpcf--preview').addClass('hidden');
784
+ $this.find('.wpcf--url').trigger('change');
785
+
786
+ });
787
+
788
+ });
789
+
790
+ };
791
+
792
+
793
+ //
794
+ // Field: slider
795
+ //
796
+ $.fn.wpcf_field_slider = function () {
797
+ return this.each(function () {
798
+
799
+ var $this = $(this),
800
+ $input = $this.find('input'),
801
+ $slider = $this.find('.wpcf-slider-ui'),
802
+ data = $input.data(),
803
+ value = $input.val() || 0;
804
+
805
+ if ($slider.hasClass('ui-slider')) {
806
+ $slider.empty();
807
+ }
808
+
809
+ $slider.slider({
810
+ range: 'min',
811
+ value: value,
812
+ min: data.min || 0,
813
+ max: data.max || 100,
814
+ step: data.step || 1,
815
+ slide: function (e, o) {
816
+ $input.val(o.value).trigger('change');
817
+ }
818
+ });
819
+
820
+ $input.on('keyup', function () {
821
+ $slider.slider('value', $input.val());
822
+ });
823
+
824
+ });
825
+ };
826
+
827
+
828
+
829
+ //
830
+ // Field: spinner
831
+ //
832
+ $.fn.wpcf_field_spinner = function () {
833
+ return this.each(function () {
834
+
835
+ var $this = $(this),
836
+ $input = $this.find('input'),
837
+ $inited = $this.find('.ui-button'),
838
+ data = $input.data();
839
+
840
+ if ($inited.length) {
841
+ $inited.remove();
842
+ }
843
+
844
+ $input.spinner({
845
+ min: data.min || 0,
846
+ max: data.max || 100,
847
+ step: data.step || 1,
848
+ create: function (event, ui) {
849
+ if (data.unit) {
850
+ $input.after('<span class="ui-button wpcf--unit">' + data.unit + '</span>');
851
+ }
852
+ },
853
+ spin: function (event, ui) {
854
+ $input.val(ui.value).trigger('change');
855
+ }
856
+ });
857
+
858
+ });
859
+ };
860
+
861
+ //
862
+ // Field: switcher
863
+ //
864
+ $.fn.wpcf_field_switcher = function () {
865
+ return this.each(function () {
866
+
867
+ var $switcher = $(this).find('.wpcf--switcher');
868
+
869
+ $switcher.on('click', function () {
870
+
871
+ var value = 0;
872
+ var $input = $switcher.find('input');
873
+
874
+ if ($switcher.hasClass('wpcf--active')) {
875
+ $switcher.removeClass('wpcf--active');
876
+ } else {
877
+ value = 1;
878
+ $switcher.addClass('wpcf--active');
879
+ }
880
+
881
+ $input.val(value).trigger('change');
882
+
883
+ });
884
+
885
+ });
886
+ };
887
+
888
+
889
+
890
+ //
891
+ // Field: typography
892
+ //
893
+ $.fn.wpcf_field_typography = function () {
894
+ return this.each(function () {
895
+
896
+ var base = this;
897
+ var $this = $(this);
898
+ var loaded_fonts = [];
899
+ var webfonts = wpcf_typography_json.webfonts;
900
+ var googlestyles = wpcf_typography_json.googlestyles;
901
+ var defaultstyles = wpcf_typography_json.defaultstyles;
902
+
903
+ //
904
+ //
905
+ // Sanitize google font subset
906
+ base.sanitize_subset = function (subset) {
907
+ subset = subset.replace('-ext', ' Extended');
908
+ subset = subset.charAt(0).toUpperCase() + subset.slice(1);
909
+ return subset;
910
+ };
911
+
912
+ //
913
+ //
914
+ // Sanitize google font styles (weight and style)
915
+ base.sanitize_style = function (style) {
916
+ return googlestyles[style] ? googlestyles[style] : style;
917
+ };
918
+
919
+ //
920
+ //
921
+ // Load google font
922
+ base.load_google_font = function (font_family, weight, style) {
923
+
924
+ if (font_family && typeof WebFont === 'object') {
925
+
926
+ weight = weight ? weight.replace('normal', '') : '';
927
+ style = style ? style.replace('normal', '') : '';
928
+
929
+ if (weight || style) {
930
+ font_family = font_family + ':' + weight + style;
931
+ }
932
+
933
+ if (loaded_fonts.indexOf(font_family) === -1) {
934
+ WebFont.load({ google: { families: [font_family] } });
935
+ }
936
+
937
+ loaded_fonts.push(font_family);
938
+
939
+ }
940
+
941
+ };
942
+
943
+ //
944
+ //
945
+ // Append select options
946
+ base.append_select_options = function ($select, options, condition, type, is_multi) {
947
+
948
+ $select.find('option').not(':first').remove();
949
+
950
+ var opts = '';
951
+
952
+ $.each(options, function (key, value) {
953
+
954
+ var selected;
955
+ var name = value;
956
+
957
+ // is_multi
958
+ if (is_multi) {
959
+ selected = (condition && condition.indexOf(value) !== -1) ? ' selected' : '';
960
+ } else {
961
+ selected = (condition && condition === value) ? ' selected' : '';
962
+ }
963
+
964
+ if (type === 'subset') {
965
+ name = base.sanitize_subset(value);
966
+ } else if (type === 'style') {
967
+ name = base.sanitize_style(value);
968
+ }
969
+
970
+ opts += '<option value="' + value + '"' + selected + '>' + name + '</option>';
971
+
972
+ });
973
+
974
+ $select.append(opts).trigger('wpcf.change').trigger('chosen:updated');
975
+
976
+ };
977
+
978
+ base.init = function () {
979
+
980
+ //
981
+ //
982
+ // Constants
983
+ var selected_styles = [];
984
+ var $typography = $this.find('.wpcf--typography');
985
+ var $type = $this.find('.wpcf--type');
986
+ var $styles = $this.find('.wpcf--block-font-style');
987
+ var unit = $typography.data('unit');
988
+ var line_height_unit = $typography.data('line-height-unit');
989
+ var exclude_fonts = $typography.data('exclude') ? $typography.data('exclude').split(',') : [];
990
+
991
+ //
992
+ //
993
+ // Chosen init
994
+ if ($this.find('.wpcf--chosen').length) {
995
+
996
+ var $chosen_selects = $this.find('select');
997
+
998
+ $chosen_selects.each(function () {
999
+
1000
+ var $chosen_select = $(this),
1001
+ $chosen_inited = $chosen_select.parent().find('.chosen-container');
1002
+
1003
+ if ($chosen_inited.length) {
1004
+ $chosen_inited.remove();
1005
+ }
1006
+
1007
+ $chosen_select.chosen({
1008
+ allow_single_deselect: true,
1009
+ disable_search_threshold: 15,
1010
+ width: '100%'
1011
+ });
1012
+
1013
+ });
1014
+
1015
+ }
1016
+
1017
+ //
1018
+ //
1019
+ // Font family select
1020
+ var $font_family_select = $this.find('.wpcf--font-family');
1021
+ var first_font_family = $font_family_select.val();
1022
+
1023
+ // Clear default font family select options
1024
+ $font_family_select.find('option').not(':first-child').remove();
1025
+
1026
+ var opts = '';
1027
+
1028
+ $.each(webfonts, function (type, group) {
1029
+
1030
+ // Check for exclude fonts
1031
+ if (exclude_fonts && exclude_fonts.indexOf(type) !== -1) { return; }
1032
+
1033
+ opts += '<optgroup label="' + group.label + '">';
1034
+
1035
+ $.each(group.fonts, function (key, value) {
1036
+
1037
+ // use key if value is object
1038
+ value = (typeof value === 'object') ? key : value;
1039
+ var selected = (value === first_font_family) ? ' selected' : '';
1040
+ opts += '<option value="' + value + '" data-type="' + type + '"' + selected + '>' + value + '</option>';
1041
+
1042
+ });
1043
+
1044
+ opts += '</optgroup>';
1045
+
1046
+ });
1047
+
1048
+ // Append google font select options
1049
+ $font_family_select.append(opts).trigger('chosen:updated');
1050
+
1051
+ //
1052
+ //
1053
+ // Font style select
1054
+ var $font_style_block = $this.find('.wpcf--block-font-style');
1055
+
1056
+ if ($font_style_block.length) {
1057
+
1058
+ var $font_style_select = $this.find('.wpcf--font-style-select');
1059
+ var first_style_value = $font_style_select.val() ? $font_style_select.val().replace(/normal/g, '') : '';
1060
+
1061
+ //
1062
+ // Font Style on on change listener
1063
+ $font_style_select.on('change wpcf.change', function (event) {
1064
+
1065
+ var style_value = $font_style_select.val();
1066
+
1067
+ // set a default value
1068
+ if (!style_value && selected_styles && selected_styles.indexOf('normal') === -1) {
1069
+ style_value = selected_styles[0];
1070
+ }
1071
+
1072
+ // set font weight, for eg. replacing 800italic to 800
1073
+ var font_normal = (style_value && style_value !== 'italic' && style_value === 'normal') ? 'normal' : '';
1074
+ var font_weight = (style_value && style_value !== 'italic' && style_value !== 'normal') ? style_value.replace('italic', '') : font_normal;
1075
+ var font_style = (style_value && style_value.substr(-6) === 'italic') ? 'italic' : '';
1076
+
1077
+ $this.find('.wpcf--font-weight').val(font_weight);
1078
+ $this.find('.wpcf--font-style').val(font_style);
1079
+
1080
+ });
1081
+
1082
+ //
1083
+ //
1084
+ // Extra font style select
1085
+ var $extra_font_style_block = $this.find('.wpcf--block-extra-styles');
1086
+
1087
+ if ($extra_font_style_block.length) {
1088
+ var $extra_font_style_select = $this.find('.wpcf--extra-styles');
1089
+ var first_extra_style_value = $extra_font_style_select.val();
1090
+ }
1091
+
1092
+ }
1093
+
1094
+ //
1095
+ //
1096
+ // Subsets select
1097
+ var $subset_block = $this.find('.wpcf--block-subset');
1098
+ if ($subset_block.length) {
1099
+ var $subset_select = $this.find('.wpcf--subset');
1100
+ var first_subset_select_value = $subset_select.val();
1101
+ var subset_multi_select = $subset_select.data('multiple') || false;
1102
+ }
1103
+
1104
+ //
1105
+ //
1106
+ // Backup font family
1107
+ var $backup_font_family_block = $this.find('.wpcf--block-backup-font-family');
1108
+
1109
+ //
1110
+ //
1111
+ // Font Family on Change Listener
1112
+ $font_family_select.on('change wpcf.change', function (event) {
1113
+
1114
+ // Hide subsets on change
1115
+ if ($subset_block.length) {
1116
+ $subset_block.addClass('hidden');
1117
+ }
1118
+
1119
+ // Hide extra font style on change
1120
+ if ($extra_font_style_block.length) {
1121
+ $extra_font_style_block.addClass('hidden');
1122
+ }
1123
+
1124
+ // Hide backup font family on change
1125
+ if ($backup_font_family_block.length) {
1126
+ $backup_font_family_block.addClass('hidden');
1127
+ }
1128
+
1129
+ var $selected = $font_family_select.find(':selected');
1130
+ var value = $selected.val();
1131
+ var type = $selected.data('type');
1132
+
1133
+ if (type && value) {
1134
+
1135
+ // Show backup fonts if font type google or custom
1136
+ if ((type === 'google' || type === 'custom') && $backup_font_family_block.length) {
1137
+ $backup_font_family_block.removeClass('hidden');
1138
+ }
1139
+
1140
+ // Appending font style select options
1141
+ if ($font_style_block.length) {
1142
+
1143
+ // set styles for multi and normal style selectors
1144
+ var styles = defaultstyles;
1145
+
1146
+ // Custom or gogle font styles
1147
+ if (type === 'google' && webfonts[type].fonts[value][0]) {
1148
+ styles = webfonts[type].fonts[value][0];
1149
+ } else if (type === 'custom' && webfonts[type].fonts[value]) {
1150
+ styles = webfonts[type].fonts[value];
1151
+ }
1152
+
1153
+ selected_styles = styles;
1154
+
1155
+ // Set selected style value for avoid load errors
1156
+ var set_auto_style = (styles.indexOf('normal') !== -1) ? 'normal' : styles[0];
1157
+ var set_style_value = (first_style_value && styles.indexOf(first_style_value) !== -1) ? first_style_value : set_auto_style;
1158
+
1159
+ // Append style select options
1160
+ base.append_select_options($font_style_select, styles, set_style_value, 'style');
1161
+
1162
+ // Clear first value
1163
+ first_style_value = false;
1164
+
1165
+ // Show style select after appended
1166
+ $font_style_block.removeClass('hidden');
1167
+
1168
+ // Appending extra font style select options
1169
+ if (type === 'google' && $extra_font_style_block.length && styles.length > 1) {
1170
+
1171
+ // Append extra-style select options
1172
+ base.append_select_options($extra_font_style_select, styles, first_extra_style_value, 'style', true);
1173
+
1174
+ // Clear first value
1175
+ first_extra_style_value = false;
1176
+
1177
+ // Show style select after appended
1178
+ $extra_font_style_block.removeClass('hidden');
1179
+
1180
+ }
1181
+
1182
+ }
1183
+
1184
+ // Appending google fonts subsets select options
1185
+ if (type === 'google' && $subset_block.length && webfonts[type].fonts[value][1]) {
1186
+
1187
+ var subsets = webfonts[type].fonts[value][1];
1188
+ var set_auto_subset = (subsets.length < 2 && subsets[0] !== 'latin') ? subsets[0] : '';
1189
+ var set_subset_value = (first_subset_select_value && subsets.indexOf(first_subset_select_value) !== -1) ? first_subset_select_value : set_auto_subset;
1190
+
1191
+ // check for multiple subset select
1192
+ set_subset_value = (subset_multi_select && first_subset_select_value) ? first_subset_select_value : set_subset_value;
1193
+
1194
+ base.append_select_options($subset_select, subsets, set_subset_value, 'subset', subset_multi_select);
1195
+
1196
+ first_subset_select_value = false;
1197
+
1198
+ $subset_block.removeClass('hidden');
1199
+
1200
+ }
1201
+
1202
+ } else {
1203
+
1204
+ // Clear Styles
1205
+ $styles.find(':input').val('');
1206
+
1207
+ // Clear subsets options if type and value empty
1208
+ if ($subset_block.length) {
1209
+ $subset_select.find('option').not(':first-child').remove();
1210
+ $subset_select.trigger('chosen:updated');
1211
+ }
1212
+
1213
+ // Clear font styles options if type and value empty
1214
+ if ($font_style_block.length) {
1215
+ $font_style_select.find('option').not(':first-child').remove();
1216
+ $font_style_select.trigger('chosen:updated');
1217
+ }
1218
+
1219
+ }
1220
+
1221
+ // Update font type input value
1222
+ $type.val(type);
1223
+
1224
+ }).trigger('wpcf.change');
1225
+
1226
+ //
1227
+ //
1228
+ // Preview
1229
+ var $preview_block = $this.find('.wpcf--block-preview');
1230
+
1231
+ if ($preview_block.length) {
1232
+
1233
+ var $preview = $this.find('.wpcf--preview');
1234
+
1235
+ // Set preview styles on change
1236
+ $this.on('change', SP_WPCF.helper.debounce(function (event) {
1237
+
1238
+ $preview_block.removeClass('hidden');
1239
+
1240
+ var font_family = $font_family_select.val(),
1241
+ font_weight = $this.find('.wpcf--font-weight').val(),
1242
+ font_style = $this.find('.wpcf--font-style').val(),
1243
+ font_size = $this.find('.wpcf--font-size').val(),
1244
+ font_variant = $this.find('.wpcf--font-variant').val(),
1245
+ line_height = $this.find('.wpcf--line-height').val(),
1246
+ text_align = $this.find('.wpcf--text-align').val(),
1247
+ text_transform = $this.find('.wpcf--text-transform').val(),
1248
+ text_decoration = $this.find('.wpcf--text-decoration').val(),
1249
+ text_color = $this.find('.wpcf--color').val(),
1250
+ word_spacing = $this.find('.wpcf--word-spacing').val(),
1251
+ letter_spacing = $this.find('.wpcf--letter-spacing').val(),
1252
+ custom_style = $this.find('.wpcf--custom-style').val(),
1253
+ type = $this.find('.wpcf--type').val();
1254
+
1255
+ if (type === 'google') {
1256
+ base.load_google_font(font_family, font_weight, font_style);
1257
+ }
1258
+
1259
+ var properties = {};
1260
+
1261
+ if (font_family) { properties.fontFamily = font_family; }
1262
+ if (font_weight) { properties.fontWeight = font_weight; }
1263
+ if (font_style) { properties.fontStyle = font_style; }
1264
+ if (font_variant) { properties.fontVariant = font_variant; }
1265
+ if (font_size) { properties.fontSize = font_size + unit; }
1266
+ if (line_height) { properties.lineHeight = line_height + line_height_unit; }
1267
+ if (letter_spacing) { properties.letterSpacing = letter_spacing + unit; }
1268
+ if (word_spacing) { properties.wordSpacing = word_spacing + unit; }
1269
+ if (text_align) { properties.textAlign = text_align; }
1270
+ if (text_transform) { properties.textTransform = text_transform; }
1271
+ if (text_decoration) { properties.textDecoration = text_decoration; }
1272
+ if (text_color) { properties.color = text_color; }
1273
+
1274
+ $preview.removeAttr('style');
1275
+
1276
+ // Customs style attribute
1277
+ if (custom_style) { $preview.attr('style', custom_style); }
1278
+
1279
+ $preview.css(properties);
1280
+
1281
+ }, 100));
1282
+
1283
+ // Preview black and white backgrounds trigger
1284
+ $preview_block.on('click', function () {
1285
+
1286
+ $preview.toggleClass('wpcf--black-background');
1287
+
1288
+ var $toggle = $preview_block.find('.wpcf--toggle');
1289
+
1290
+ if ($toggle.hasClass('fa-toggle-off')) {
1291
+ $toggle.removeClass('fa-toggle-off').addClass('fa-toggle-on');
1292
+ } else {
1293
+ $toggle.removeClass('fa-toggle-on').addClass('fa-toggle-off');
1294
+ }
1295
+
1296
+ });
1297
+
1298
+ if (!$preview_block.hasClass('hidden')) {
1299
+ $this.trigger('change');
1300
+ }
1301
+
1302
+ }
1303
+
1304
+ };
1305
+
1306
+ base.init();
1307
+
1308
+ });
1309
+ };
1310
+
1311
+
1312
+ //
1313
+ // Field: wp_editor
1314
+ //
1315
+ $.fn.wpcf_field_wp_editor = function () {
1316
+ return this.each(function () {
1317
+
1318
+ if (typeof window.wp.editor === 'undefined' || typeof window.tinyMCEPreInit === 'undefined' || typeof window.tinyMCEPreInit.mceInit.wpcf_wp_editor === 'undefined') {
1319
+ return;
1320
+ }
1321
+
1322
+ var $this = $(this),
1323
+ $editor = $this.find('.wpcf-wp-editor'),
1324
+ $textarea = $this.find('textarea');
1325
+
1326
+ // If there is wp-editor remove it for avoid dupliated wp-editor conflicts.
1327
+ var $has_wp_editor = $this.find('.wp-editor-wrap').length || $this.find('.mce-container').length;
1328
+
1329
+ if ($has_wp_editor) {
1330
+ $editor.empty();
1331
+ $editor.append($textarea);
1332
+ $textarea.css('display', '');
1333
+ }
1334
+
1335
+ // Generate a unique id
1336
+ var uid = SP_WPCF.helper.uid('wpcf-editor-');
1337
+
1338
+ $textarea.attr('id', uid);
1339
+
1340
+ // Get default editor settings
1341
+ var default_editor_settings = {
1342
+ tinymce: window.tinyMCEPreInit.mceInit.wpcf_wp_editor,
1343
+ quicktags: window.tinyMCEPreInit.qtInit.wpcf_wp_editor
1344
+ };
1345
+
1346
+ // Get default editor settings
1347
+ var field_editor_settings = $editor.data('editor-settings');
1348
+
1349
+ // Callback for old wp editor
1350
+ var wpEditor = wp.oldEditor ? wp.oldEditor : wp.editor;
1351
+
1352
+ if (wpEditor && wpEditor.hasOwnProperty('autop')) {
1353
+ wp.editor.autop = wpEditor.autop;
1354
+ wp.editor.removep = wpEditor.removep;
1355
+ wp.editor.initialize = wpEditor.initialize;
1356
+ }
1357
+
1358
+ // Add on change event handle
1359
+ var editor_on_change = function (editor) {
1360
+ editor.on('change keyup', function () {
1361
+ var value = (field_editor_settings.wpautop) ? editor.getContent() : wp.editor.removep(editor.getContent());
1362
+ $textarea.val(value).trigger('change');
1363
+ });
1364
+ };
1365
+
1366
+ // Extend editor selector and on change event handler
1367
+ default_editor_settings.tinymce = $.extend({}, default_editor_settings.tinymce, { selector: '#' + uid, setup: editor_on_change });
1368
+
1369
+ // Override editor tinymce settings
1370
+ if (field_editor_settings.tinymce === false) {
1371
+ default_editor_settings.tinymce = false;
1372
+ $editor.addClass('wpcf-no-tinymce');
1373
+ }
1374
+
1375
+ // Override editor quicktags settings
1376
+ if (field_editor_settings.quicktags === false) {
1377
+ default_editor_settings.quicktags = false;
1378
+ $editor.addClass('wpcf-no-quicktags');
1379
+ }
1380
+
1381
+ // Wait until :visible
1382
+ var interval = setInterval(function () {
1383
+ if ($this.is(':visible')) {
1384
+ window.wp.editor.initialize(uid, default_editor_settings);
1385
+ clearInterval(interval);
1386
+ }
1387
+ });
1388
+
1389
+ // Add Media buttons
1390
+ if (field_editor_settings.media_buttons && window.wpcf_media_buttons) {
1391
+
1392
+ var $editor_buttons = $editor.find('.wp-media-buttons');
1393
+
1394
+ if ($editor_buttons.length) {
1395
+
1396
+ $editor_buttons.find('.wpcf-shortcode-button').data('editor-id', uid);
1397
+
1398
+ } else {
1399
+
1400
+ var $media_buttons = $(window.wpcf_media_buttons);
1401
+
1402
+ $media_buttons.find('.wpcf-shortcode-button').data('editor-id', uid);
1403
+
1404
+ $editor.prepend($media_buttons);
1405
+
1406
+ }
1407
+
1408
+ }
1409
+
1410
+ });
1411
+
1412
+ };
1413
+
1414
+ //
1415
+ // Confirm
1416
+ //
1417
+ $.fn.wpcf_confirm = function () {
1418
+ return this.each(function () {
1419
+ $(this).on('click', function (e) {
1420
+
1421
+ var confirm_text = $(this).data('confirm') || window.wpcf_vars.i18n.confirm;
1422
+ var confirm_answer = confirm(confirm_text);
1423
+
1424
+ if (confirm_answer) {
1425
+ SP_WPCF.vars.is_confirm = true;
1426
+ SP_WPCF.vars.form_modified = false;
1427
+ } else {
1428
+ e.preventDefault();
1429
+ return false;
1430
+ }
1431
+
1432
+ });
1433
+ });
1434
+ };
1435
+
1436
+ $.fn.serializeObject = function () {
1437
+
1438
+ var obj = {};
1439
+
1440
+ $.each(this.serializeArray(), function (i, o) {
1441
+ var n = o.name,
1442
+ v = o.value;
1443
+
1444
+ obj[n] = obj[n] === undefined ? v
1445
+ : $.isArray(obj[n]) ? obj[n].concat(v)
1446
+ : [obj[n], v];
1447
+ });
1448
+
1449
+ return obj;
1450
+
1451
+ };
1452
+
1453
+ //
1454
+ // Options Save
1455
+ //
1456
+ $.fn.wpcf_save = function () {
1457
+ return this.each(function () {
1458
+
1459
+ var $this = $(this),
1460
+ $buttons = $('.wpcf-save'),
1461
+ $panel = $('.wpcf-options'),
1462
+ flooding = false,
1463
+ timeout;
1464
+
1465
+ $this.on('click', function (e) {
1466
+
1467
+ if (!flooding) {
1468
+
1469
+ var $text = $this.data('save'),
1470
+ $value = $this.val();
1471
+
1472
+ $buttons.attr('value', $text);
1473
+
1474
+ if ($this.hasClass('wpcf-save-ajax')) {
1475
+
1476
+ e.preventDefault();
1477
+
1478
+ $panel.addClass('wpcf-saving');
1479
+ $buttons.prop('disabled', true);
1480
+
1481
+ window.wp.ajax.post('wpcf_' + $panel.data('unique') + '_ajax_save', {
1482
+ data: $('#wpcf-form').serializeJSONSP_WPCF()
1483
+ })
1484
+ .done(function (response) {
1485
+
1486
+ // clear errors
1487
+ $('.wpcf-error').remove();
1488
+
1489
+ if (Object.keys(response.errors).length) {
1490
+
1491
+ var error_icon = '<i class="wpcf-label-error wpcf-error">!</i>';
1492
+
1493
+ $.each(response.errors, function (key, error_message) {
1494
+
1495
+ var $field = $('[data-depend-id="' + key + '"]'),
1496
+ $link = $('a[href="#tab=' + $field.closest('.wpcf-section').data('section-id') + '"]'),
1497
+ $tab = $link.closest('.wpcf-tab-item');
1498
+
1499
+ $field.closest('.wpcf-fieldset').append('<p class="wpcf-error wpcf-error-text">' + error_message + '</p>');
1500
+
1501
+ if (!$link.find('.wpcf-error').length) {
1502
+ $link.append(error_icon);
1503
+ }
1504
+
1505
+ if (!$tab.find('.wpcf-arrow .wpcf-error').length) {
1506
+ $tab.find('.wpcf-arrow').append(error_icon);
1507
+ }
1508
+
1509
+ });
1510
+
1511
+ }
1512
+
1513
+ $panel.removeClass('wpcf-saving');
1514
+ $buttons.prop('disabled', false).attr('value', $value);
1515
+ flooding = false;
1516
+
1517
+ SP_WPCF.vars.form_modified = false;
1518
+ SP_WPCF.vars.$form_warning.hide();
1519
+
1520
+ clearTimeout(timeout);
1521
+
1522
+ var $result_success = $('.wpcf-form-success');
1523
+ $result_success.empty().append(response.notice).fadeIn('fast', function () {
1524
+ timeout = setTimeout(function () {
1525
+ $result_success.fadeOut('fast');
1526
+ }, 1000);
1527
+ });
1528
+
1529
+ })
1530
+ .fail(function (response) {
1531
+ alert(response.error);
1532
+ });
1533
+
1534
+ } else {
1535
+
1536
+ SP_WPCF.vars.form_modified = false;
1537
+
1538
+ }
1539
+
1540
+ }
1541
+
1542
+ flooding = true;
1543
+
1544
+ });
1545
+
1546
+ });
1547
+ };
1548
+
1549
+ //
1550
+ // Option Framework
1551
+ //
1552
+ $.fn.wpcf_options = function () {
1553
+ return this.each(function () {
1554
+
1555
+ var $this = $(this),
1556
+ $content = $this.find('.wpcf-content'),
1557
+ $form_success = $this.find('.wpcf-form-success'),
1558
+ $form_warning = $this.find('.wpcf-form-warning'),
1559
+ $save_button = $this.find('.wpcf-header .wpcf-save');
1560
+
1561
+ SP_WPCF.vars.$form_warning = $form_warning;
1562
+
1563
+ // Shows a message white leaving theme options without saving
1564
+ if ($form_warning.length) {
1565
+
1566
+ window.onbeforeunload = function () {
1567
+ return (SP_WPCF.vars.form_modified) ? true : undefined;
1568
+ };
1569
+
1570
+ $content.on('change keypress', ':input', function () {
1571
+ if (!SP_WPCF.vars.form_modified) {
1572
+ $form_success.hide();
1573
+ $form_warning.fadeIn('fast');
1574
+ SP_WPCF.vars.form_modified = true;
1575
+ }
1576
+ });
1577
+
1578
+ }
1579
+
1580
+ if ($form_success.hasClass('wpcf-form-show')) {
1581
+ setTimeout(function () {
1582
+ $form_success.fadeOut('fast');
1583
+ }, 1000);
1584
+ }
1585
+
1586
+ $(document).keydown(function (event) {
1587
+ if ((event.ctrlKey || event.metaKey) && event.which === 83) {
1588
+ $save_button.trigger('click');
1589
+ event.preventDefault();
1590
+ return false;
1591
+ }
1592
+ });
1593
+
1594
+ });
1595
+ };
1596
+
1597
+ //
1598
+ // Taxonomy Framework
1599
+ //
1600
+ $.fn.wpcf_taxonomy = function () {
1601
+ return this.each(function () {
1602
+
1603
+ var $this = $(this),
1604
+ $form = $this.parents('form');
1605
+
1606
+ if ($form.attr('id') === 'addtag') {
1607
+
1608
+ var $submit = $form.find('#submit'),
1609
+ $cloned = $this.find('.wpcf-field').wpcf_clone();
1610
+
1611
+ $submit.on('click', function () {
1612
+
1613
+ if (!$form.find('.form-required').hasClass('form-invalid')) {
1614
+
1615
+ $this.data('inited', false);
1616
+
1617
+ $this.empty();
1618
+
1619
+ $this.html($cloned);
1620
+
1621
+ $cloned = $cloned.wpcf_clone();
1622
+
1623
+ $this.wpcf_reload_script();
1624
+
1625
+ }
1626
+
1627
+ });
1628
+
1629
+ }
1630
+
1631
+ });
1632
+ };
1633
+
1634
+ //
1635
+ // Shortcode Framework
1636
+ //
1637
+ $.fn.wpcf_shortcode = function () {
1638
+
1639
+ var base = this;
1640
+
1641
+ base.shortcode_parse = function (serialize, key) {
1642
+
1643
+ var shortcode = '';
1644
+
1645
+ $.each(serialize, function (shortcode_key, shortcode_values) {
1646
+
1647
+ key = (key) ? key : shortcode_key;
1648
+
1649
+ shortcode += '[' + key;
1650
+
1651
+ $.each(shortcode_values, function (shortcode_tag, shortcode_value) {
1652
+
1653
+ if (shortcode_tag === 'content') {
1654
+
1655
+ shortcode += ']';
1656
+ shortcode += shortcode_value;
1657
+ shortcode += '[/' + key + '';
1658
+
1659
+ } else {
1660
+
1661
+ shortcode += base.shortcode_tags(shortcode_tag, shortcode_value);
1662
+
1663
+ }
1664
+
1665
+ });
1666
+
1667
+ shortcode += ']';
1668
+
1669
+ });
1670
+
1671
+ return shortcode;
1672
+
1673
+ };
1674
+
1675
+ base.shortcode_tags = function (shortcode_tag, shortcode_value) {
1676
+
1677
+ var shortcode = '';
1678
+
1679
+ if (shortcode_value !== '') {
1680
+
1681
+ if (typeof shortcode_value === 'object' && !$.isArray(shortcode_value)) {
1682
+
1683
+ $.each(shortcode_value, function (sub_shortcode_tag, sub_shortcode_value) {
1684
+
1685
+ // sanitize spesific key/value
1686
+ switch (sub_shortcode_tag) {
1687
+
1688
+ case 'background-image':
1689
+ sub_shortcode_value = (sub_shortcode_value.url) ? sub_shortcode_value.url : '';
1690
+ break;
1691
+
1692
+ }
1693
+
1694
+ if (sub_shortcode_value !== '') {
1695
+ shortcode += ' ' + sub_shortcode_tag.replace('-', '_') + '="' + sub_shortcode_value.toString() + '"';
1696
+ }
1697
+
1698
+ });
1699
+
1700
+ } else {
1701
+
1702
+ shortcode += ' ' + shortcode_tag.replace('-', '_') + '="' + shortcode_value.toString() + '"';
1703
+
1704
+ }
1705
+
1706
+ }
1707
+
1708
+ return shortcode;
1709
+
1710
+ };
1711
+
1712
+ base.insertAtChars = function (_this, currentValue) {
1713
+
1714
+ var obj = (typeof _this[0].name !== 'undefined') ? _this[0] : _this;
1715
+
1716
+ if (obj.value.length && typeof obj.selectionStart !== 'undefined') {
1717
+ obj.focus();
1718
+ return obj.value.substring(0, obj.selectionStart) + currentValue + obj.value.substring(obj.selectionEnd, obj.value.length);
1719
+ } else {
1720
+ obj.focus();
1721
+ return currentValue;
1722
+ }
1723
+
1724
+ };
1725
+
1726
+ base.send_to_editor = function (html, editor_id) {
1727
+
1728
+ var tinymce_editor;
1729
+
1730
+ if (typeof tinymce !== 'undefined') {
1731
+ tinymce_editor = tinymce.get(editor_id);
1732
+ }
1733
+
1734
+ if (tinymce_editor && !tinymce_editor.isHidden()) {
1735
+ tinymce_editor.execCommand('mceInsertContent', false, html);
1736
+ } else {
1737
+ var $editor = $('#' + editor_id);
1738
+ $editor.val(base.insertAtChars($editor, html)).trigger('change');
1739
+ }
1740
+
1741
+ };
1742
+
1743
+ return this.each(function () {
1744
+
1745
+ var $modal = $(this),
1746
+ $load = $modal.find('.wpcf-modal-load'),
1747
+ $content = $modal.find('.wpcf-modal-content'),
1748
+ $insert = $modal.find('.wpcf-modal-insert'),
1749
+ $loading = $modal.find('.wpcf-modal-loading'),
1750
+ $select = $modal.find('select'),
1751
+ modal_id = $modal.data('modal-id'),
1752
+ nonce = $modal.data('nonce'),
1753
+ editor_id,
1754
+ target_id,
1755
+ gutenberg_id,
1756
+ sc_key,
1757
+ sc_name,
1758
+ sc_view,
1759
+ sc_group,
1760
+ $cloned,
1761
+ $button;
1762
+
1763
+ $(document).on('click', '.wpcf-shortcode-button[data-modal-id="' + modal_id + '"]', function (e) {
1764
+
1765
+ e.preventDefault();
1766
+
1767
+ $button = $(this);
1768
+ editor_id = $button.data('editor-id') || false;
1769
+ target_id = $button.data('target-id') || false;
1770
+ gutenberg_id = $button.data('gutenberg-id') || false;
1771
+
1772
+ $modal.removeClass('hidden');
1773
+
1774
+ // single usage trigger first shortcode
1775
+ if ($modal.hasClass('wpcf-shortcode-single') && sc_name === undefined) {
1776
+ $select.trigger('change');
1777
+ }
1778
+
1779
+ });
1780
+
1781
+ $select.on('change', function () {
1782
+
1783
+ var $option = $(this);
1784
+ var $selected = $option.find(':selected');
1785
+
1786
+ sc_key = $option.val();
1787
+ sc_name = $selected.data('shortcode');
1788
+ sc_view = $selected.data('view') || 'normal';
1789
+ sc_group = $selected.data('group') || sc_name;
1790
+
1791
+ $load.empty();
1792
+
1793
+ if (sc_key) {
1794
+
1795
+ $loading.show();
1796
+
1797
+ window.wp.ajax.post('wpcf-get-shortcode-' + modal_id, {
1798
+ shortcode_key: sc_key,
1799
+ nonce: nonce
1800
+ })
1801
+ .done(function (response) {
1802
+
1803
+ $loading.hide();
1804
+
1805
+ var $appended = $(response.content).appendTo($load);
1806
+
1807
+ $insert.parent().removeClass('hidden');
1808
+
1809
+ $cloned = $appended.find('.wpcf--repeat-shortcode').wpcf_clone();
1810
+
1811
+ $appended.wpcf_reload_script();
1812
+ $appended.find('.wpcf-fields').wpcf_reload_script();
1813
+
1814
+ });
1815
+
1816
+ } else {
1817
+
1818
+ $insert.parent().addClass('hidden');
1819
+
1820
+ }
1821
+
1822
+ });
1823
+
1824
+ $insert.on('click', function (e) {
1825
+
1826
+ e.preventDefault();
1827
+
1828
+ if ($insert.prop('disabled') || $insert.attr('disabled')) { return; }
1829
+
1830
+ var shortcode = '';
1831
+ var serialize = $modal.find('.wpcf-field:not(.wpcf-depend-on)').find(':input:not(.ignore)').serializeObjectSP_WPCF();
1832
+
1833
+ switch (sc_view) {
1834
+
1835
+ case 'contents':
1836
+ var contentsObj = (sc_name) ? serialize[sc_name] : serialize;
1837
+ $.each(contentsObj, function (sc_key, sc_value) {
1838
+ var sc_tag = (sc_name) ? sc_name : sc_key;
1839
+ shortcode += '[' + sc_tag + ']' + sc_value + '[/' + sc_tag + ']';
1840
+ });
1841
+ break;
1842
+
1843
+ case 'group':
1844
+
1845
+ shortcode += '[' + sc_name;
1846
+ $.each(serialize[sc_name], function (sc_key, sc_value) {
1847
+ shortcode += base.shortcode_tags(sc_key, sc_value);
1848
+ });
1849
+ shortcode += ']';
1850
+ shortcode += base.shortcode_parse(serialize[sc_group], sc_group);
1851
+ shortcode += '[/' + sc_name + ']';
1852
+
1853
+ break;
1854
+
1855
+ case 'repeater':
1856
+ shortcode += base.shortcode_parse(serialize[sc_group], sc_group);
1857
+ break;
1858
+
1859
+ default:
1860
+ shortcode += base.shortcode_parse(serialize);
1861
+ break;
1862
+
1863
+ }
1864
+
1865
+ shortcode = (shortcode === '') ? '[' + sc_name + ']' : shortcode;
1866
+
1867
+ if (gutenberg_id) {
1868
+
1869
+ var content = window.wpcf_gutenberg_props.attributes.hasOwnProperty('shortcode') ? window.wpcf_gutenberg_props.attributes.shortcode : '';
1870
+ window.wpcf_gutenberg_props.setAttributes({ shortcode: content + shortcode });
1871
+
1872
+ } else if (editor_id) {
1873
+
1874
+ base.send_to_editor(shortcode, editor_id);
1875
+
1876
+ } else {
1877
+
1878
+ var $textarea = (target_id) ? $(target_id) : $button.parent().find('textarea');
1879
+ $textarea.val(base.insertAtChars($textarea, shortcode)).trigger('change');
1880
+
1881
+ }
1882
+
1883
+ $modal.addClass('hidden');
1884
+
1885
+ });
1886
+
1887
+ $modal.on('click', '.wpcf--repeat-button', function (e) {
1888
+
1889
+ e.preventDefault();
1890
+
1891
+ var $repeatable = $modal.find('.wpcf--repeatable');
1892
+ var $new_clone = $cloned.wpcf_clone();
1893
+ var $remove_btn = $new_clone.find('.wpcf-repeat-remove');
1894
+
1895
+ var $appended = $new_clone.appendTo($repeatable);
1896
+
1897
+ $new_clone.find('.wpcf-fields').wpcf_reload_script();
1898
+
1899
+ SP_WPCF.helper.name_nested_replace($modal.find('.wpcf--repeat-shortcode'), sc_group);
1900
+
1901
+ $remove_btn.on('click', function () {
1902
+
1903
+ $new_clone.remove();
1904
+
1905
+ SP_WPCF.helper.name_nested_replace($modal.find('.wpcf--repeat-shortcode'), sc_group);
1906
+
1907
+ });
1908
+
1909
+ });
1910
+
1911
+ $modal.on('click', '.wpcf-modal-close, .wpcf-modal-overlay', function () {
1912
+ $modal.addClass('hidden');
1913
+ });
1914
+
1915
+ });
1916
+ };
1917
+
1918
+ //
1919
+ // WP Color Picker
1920
+ //
1921
+ if (typeof Color === 'function') {
1922
+
1923
+ Color.prototype.toString = function () {
1924
+
1925
+ if (this._alpha < 1) {
1926
+ return this.toCSS('rgba', this._alpha).replace(/\s+/g, '');
1927
+ }
1928
+
1929
+ var hex = parseInt(this._color, 10).toString(16);
1930
+
1931
+ if (this.error) { return ''; }
1932
+
1933
+ if (hex.length < 6) {
1934
+ for (var i = 6 - hex.length - 1; i >= 0; i--) {
1935
+ hex = '0' + hex;
1936
+ }
1937
+ }
1938
+
1939
+ return '#' + hex;
1940
+
1941
+ };
1942
+
1943
+ }
1944
+
1945
+ SP_WPCF.funcs.parse_color = function (color) {
1946
+
1947
+ var value = color.replace(/\s+/g, ''),
1948
+ trans = (value.indexOf('rgba') !== -1) ? parseFloat(value.replace(/^.*,(.+)\)/, '$1') * 100) : 100,
1949
+ rgba = (trans < 100) ? true : false;
1950
+
1951
+ return { value: value, transparent: trans, rgba: rgba };
1952
+
1953
+ };
1954
+
1955
+ $.fn.wpcf_color = function () {
1956
+ return this.each(function () {
1957
+
1958
+ var $input = $(this),
1959
+ picker_color = SP_WPCF.funcs.parse_color($input.val()),
1960
+ palette_color = window.wpcf_vars.color_palette.length ? window.wpcf_vars.color_palette : true,
1961
+ $container;
1962
+
1963
+ // Destroy and Reinit
1964
+ if ($input.hasClass('wp-color-picker')) {
1965
+ $input.closest('.wp-picker-container').after($input).remove();
1966
+ }
1967
+
1968
+ $input.wpColorPicker({
1969
+ palettes: palette_color,
1970
+ change: function (event, ui) {
1971
+
1972
+ var ui_color_value = ui.color.toString();
1973
+
1974
+ $container.removeClass('wpcf--transparent-active');
1975
+ $container.find('.wpcf--transparent-offset').css('background-color', ui_color_value);
1976
+ $input.val(ui_color_value).trigger('change');
1977
+
1978
+ },
1979
+ create: function () {
1980
+
1981
+ $container = $input.closest('.wp-picker-container');
1982
+
1983
+ var a8cIris = $input.data('a8cIris'),
1984
+ $transparent_wrap = $('<div class="wpcf--transparent-wrap">' +
1985
+ '<div class="wpcf--transparent-slider"></div>' +
1986
+ '<div class="wpcf--transparent-offset"></div>' +
1987
+ '<div class="wpcf--transparent-text"></div>' +
1988
+ '<div class="wpcf--transparent-button">transparent <i class="fa fa-toggle-off"></i></div>' +
1989
+ '</div>').appendTo($container.find('.wp-picker-holder')),
1990
+ $transparent_slider = $transparent_wrap.find('.wpcf--transparent-slider'),
1991
+ $transparent_text = $transparent_wrap.find('.wpcf--transparent-text'),
1992
+ $transparent_offset = $transparent_wrap.find('.wpcf--transparent-offset'),
1993
+ $transparent_button = $transparent_wrap.find('.wpcf--transparent-button');
1994
+
1995
+ if ($input.val() === 'transparent') {
1996
+ $container.addClass('wpcf--transparent-active');
1997
+ }
1998
+
1999
+ $transparent_button.on('click', function () {
2000
+ if ($input.val() !== 'transparent') {
2001
+ $input.val('transparent').trigger('change').removeClass('iris-error');
2002
+ $container.addClass('wpcf--transparent-active');
2003
+ } else {
2004
+ $input.val(a8cIris._color.toString()).trigger('change');
2005
+ $container.removeClass('wpcf--transparent-active');
2006
+ }
2007
+ });
2008
+
2009
+ $transparent_slider.slider({
2010
+ value: picker_color.transparent,
2011
+ step: 1,
2012
+ min: 0,
2013
+ max: 100,
2014
+ slide: function (event, ui) {
2015
+
2016
+ var slide_value = parseFloat(ui.value / 100);
2017
+ a8cIris._color._alpha = slide_value;
2018
+ $input.wpColorPicker('color', a8cIris._color.toString());
2019
+ $transparent_text.text((slide_value === 1 || slide_value === 0 ? '' : slide_value));
2020
+
2021
+ },
2022
+ create: function () {
2023
+
2024
+ var slide_value = parseFloat(picker_color.transparent / 100),
2025
+ text_value = slide_value < 1 ? slide_value : '';
2026
+
2027
+ $transparent_text.text(text_value);
2028
+ $transparent_offset.css('background-color', picker_color.value);
2029
+
2030
+ $container.on('click', '.wp-picker-clear', function () {
2031
+
2032
+ a8cIris._color._alpha = 1;
2033
+ $transparent_text.text('');
2034
+ $transparent_slider.slider('option', 'value', 100);
2035
+ $container.removeClass('wpcf--transparent-active');
2036
+ $input.trigger('change');
2037
+
2038
+ });
2039
+
2040
+ $container.on('click', '.wp-picker-default', function () {
2041
+
2042
+ var default_color = SP_WPCF.funcs.parse_color($input.data('default-color')),
2043
+ default_value = parseFloat(default_color.transparent / 100),
2044
+ default_text = default_value < 1 ? default_value : '';
2045
+
2046
+ a8cIris._color._alpha = default_value;
2047
+ $transparent_text.text(default_text);
2048
+ $transparent_slider.slider('option', 'value', default_color.transparent);
2049
+
2050
+ if (default_color.value === 'transparent') {
2051
+ $input.removeClass('iris-error');
2052
+ $container.addClass('wpcf--transparent-active');
2053
+ }
2054
+
2055
+ });
2056
+
2057
+ }
2058
+ });
2059
+ }
2060
+ });
2061
+
2062
+ });
2063
+ };
2064
+
2065
+ //
2066
+ // ChosenJS
2067
+ //
2068
+ $.fn.wpcf_chosen = function () {
2069
+ return this.each(function () {
2070
+
2071
+ var $this = $(this),
2072
+ $inited = $this.parent().find('.chosen-container'),
2073
+ is_sortable = $this.hasClass('wpcf-chosen-sortable') || false,
2074
+ is_ajax = $this.hasClass('wpcf-chosen-ajax') || false,
2075
+ is_multiple = $this.attr('multiple') || false,
2076
+ set_width = is_multiple ? '100%' : 'auto',
2077
+ set_options = $.extend({
2078
+ allow_single_deselect: true,
2079
+ disable_search_threshold: 10,
2080
+ width: set_width,
2081
+ no_results_text: window.wpcf_vars.i18n.no_results_text,
2082
+ }, $this.data('chosen-settings'));
2083
+
2084
+ if ($inited.length) {
2085
+ $inited.remove();
2086
+ }
2087
+
2088
+ // Chosen ajax
2089
+ if (is_ajax) {
2090
+
2091
+ var set_ajax_options = $.extend({
2092
+ data: {
2093
+ type: 'post',
2094
+ nonce: '',
2095
+ },
2096
+ allow_single_deselect: true,
2097
+ disable_search_threshold: -1,
2098
+ width: '100%',
2099
+ min_length: 3,
2100
+ type_delay: 500,
2101
+ typing_text: window.wpcf_vars.i18n.typing_text,
2102
+ searching_text: window.wpcf_vars.i18n.searching_text,
2103
+ no_results_text: window.wpcf_vars.i18n.no_results_text,
2104
+ }, $this.data('chosen-settings'));
2105
+
2106
+ $this.SP_WPCFAjaxChosen(set_ajax_options);
2107
+
2108
+ } else {
2109
+
2110
+ $this.chosen(set_options);
2111
+
2112
+ }
2113
+
2114
+ // Chosen keep options order
2115
+ if (is_multiple) {
2116
+
2117
+ var $hidden_select = $this.parent().find('.wpcf-hide-select');
2118
+ var $hidden_value = $hidden_select.val() || [];
2119
+
2120
+ $this.on('change', function (obj, result) {
2121
+
2122
+ if (result && result.selected) {
2123
+ $hidden_select.append('<option value="' + result.selected + '" selected="selected">' + result.selected + '</option>');
2124
+ } else if (result && result.deselected) {
2125
+ $hidden_select.find('option[value="' + result.deselected + '"]').remove();
2126
+ }
2127
+
2128
+ // Force customize refresh
2129
+ if (window.wp.customize !== undefined && $hidden_select.children().length === 0 && $hidden_select.data('customize-setting-link')) {
2130
+ window.wp.customize.control($hidden_select.data('customize-setting-link')).setting.set('');
2131
+ }
2132
+
2133
+ $hidden_select.trigger('change');
2134
+
2135
+ });
2136
+
2137
+ // Chosen order abstract
2138
+ $this.SP_WPCFChosenOrder($hidden_value, true);
2139
+
2140
+ }
2141
+
2142
+ // Chosen sortable
2143
+ if (is_sortable) {
2144
+
2145
+ var $chosen_container = $this.parent().find('.chosen-container');
2146
+ var $chosen_choices = $chosen_container.find('.chosen-choices');
2147
+
2148
+ $chosen_choices.bind('mousedown', function (event) {
2149
+ if ($(event.target).is('span')) {
2150
+ event.stopPropagation();
2151
+ }
2152
+ });
2153
+
2154
+ $chosen_choices.sortable({
2155
+ items: 'li:not(.search-field)',
2156
+ helper: 'orginal',
2157
+ cursor: 'move',
2158
+ placeholder: 'search-choice-placeholder',
2159
+ start: function (e, ui) {
2160
+ ui.placeholder.width(ui.item.innerWidth());
2161
+ ui.placeholder.height(ui.item.innerHeight());
2162
+ },
2163
+ update: function (e, ui) {
2164
+
2165
+ var select_options = '';
2166
+ var chosen_object = $this.data('chosen');
2167
+ var $prev_select = $this.parent().find('.wpcf-hide-select');
2168
+
2169
+ $chosen_choices.find('.search-choice-close').each(function () {
2170
+ var option_array_index = $(this).data('option-array-index');
2171
+ $.each(chosen_object.results_data, function (index, data) {
2172
+ if (data.array_index === option_array_index) {
2173
+ select_options += '<option value="' + data.value + '" selected>' + data.value + '</option>';
2174
+ }
2175
+ });
2176
+ });
2177
+
2178
+ $prev_select.children().remove();
2179
+ $prev_select.append(select_options);
2180
+ $prev_select.trigger('change');
2181
+
2182
+ }
2183
+ });
2184
+
2185
+ }
2186
+
2187
+ });
2188
+ };
2189
+
2190
+ //
2191
+ // Helper Checkbox Checker
2192
+ //
2193
+ $.fn.wpcf_checkbox = function () {
2194
+ return this.each(function () {
2195
+
2196
+ var $this = $(this),
2197
+ $input = $this.find('.wpcf--input'),
2198
+ $checkbox = $this.find('.wpcf--checkbox');
2199
+
2200
+ $checkbox.on('click', function () {
2201
+ $input.val(Number($checkbox.prop('checked'))).trigger('change');
2202
+ });
2203
+
2204
+ });
2205
+ };
2206
+
2207
+ //
2208
+ // Siblings
2209
+ //
2210
+ $.fn.wpcf_siblings = function () {
2211
+ return this.each(function () {
2212
+
2213
+ var $this = $(this),
2214
+ $siblings = $this.find('.wpcf--sibling'),
2215
+ multiple = $this.data('multiple') || false;
2216
+
2217
+ $siblings.on('click', function () {
2218
+
2219
+ var $sibling = $(this);
2220
+
2221
+ if (multiple) {
2222
+
2223
+ if ($sibling.hasClass('wpcf--active')) {
2224
+ $sibling.removeClass('wpcf--active');
2225
+ $sibling.find('input').prop('checked', false).trigger('change');
2226
+ } else {
2227
+ $sibling.addClass('wpcf--active');
2228
+ $sibling.find('input').prop('checked', true).trigger('change');
2229
+ }
2230
+
2231
+ } else {
2232
+
2233
+ $this.find('input').prop('checked', false);
2234
+ $sibling.find('input').prop('checked', true).trigger('change');
2235
+ $sibling.addClass('wpcf--active').siblings().removeClass('wpcf--active');
2236
+
2237
+ }
2238
+
2239
+ });
2240
+
2241
+ });
2242
+ };
2243
+
2244
+ //
2245
+ // Help Tooltip
2246
+ //
2247
+ $.fn.wpcf_help = function () {
2248
+ return this.each(function () {
2249
+
2250
+ var $this = $(this),
2251
+ $tooltip,
2252
+ offset_left;
2253
+
2254
+ $this.on({
2255
+ mouseenter: function () {
2256
+
2257
+ $tooltip = $('<div class="wpcf-tooltip"></div>').html($this.find('.wpcf-help-text').html()).appendTo('body');
2258
+ //offset_left = (SP_WPCF.vars.is_rtl) ? ($this.offset().left + 24) : ($this.offset().left - $tooltip.outerWidth());
2259
+
2260
+ offset_left = SP_WPCF.vars.is_rtl
2261
+ ? $this.offset().left + 24
2262
+ : $this.offset().left + 24
2263
+
2264
+ $tooltip.css({
2265
+ top: $this.offset().top - (($tooltip.outerHeight() / 2) - 14),
2266
+ left: offset_left,
2267
+ });
2268
+
2269
+ },
2270
+ mouseleave: function () {
2271
+
2272
+ if ($tooltip !== undefined) {
2273
+ $tooltip.remove();
2274
+ }
2275
+
2276
+ }
2277
+
2278
+ });
2279
+
2280
+ });
2281
+ };
2282
+
2283
+ //
2284
+ // Customize Refresh
2285
+ //
2286
+ $.fn.wpcf_customizer_refresh = function () {
2287
+ return this.each(function () {
2288
+
2289
+ var $this = $(this),
2290
+ $complex = $this.closest('.wpcf-customize-complex');
2291
+
2292
+ if ($complex.length) {
2293
+
2294
+ var unique_id = $complex.data('unique-id');
2295
+
2296
+ if (unique_id === undefined) {
2297
+ return;
2298
+ }
2299
+
2300
+ var $input = $complex.find(':input'),
2301
+ option_id = $complex.data('option-id'),
2302
+ obj = $input.serializeObjectSP_WPCF(),
2303
+ data = (!$.isEmptyObject(obj) && obj[unique_id] && obj[unique_id][option_id]) ? obj[unique_id][option_id] : '',
2304
+ control = window.wp.customize.control(unique_id + '[' + option_id + ']');
2305
+
2306
+ // clear the value to force refresh.
2307
+ control.setting._value = null;
2308
+
2309
+ control.setting.set(data);
2310
+
2311
+ } else {
2312
+
2313
+ $this.find(':input').first().trigger('change');
2314
+
2315
+ }
2316
+
2317
+ $(document).trigger('wpcf-customizer-refresh', $this);
2318
+
2319
+ });
2320
+ };
2321
+
2322
+
2323
+ //
2324
+ // Window on resize
2325
+ //
2326
+ SP_WPCF.vars.$window.on('resize wpcf.resize', SP_WPCF.helper.debounce(function (event) {
2327
+
2328
+ var window_width = navigator.userAgent.indexOf('AppleWebKit/') > -1 ? SP_WPCF.vars.$window.width() : window.innerWidth;
2329
+
2330
+ if (window_width <= 782 && !SP_WPCF.vars.onloaded) {
2331
+ $('.wpcf-section').wpcf_reload_script();
2332
+ SP_WPCF.vars.onloaded = true;
2333
+ }
2334
+
2335
+ }, 200)).trigger('wpcf.resize');
2336
+
2337
+ //
2338
+ // Widgets Framework
2339
+ //
2340
+ $.fn.wpcf_widgets = function () {
2341
+ if (this.length) {
2342
+
2343
+ $(document).on('widget-added widget-updated', function (event, $widget) {
2344
+ $widget.find('.wpcf-fields').wpcf_reload_script();
2345
+ });
2346
+
2347
+ $('.widgets-sortables, .control-section-sidebar').on('sortstop', function (event, ui) {
2348
+ ui.item.find('.wpcf-fields').wpcf_reload_script_retry();
2349
+ });
2350
+
2351
+ $(document).on('click', '.widget-top', function (event) {
2352
+ $(this).parent().find('.wpcf-fields').wpcf_reload_script();
2353
+ });
2354
+
2355
+ }
2356
+ };
2357
+
2358
+ //
2359
+ // Nav Menu Options Framework
2360
+ //
2361
+ $.fn.wpcf_nav_menu = function () {
2362
+ return this.each(function () {
2363
+
2364
+ var $navmenu = $(this);
2365
+
2366
+ $navmenu.on('click', 'a.item-edit', function () {
2367
+ $(this).closest('li.menu-item').find('.wpcf-fields').wpcf_reload_script();
2368
+ });
2369
+
2370
+ $navmenu.on('sortstop', function (event, ui) {
2371
+ ui.item.find('.wpcf-fields').wpcf_reload_script_retry();
2372
+ });
2373
+
2374
+ });
2375
+ };
2376
+
2377
+ //
2378
+ // Retry Plugins
2379
+ //
2380
+ $.fn.wpcf_reload_script_retry = function () {
2381
+ return this.each(function () {
2382
+
2383
+ var $this = $(this);
2384
+
2385
+ if ($this.data('inited')) {
2386
+ $this.children('.wpcf-field-wp_editor').wpcf_field_wp_editor();
2387
+ }
2388
+
2389
+ });
2390
+ };
2391
+
2392
+ //
2393
+ // Reload Plugins
2394
+ //
2395
+ $.fn.wpcf_reload_script = function (options) {
2396
+
2397
+ var settings = $.extend({
2398
+ dependency: true,
2399
+ }, options);
2400
+
2401
+ return this.each(function () {
2402
+
2403
+ var $this = $(this);
2404
+
2405
+ // Avoid for conflicts
2406
+ if (!$this.data('inited')) {
2407
+
2408
+ // Field plugins.
2409
+ // $this.children('.wpcf-field-accordion').wpcf_field_accordion();
2410
+ // $this.children('.wpcf-field-backup').wpcf_field_backup();
2411
+ // $this.children('.wpcf-field-background').wpcf_field_background();
2412
+ $this.children('.wpcf-field-code_editor').wpcf_field_code_editor();
2413
+ // $this.children('.wpcf-field-date').wpcf_field_date();
2414
+ // $this.children('.wpcf-field-fieldset').wpcf_field_fieldset();
2415
+ $this.children('.wpcf-field-gallery').wpcf_field_gallery();
2416
+ // $this.children('.wpcf-field-group').wpcf_field_group();
2417
+ // $this.children('.wpcf-field-icon').wpcf_field_icon();
2418
+ // $this.children('.wpcf-field-link').wpcf_field_link();
2419
+ $this.children('.wpcf-field-media').wpcf_field_media();
2420
+ // $this.children('.wpcf-field-map').wpcf_field_map();
2421
+ //$this.children('.wpcf-field-repeater').wpcf_field_repeater();
2422
+ $this.children('.wpcf-field-slider').wpcf_field_slider();
2423
+ // $this.children('.wpcf-field-sortable').wpcf_field_sortable();
2424
+ // $this.children('.wpcf-field-sorter').wpcf_field_sorter();
2425
+ $this.children('.wpcf-field-spinner').wpcf_field_spinner();
2426
+ $this.children('.wpcf-field-switcher').wpcf_field_switcher();
2427
+ // $this.children('.wpcf-field-tabbed').wpcf_field_tabbed();
2428
+ $this.children('.wpcf-field-typography').wpcf_field_typography();
2429
+ // $this.children('.wpcf-field-upload').wpcf_field_upload();
2430
+ // $this.children('.wpcf-field-wp_editor').wpcf_field_wp_editor();
2431
+
2432
+ // Field colors
2433
+ $this.children('.wpcf-field-border').find('.wpcf-color').wpcf_color();
2434
+ // $this.children('.wpcf-field-background').find('.wpcf-color').wpcf_color();
2435
+ $this.children('.wpcf-field-color').find('.wpcf-color').wpcf_color();
2436
+ $this.children('.wpcf-field-color_group').find('.wpcf-color').wpcf_color();
2437
+ // $this.children('.wpcf-field-link_color').find('.wpcf-color').wpcf_color();
2438
+ $this.children('.wpcf-field-typography').find('.wpcf-color').wpcf_color();
2439
+
2440
+ // Field chosenjs
2441
+ $this.children('.wpcf-field-select').find('.wpcf-chosen').wpcf_chosen();
2442
+
2443
+ // Field Checkbox
2444
+ $this.children('.wpcf-field-checkbox').find('.wpcf-checkbox').wpcf_checkbox();
2445
+
2446
+ // Field Siblings
2447
+ $this.children('.wpcf-field-button_set').find('.wpcf-siblings').wpcf_siblings();
2448
+ // $this.children('.wpcf-field-icon_select').find('.wpcf-siblings').wpcf_siblings();
2449
+ // $this.children('.wpcf-field-image_select').find('.wpcf-siblings').wpcf_siblings();
2450
+ $this.children('.wpcf-field-carousel_type').find('.wpcf-siblings').wpcf_siblings();
2451
+ // $this.children('.wpcf-field-palette').find('.wpcf-siblings').wpcf_siblings();
2452
+
2453
+ // Help Tooptip
2454
+ $this.children('.wpcf-field').find('.wpcf-help').wpcf_help();
2455
+
2456
+ if (settings.dependency) {
2457
+ $this.wpcf_dependency();
2458
+ }
2459
+
2460
+ $this.data('inited', true);
2461
+
2462
+ $(document).trigger('wpcf-reload-script', $this);
2463
+
2464
+ }
2465
+
2466
+ });
2467
+ };
2468
+
2469
+ //
2470
+ // Document ready and run scripts
2471
+ //
2472
+ $(document).ready(function () {
2473
+
2474
+ $('.wpcf-save').wpcf_save();
2475
+ $('.wpcf-options').wpcf_options();
2476
+ $('.wpcf-sticky-header').wpcf_sticky();
2477
+ $('.wpcf-nav-options').wpcf_nav_options();
2478
+ $('.wpcf-nav-metabox').wpcf_nav_metabox();
2479
+ $('.wpcf-taxonomy').wpcf_taxonomy();
2480
+ $('.wpcf-page-templates').wpcf_page_templates();
2481
+ $('.wpcf-post-formats').wpcf_post_formats();
2482
+ $('.wpcf-shortcode').wpcf_shortcode();
2483
+ $('.wpcf-search').wpcf_search();
2484
+ $('.wpcf-confirm').wpcf_confirm();
2485
+ $('.wpcf-expand-all').wpcf_expand_all();
2486
+ $('.wpcf-onload').wpcf_reload_script();
2487
+ $('.widget').wpcf_widgets();
2488
+ $('#menu-to-edit').wpcf_nav_menu();
2489
+
2490
+
2491
+ /* Copy to clipboard */
2492
+ $('.wpcf-shortcode-selectable').click(function (e) {
2493
+ e.preventDefault();
2494
+ wpcf_copyToClipboard($(this));
2495
+ wpcf_SelectText($(this));
2496
+ $(this).focus().select();
2497
+ jQuery(".spwpc-after-copy-text").animate({
2498
+ opacity: 1,
2499
+ bottom: 25
2500
+ }, 300);
2501
+ setTimeout(function () {
2502
+ jQuery(".spwpc-after-copy-text").animate({
2503
+ opacity: 0,
2504
+ }, 200);
2505
+ jQuery(".spwpc-after-copy-text").animate({
2506
+ bottom: 0
2507
+ }, 0);
2508
+ }, 2000);
2509
+ });
2510
+ function wpcf_copyToClipboard(element) {
2511
+ var $temp = $("<input>");
2512
+ $("body").append($temp);
2513
+ $temp.val($(element).text()).select();
2514
+ document.execCommand("copy");
2515
+ $temp.remove();
2516
+ }
2517
+ function wpcf_SelectText(element) {
2518
+ var r = document.createRange();
2519
+ var w = element.get(0);
2520
+ r.selectNodeContents(w);
2521
+ var sel = window.getSelection();
2522
+ sel.removeAllRanges();
2523
+ sel.addRange(r);
2524
+ }
2525
+
2526
+ $('.post-type-sp_wp_carousel .shortcode.column-shortcode input').click(function (e) {
2527
+ e.preventDefault();
2528
+ /* Get the text field */
2529
+ var copyText = $(this);
2530
+ /* Select the text field */
2531
+ copyText.select();
2532
+ document.execCommand("copy");
2533
+
2534
+ jQuery(".spwpc-after-copy-text").animate({
2535
+ opacity: 1,
2536
+ bottom: 25
2537
+ }, 300);
2538
+ setTimeout(function () {
2539
+ jQuery(".spwpc-after-copy-text").animate({
2540
+ opacity: 0,
2541
+ }, 200);
2542
+ jQuery(".spwpc-after-copy-text").animate({
2543
+ bottom: 0
2544
+ }, 0);
2545
+ }, 2000);
2546
+ });
2547
+
2548
+
2549
+ // WP Carousel export.
2550
+ var $export_type = $('.wpcp_what_export').find('input:checked').val();
2551
+ $('.wpcp_what_export').on('change', function () {
2552
+ $export_type = $(this).find('input:checked').val();
2553
+ });
2554
+
2555
+ $('.wpcp_export .wpcf--button').click(function (event) {
2556
+ event.preventDefault();
2557
+
2558
+ var $shortcode_ids = $('.wpcp_post_ids select').val();
2559
+ console.log($shortcode_ids);
2560
+ var $ex_nonce = $('#wpcf_options_noncesp_wpcf_tools').val();
2561
+ var selected_shortcode = $export_type === 'selected_shortcodes' ? $shortcode_ids : 'all_shortcodes';
2562
+ if ($export_type === 'all_shortcodes' || $export_type === 'selected_shortcodes') {
2563
+ var data = {
2564
+ action: 'wpcp_export_shortcodes',
2565
+ wpcf_ids: selected_shortcode,
2566
+ nonce: $ex_nonce,
2567
+ }
2568
+ } else {
2569
+ $('.wpcf-form-result.wpcf-form-success').text('No carousel selected.').show();
2570
+ setTimeout(function () {
2571
+ $('.wpcf-form-result.wpcf-form-success').hide().text('');
2572
+ }, 3000);
2573
+ }
2574
+ $.post(ajaxurl, data, function (resp) {
2575
+ if (resp) {
2576
+ // Convert JSON Array to string.
2577
+ var json = JSON.stringify(resp);
2578
+ // Convert JSON string to BLOB.
2579
+ json = [json];
2580
+ var blob = new Blob(json);
2581
+ var link = document.createElement('a');
2582
+ var wpcp_time = $.now();
2583
+ link.href = window.URL.createObjectURL(blob);
2584
+ link.download = "wp-carousel-export-" + wpcp_time + ".json";
2585
+ link.click();
2586
+ $('.wpcf-form-result.wpcf-form-success').text('Exported successfully!').show();
2587
+ setTimeout(function () {
2588
+ $('.wpcf-form-result.wpcf-form-success').hide().text('');
2589
+ $('.wpcp_post_ids select').val('').trigger('chosen:updated');
2590
+ }, 3000);
2591
+ }
2592
+ });
2593
+ });
2594
+ // Wp Carousel import.
2595
+ $('.wpcp_import button.import').click(function (event) {
2596
+ event.preventDefault();
2597
+ var wpcp_shortcodes = $('#import').prop('files')[0];
2598
+ if ($('#import').val() != '') {
2599
+ var $im_nonce = $('#wpcf_options_noncesp_wpcf_tools').val();
2600
+ var reader = new FileReader();
2601
+ reader.readAsText(wpcp_shortcodes);
2602
+ reader.onload = function (event) {
2603
+ var jsonObj = JSON.stringify(event.target.result);
2604
+ $.ajax({
2605
+ url: ajaxurl,
2606
+ type: 'POST',
2607
+ data: {
2608
+ shortcode: jsonObj,
2609
+ action: 'wpcp_import_shortcodes',
2610
+ nonce: $im_nonce,
2611
+ },
2612
+ success: function (resp) {
2613
+ $('.wpcf-form-result.wpcf-form-success').text('Imported successfully!').show();
2614
+ setTimeout(function () {
2615
+ $('.wpcf-form-result.wpcf-form-success').hide().text('');
2616
+ $('#import').val('');
2617
+ window.location.replace($('#wpcf_shortcode_link_redirect').attr('href'));
2618
+ }, 2000);
2619
+ }
2620
+ });
2621
+ }
2622
+ } else {
2623
+ $('.wpcf-form-result.wpcf-form-success').text('No exported json file chosen.').show();
2624
+ setTimeout(function () {
2625
+ $('.wpcf-form-result.wpcf-form-success').hide().text('');
2626
+ }, 3000);
2627
+ }
2628
+ });
2629
+
2630
+ });
2631
+
2632
+ })(jQuery, window, document);
admin/views/sp-framework/assets/js/main.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function($,window,document,undefined){"use strict";var SP_WPCF=SP_WPCF||{};SP_WPCF.funcs={},SP_WPCF.vars={onloaded:!1,$body:$("body"),$window:$(window),$document:$(document),$form_warning:null,is_confirm:!1,form_modified:!1,code_themes:[],is_rtl:$("body").hasClass("rtl")},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":"")}},$.fn.wpcf_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.wpcf_expand_all=function(){return this.each((function(){$(this).on("click",(function(e){e.preventDefault(),$(".wpcf-wrapper").toggleClass("wpcf-show-all"),$(".wpcf-section").wpcf_reload_script(),$(this).find(".fa").toggleClass("fa-indent").toggleClass("fa-outdent")}))}))},$.fn.wpcf_nav_options=function(){return this.each((function(){var $nav=$(this),$window=$(window),$wpwrap=$("#wpwrap"),$links=$nav.find("a"),$last;$window.on("hashchange wpcf.hashchange",(function(){var hash=window.location.hash.replace("#tab=",""),slug=hash||$links.first().attr("href").replace("#tab=",""),$link=$('[data-tab-id="'+slug+'"]');if($link.length){$link.closest(".wpcf-tab-item").addClass("wpcf-tab-expanded").siblings().removeClass("wpcf-tab-expanded"),$link.next().is("ul")&&(slug=($link=$link.next().find("li").first().find("a")).data("tab-id")),$links.removeClass("wpcf-active"),$link.addClass("wpcf-active"),$last&&$last.addClass("hidden");var $section=$('[data-section-id="'+slug+'"]');$section.removeClass("hidden"),$section.wpcf_reload_script(),$(".wpcf-section-id").val($section.index()+1),$last=$section,$wpwrap.hasClass("wp-responsive-open")&&($("html, body").animate({scrollTop:$section.offset().top-50},200),$wpwrap.removeClass("wp-responsive-open"))}})).trigger("wpcf.hashchange")}))},$.fn.wpcf_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("wpcf-active"),void 0!==$last_section&&$last_section.addClass("hidden"),$link.addClass("wpcf-active");var $section=$("#wpcf-section-"+section_id);$section.removeClass("hidden"),$section.wpcf_reload_script(),SP_WPCF.helper.set_cookie("wpcf-last-metabox-tab-"+post_id+"-"+unique_id,section_id),$last_section=$section,$last_link=$link}));var get_cookie=SP_WPCF.helper.get_cookie("wpcf-last-metabox-tab-"+post_id+"-"+unique_id);get_cookie?$nav.find('a[data-section="'+get_cookie+'"]').trigger("click"):$links.first("a").trigger("click")}))},$.fn.wpcf_page_templates=function(){this.length&&$(document).on("change",".editor-page-attributes__template select, #page_template",(function(){var maybe_value=$(this).val()||"default";$(".wpcf-page-templates").removeClass("wpcf-metabox-show").addClass("wpcf-metabox-hide"),$(".wpcf-page-"+maybe_value.toLowerCase().replace(/[^a-zA-Z0-9]+/g,"-")).removeClass("wpcf-metabox-hide").addClass("wpcf-metabox-show")}))},$.fn.wpcf_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,$(".wpcf-post-formats").removeClass("wpcf-metabox-show").addClass("wpcf-metabox-hide"),$(".wpcf-post-format-"+maybe_value).removeClass("wpcf-metabox-hide").addClass("wpcf-metabox-show")}))},$.fn.wpcf_search=function(){return this.each((function(){var $this,$input;$(this).find("input").on("change keyup",(function(){var value=$(this).val(),$wrapper=$(".wpcf-wrapper"),$section,$fields=$wrapper.find(".wpcf-section").find("> .wpcf-field:not(.wpcf-depend-on)"),$titles=$fields.find("> .wpcf-title, .wpcf-search-tags");value.length>3?($fields.addClass("wpcf-metabox-hide"),$wrapper.addClass("wpcf-search-all"),$titles.each((function(){var $title=$(this);if($title.text().match(new RegExp(".*?"+value+".*?","i"))){var $field=$title.closest(".wpcf-field");$field.removeClass("wpcf-metabox-hide"),$field.parent().wpcf_reload_script()}}))):($fields.removeClass("wpcf-metabox-hide"),$wrapper.removeClass("wpcf-search-all"))}))}))},$.fn.wpcf_sticky=function(){return this.each((function(){var $this=$(this),$window=$(window),$inner=$this.find(".wpcf-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=$window.innerWidth();stickyTop<=32&&winWidth>782?($inner.css({width:$this.outerWidth()-padding}),$this.css({height:$this.outerHeight()}).addClass("wpcf-sticky")):($inner.removeAttr("style"),$this.removeAttr("style").removeClass("wpcf-sticky"))},requestTick=function(){ticking||requestAnimationFrame((function(){stickyUpdate(),ticking=!1})),ticking=!0},onSticky=function(){scrollTop=$window.scrollTop(),requestTick()};$window.on("scroll resize",onSticky),onSticky()}))},$.fn.wpcf_dependency=function(){return this.each((function(){var $this=$(this),$fields=$this.children("[data-controller]");if($fields.length){var normal_ruleset=$.wpcf_deps.createRuleset(),global_ruleset=$.wpcf_deps.createRuleset(),normal_depends=[],global_depends=[];$fields.each((function(){var $field=$(this),controllers=$field.data("controller").split("|"),conditions=$field.data("condition").split("|"),values=$field.data("value").toString().split("|"),is_global=!!$field.data("depend-global"),ruleset=is_global?global_ruleset:normal_ruleset;$.each(controllers,(function(index,depend_id){var value=values[index]||"",condition=conditions[index]||conditions[0];(ruleset=ruleset.createRule('[data-depend-id="'+depend_id+'"]',condition,value)).include($field),is_global?global_depends.push(depend_id):normal_depends.push(depend_id)}))})),normal_depends.length&&$.wpcf_deps.enable($this,normal_ruleset,normal_depends),global_depends.length&&$.wpcf_deps.enable(SP_WPCF.vars.$body,global_ruleset,global_depends)}}))},$.fn.wpcf_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>");$("#wpcf-codemirror-css").after($cssLink),$cssLink.attr({rel:"stylesheet",id:"wpcf-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.wpcf_field_gallery=function(){return this.each((function(){var $this=$(this),$edit=$this.find(".wpcf-edit-gallery"),$clear=$this.find(".wpcf-clear-gallery"),$list=$this.find("ul.sp-gallery-images"),$input=$this.find("input"),$img=$this.find("img"),wp_media_frame;$this.on("click",".wpcf-button, .wpcf-edit-gallery",(function(e){var $el=$(this),ids=$input.val(),what=$el.hasClass("wpcf-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=item.sizes&&item.sizes.thumbnail&&item.sizes.thumbnail.url?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.wpcf_field_media=function(){return this.each((function(){var $this=$(this),$upload_button=$this.find(".wpcf--button"),$remove_button=$this.find(".wpcf--remove"),$library=$upload_button.data("library")&&$upload_button.data("library").split(",")||"",$auto_attributes=!!$this.hasClass("wpcf-assign-field-background")&&$this.closest(".wpcf-field-background").find(".wpcf--auto-attributes"),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";$library.length&&-1===$library.indexOf(attributes.subtype)&&-1===$library.indexOf(attributes.type)||($this.find(".wpcf--id").val(attributes.id),$this.find(".wpcf--width").val(attributes.width),$this.find(".wpcf--height").val(attributes.height),$this.find(".wpcf--alt").val(attributes.alt),$this.find(".wpcf--title").val(attributes.title),$this.find(".wpcf--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:"image"===attributes.type?attributes.url:attributes.icon,console.log(attributes),$auto_attributes&&$auto_attributes.removeClass("wpcf--attributes-hidden"),$remove_button.removeClass("hidden"),$this.find(".wpcf--preview").removeClass("hidden"),$this.find(".wpcf--src").attr("src",thumbnail),$this.find(".wpcf--thumbnail").val(thumbnail),$this.find(".wpcf--url").val(attributes.url).trigger("change"))})),wp_media_frame.open()))})),$remove_button.on("click",(function(e){e.preventDefault(),$auto_attributes&&$auto_attributes.addClass("wpcf--attributes-hidden"),$remove_button.addClass("hidden"),$this.find("input").val(""),$this.find(".wpcf--preview").addClass("hidden"),$this.find(".wpcf--url").trigger("change")}))}))},$.fn.wpcf_field_slider=function(){return this.each((function(){var $this=$(this),$input=$this.find("input"),$slider=$this.find(".wpcf-slider-ui"),data=$input.data(),value=$input.val()||0;$slider.hasClass("ui-slider")&&$slider.empty(),$slider.slider({range:"min",value:value,min:data.min||0,max:data.max||100,step:data.step||1,slide:function(e,o){$input.val(o.value).trigger("change")}}),$input.on("keyup",(function(){$slider.slider("value",$input.val())}))}))},$.fn.wpcf_field_spinner=function(){return this.each((function(){var $this=$(this),$input=$this.find("input"),$inited=$this.find(".ui-button"),data=$input.data();$inited.length&&$inited.remove(),$input.spinner({min:data.min||0,max:data.max||100,step:data.step||1,create:function(event,ui){data.unit&&$input.after('<span class="ui-button wpcf--unit">'+data.unit+"</span>")},spin:function(event,ui){$input.val(ui.value).trigger("change")}})}))},$.fn.wpcf_field_switcher=function(){return this.each((function(){var $switcher=$(this).find(".wpcf--switcher");$switcher.on("click",(function(){var value=0,$input=$switcher.find("input");$switcher.hasClass("wpcf--active")?$switcher.removeClass("wpcf--active"):(value=1,$switcher.addClass("wpcf--active")),$input.val(value).trigger("change")}))}))},$.fn.wpcf_field_typography=function(){return this.each((function(){var base=this,$this=$(this),loaded_fonts=[],webfonts=wpcf_typography_json.webfonts,googlestyles=wpcf_typography_json.googlestyles,defaultstyles=wpcf_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("wpcf.change").trigger("chosen:updated")},base.init=function(){var selected_styles=[],$typography=$this.find(".wpcf--typography"),$type=$this.find(".wpcf--type"),$styles=$this.find(".wpcf--block-font-style"),unit=$typography.data("unit"),line_height_unit=$typography.data("line-height-unit"),exclude_fonts=$typography.data("exclude")?$typography.data("exclude").split(","):[],$chosen_selects;$this.find(".wpcf--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(".wpcf--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(".wpcf--block-font-style");if($font_style_block.length){var $font_style_select=$this.find(".wpcf--font-style-select"),first_style_value=$font_style_select.val()?$font_style_select.val().replace(/normal/g,""):"";$font_style_select.on("change wpcf.change",(function(event){var style_value=$font_style_select.val();!style_value&&selected_styles&&-1===selected_styles.indexOf("normal")&&(style_value=selected_styles[0]);var font_normal=style_value&&"italic"!==style_value&&"normal"===style_value?"normal":"",font_weight=style_value&&"italic"!==style_value&&"normal"!==style_value?style_value.replace("italic",""):font_normal,font_style=style_value&&"italic"===style_value.substr(-6)?"italic":"";$this.find(".wpcf--font-weight").val(font_weight),$this.find(".wpcf--font-style").val(font_style)}));var $extra_font_style_block=$this.find(".wpcf--block-extra-styles");if($extra_font_style_block.length)var $extra_font_style_select=$this.find(".wpcf--extra-styles"),first_extra_style_value=$extra_font_style_select.val()}var $subset_block=$this.find(".wpcf--block-subset");if($subset_block.length)var $subset_select=$this.find(".wpcf--subset"),first_subset_select_value=$subset_select.val(),subset_multi_select=$subset_select.data("multiple")||!1;var $backup_font_family_block=$this.find(".wpcf--block-backup-font-family");$font_family_select.on("change wpcf.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");if(type&&value){if("google"!==type&&"custom"!==type||!$backup_font_family_block.length||$backup_font_family_block.removeClass("hidden"),$font_style_block.length){var styles=defaultstyles;"google"===type&&webfonts[type].fonts[value][0]?styles=webfonts[type].fonts[value][0]:"custom"===type&&webfonts[type].fonts[value]&&(styles=webfonts[type].fonts[value]),selected_styles=styles;var set_auto_style=-1!==styles.indexOf("normal")?"normal":styles[0],set_style_value=first_style_value&&-1!==styles.indexOf(first_style_value)?first_style_value:set_auto_style;base.append_select_options($font_style_select,styles,set_style_value,"style"),first_style_value=!1,$font_style_block.removeClass("hidden"),"google"===type&&$extra_font_style_block.length&&styles.length>1&&(base.append_select_options($extra_font_style_select,styles,first_extra_style_value,"style",!0),first_extra_style_value=!1,$extra_font_style_block.removeClass("hidden"))}if("google"===type&&$subset_block.length&&webfonts[type].fonts[value][1]){var subsets=webfonts[type].fonts[value][1],set_auto_subset=subsets.length<2&&"latin"!==subsets[0]?subsets[0]:"",set_subset_value=first_subset_select_value&&-1!==subsets.indexOf(first_subset_select_value)?first_subset_select_value:set_auto_subset;set_subset_value=subset_multi_select&&first_subset_select_value?first_subset_select_value:set_subset_value,base.append_select_options($subset_select,subsets,set_subset_value,"subset",subset_multi_select),first_subset_select_value=!1,$subset_block.removeClass("hidden")}}else $styles.find(":input").val(""),$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("wpcf.change");var $preview_block=$this.find(".wpcf--block-preview");if($preview_block.length){var $preview=$this.find(".wpcf--preview");$this.on("change",SP_WPCF.helper.debounce((function(event){$preview_block.removeClass("hidden");var font_family=$font_family_select.val(),font_weight=$this.find(".wpcf--font-weight").val(),font_style=$this.find(".wpcf--font-style").val(),font_size=$this.find(".wpcf--font-size").val(),font_variant=$this.find(".wpcf--font-variant").val(),line_height=$this.find(".wpcf--line-height").val(),text_align=$this.find(".wpcf--text-align").val(),text_transform=$this.find(".wpcf--text-transform").val(),text_decoration=$this.find(".wpcf--text-decoration").val(),text_color=$this.find(".wpcf--color").val(),word_spacing=$this.find(".wpcf--word-spacing").val(),letter_spacing=$this.find(".wpcf--letter-spacing").val(),custom_style=$this.find(".wpcf--custom-style").val(),type;"google"===$this.find(".wpcf--type").val()&&base.load_google_font(font_family,font_weight,font_style);var properties={};font_family&&(properties.fontFamily=font_family),font_weight&&(properties.fontWeight=font_weight),font_style&&(properties.fontStyle=font_style),font_variant&&(properties.fontVariant=font_variant),font_size&&(properties.fontSize=font_size+unit),line_height&&(properties.lineHeight=line_height+line_height_unit),letter_spacing&&(properties.letterSpacing=letter_spacing+unit),word_spacing&&(properties.wordSpacing=word_spacing+unit),text_align&&(properties.textAlign=text_align),text_transform&&(properties.textTransform=text_transform),text_decoration&&(properties.textDecoration=text_decoration),text_color&&(properties.color=text_color),$preview.removeAttr("style"),custom_style&&$preview.attr("style",custom_style),$preview.css(properties)}),100)),$preview_block.on("click",(function(){$preview.toggleClass("wpcf--black-background");var $toggle=$preview_block.find(".wpcf--toggle");$toggle.hasClass("fa-toggle-off")?$toggle.removeClass("fa-toggle-off").addClass("fa-toggle-on"):$toggle.removeClass("fa-toggle-on").addClass("fa-toggle-off")})),$preview_block.hasClass("hidden")||$this.trigger("change")}},base.init()}))},$.fn.wpcf_field_wp_editor=function(){return this.each((function(){if(void 0!==window.wp.editor&&void 0!==window.tinyMCEPreInit&&void 0!==window.tinyMCEPreInit.mceInit.wpcf_wp_editor){var $this=$(this),$editor=$this.find(".wpcf-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("wpcf-editor-");$textarea.attr("id",uid);var default_editor_settings={tinymce:window.tinyMCEPreInit.mceInit.wpcf_wp_editor,quicktags:window.tinyMCEPreInit.qtInit.wpcf_wp_editor},field_editor_settings=$editor.data("editor-settings"),wpEditor=wp.oldEditor?wp.oldEditor:wp.editor;wpEditor&&wpEditor.hasOwnProperty("autop")&&(wp.editor.autop=wpEditor.autop,wp.editor.removep=wpEditor.removep,wp.editor.initialize=wpEditor.initialize);var editor_on_change=function(editor){editor.on("change keyup",(function(){var value=field_editor_settings.wpautop?editor.getContent():wp.editor.removep(editor.getContent());$textarea.val(value).trigger("change")}))};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("wpcf-no-tinymce")),!1===field_editor_settings.quicktags&&(default_editor_settings.quicktags=!1,$editor.addClass("wpcf-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.wpcf_media_buttons){var $editor_buttons=$editor.find(".wp-media-buttons");if($editor_buttons.length)$editor_buttons.find(".wpcf-shortcode-button").data("editor-id",uid);else{var $media_buttons=$(window.wpcf_media_buttons);$media_buttons.find(".wpcf-shortcode-button").data("editor-id",uid),$editor.prepend($media_buttons)}}}}))},$.fn.wpcf_confirm=function(){return this.each((function(){$(this).on("click",(function(e){var confirm_text=$(this).data("confirm")||window.wpcf_vars.i18n.confirm,confirm_answer;if(!confirm(confirm_text))return e.preventDefault(),!1;SP_WPCF.vars.is_confirm=!0,SP_WPCF.vars.form_modified=!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.wpcf_save=function(){return this.each((function(){var $this=$(this),$buttons=$(".wpcf-save"),$panel=$(".wpcf-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("wpcf-save-ajax")?(e.preventDefault(),$panel.addClass("wpcf-saving"),$buttons.prop("disabled",!0),window.wp.ajax.post("wpcf_"+$panel.data("unique")+"_ajax_save",{data:$("#wpcf-form").serializeJSONSP_WPCF()}).done((function(response){if($(".wpcf-error").remove(),Object.keys(response.errors).length){var error_icon='<i class="wpcf-label-error wpcf-error">!</i>';$.each(response.errors,(function(key,error_message){var $field=$('[data-depend-id="'+key+'"]'),$link=$('a[href="#tab='+$field.closest(".wpcf-section").data("section-id")+'"]'),$tab=$link.closest(".wpcf-tab-item");$field.closest(".wpcf-fieldset").append('<p class="wpcf-error wpcf-error-text">'+error_message+"</p>"),$link.find(".wpcf-error").length||$link.append(error_icon),$tab.find(".wpcf-arrow .wpcf-error").length||$tab.find(".wpcf-arrow").append(error_icon)}))}$panel.removeClass("wpcf-saving"),$buttons.prop("disabled",!1).attr("value",$value),flooding=!1,SP_WPCF.vars.form_modified=!1,SP_WPCF.vars.$form_warning.hide(),clearTimeout(timeout);var $result_success=$(".wpcf-form-success");$result_success.empty().append(response.notice).fadeIn("fast",(function(){timeout=setTimeout((function(){$result_success.fadeOut("fast")}),1e3)}))})).fail((function(response){alert(response.error)}))):SP_WPCF.vars.form_modified=!1}flooding=!0}))}))},$.fn.wpcf_options=function(){return this.each((function(){var $this=$(this),$content=$this.find(".wpcf-content"),$form_success=$this.find(".wpcf-form-success"),$form_warning=$this.find(".wpcf-form-warning"),$save_button=$this.find(".wpcf-header .wpcf-save");SP_WPCF.vars.$form_warning=$form_warning,$form_warning.length&&(window.onbeforeunload=function(){return!!SP_WPCF.vars.form_modified||void 0},$content.on("change keypress",":input",(function(){SP_WPCF.vars.form_modified||($form_success.hide(),$form_warning.fadeIn("fast"),SP_WPCF.vars.form_modified=!0)}))),$form_success.hasClass("wpcf-form-show")&&setTimeout((function(){$form_success.fadeOut("fast")}),1e3),$(document).keydown((function(event){if((event.ctrlKey||event.metaKey)&&83===event.which)return $save_button.trigger("click"),event.preventDefault(),!1}))}))},$.fn.wpcf_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(".wpcf-field").wpcf_clone();$submit.on("click",(function(){$form.find(".form-required").hasClass("form-invalid")||($this.data("inited",!1),$this.empty(),$this.html($cloned),$cloned=$cloned.wpcf_clone(),$this.wpcf_reload_script())}))}}))},$.fn.wpcf_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(".wpcf-modal-load"),$content=$modal.find(".wpcf-modal-content"),$insert=$modal.find(".wpcf-modal-insert"),$loading=$modal.find(".wpcf-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",'.wpcf-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.removeClass("hidden"),$modal.hasClass("wpcf-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("wpcf-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(".wpcf--repeat-shortcode").wpcf_clone(),$appended.wpcf_reload_script(),$appended.find(".wpcf-fields").wpcf_reload_script()}))):$insert.parent().addClass("hidden")})),$insert.on("click",(function(e){if(e.preventDefault(),!$insert.prop("disabled")&&!$insert.attr("disabled")){var shortcode="",serialize=$modal.find(".wpcf-field:not(.wpcf-depend-on)").find(":input:not(.ignore)").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(shortcode=""===shortcode?"["+sc_name+"]":shortcode,gutenberg_id){var content=window.wpcf_gutenberg_props.attributes.hasOwnProperty("shortcode")?window.wpcf_gutenberg_props.attributes.shortcode:"";window.wpcf_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.addClass("hidden")}})),$modal.on("click",".wpcf--repeat-button",(function(e){e.preventDefault();var $repeatable=$modal.find(".wpcf--repeatable"),$new_clone=$cloned.wpcf_clone(),$remove_btn=$new_clone.find(".wpcf-repeat-remove"),$appended=$new_clone.appendTo($repeatable);$new_clone.find(".wpcf-fields").wpcf_reload_script(),SP_WPCF.helper.name_nested_replace($modal.find(".wpcf--repeat-shortcode"),sc_group),$remove_btn.on("click",(function(){$new_clone.remove(),SP_WPCF.helper.name_nested_replace($modal.find(".wpcf--repeat-shortcode"),sc_group)}))})),$modal.on("click",".wpcf-modal-close, .wpcf-modal-overlay",(function(){$modal.addClass("hidden")}))}))},"function"==typeof Color&&(Color.prototype.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.wpcf_color=function(){return this.each((function(){var $input=$(this),picker_color=SP_WPCF.funcs.parse_color($input.val()),palette_color=!window.wpcf_vars.color_palette.length||window.wpcf_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("wpcf--transparent-active"),$container.find(".wpcf--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="wpcf--transparent-wrap"><div class="wpcf--transparent-slider"></div><div class="wpcf--transparent-offset"></div><div class="wpcf--transparent-text"></div><div class="wpcf--transparent-button">transparent <i class="fa fa-toggle-off"></i></div></div>').appendTo($container.find(".wp-picker-holder")),$transparent_slider=$transparent_wrap.find(".wpcf--transparent-slider"),$transparent_text=$transparent_wrap.find(".wpcf--transparent-text"),$transparent_offset=$transparent_wrap.find(".wpcf--transparent-offset"),$transparent_button=$transparent_wrap.find(".wpcf--transparent-button");"transparent"===$input.val()&&$container.addClass("wpcf--transparent-active"),$transparent_button.on("click",(function(){"transparent"!==$input.val()?($input.val("transparent").trigger("change").removeClass("iris-error"),$container.addClass("wpcf--transparent-active")):($input.val(a8cIris._color.toString()).trigger("change"),$container.removeClass("wpcf--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("wpcf--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),"transparent"===default_color.value&&($input.removeClass("iris-error"),$container.addClass("wpcf--transparent-active"))}))}})}})}))},$.fn.wpcf_chosen=function(){return this.each((function(){var $this=$(this),$inited=$this.parent().find(".chosen-container"),is_sortable=$this.hasClass("wpcf-chosen-sortable")||!1,is_ajax=$this.hasClass("wpcf-chosen-ajax")||!1,is_multiple=$this.attr("multiple")||!1,set_width=is_multiple?"100%":"auto",set_options=$.extend({allow_single_deselect:!0,disable_search_threshold:10,width:set_width,no_results_text:window.wpcf_vars.i18n.no_results_text},$this.data("chosen-settings"));if($inited.length&&$inited.remove(),is_ajax){var set_ajax_options=$.extend({data:{type:"post",nonce:""},allow_single_deselect:!0,disable_search_threshold:-1,width:"100%",min_length:3,type_delay:500,typing_text:window.wpcf_vars.i18n.typing_text,searching_text:window.wpcf_vars.i18n.searching_text,no_results_text:window.wpcf_vars.i18n.no_results_text},$this.data("chosen-settings"));$this.SP_WPCFAjaxChosen(set_ajax_options)}else $this.chosen(set_options);if(is_multiple){var $hidden_select=$this.parent().find(".wpcf-hide-select"),$hidden_value=$hidden_select.val()||[];$this.on("change",(function(obj,result){result&&result.selected?$hidden_select.append('<option value="'+result.selected+'" selected="selected">'+result.selected+"</option>"):result&&result.deselected&&$hidden_select.find('option[value="'+result.deselected+'"]').remove(),void 0!==window.wp.customize&&0===$hidden_select.children().length&&$hidden_select.data("customize-setting-link")&&window.wp.customize.control($hidden_select.data("customize-setting-link")).setting.set(""),$hidden_select.trigger("change")})),$this.SP_WPCFChosenOrder($hidden_value,!0)}if(is_sortable){var $chosen_container,$chosen_choices=$this.parent().find(".chosen-container").find(".chosen-choices");$chosen_choices.bind("mousedown",(function(event){$(event.target).is("span")&&event.stopPropagation()})),$chosen_choices.sortable({items:"li:not(.search-field)",helper:"orginal",cursor:"move",placeholder:"search-choice-placeholder",start:function(e,ui){ui.placeholder.width(ui.item.innerWidth()),ui.placeholder.height(ui.item.innerHeight())},update:function(e,ui){var select_options="",chosen_object=$this.data("chosen"),$prev_select=$this.parent().find(".wpcf-hide-select");$chosen_choices.find(".search-choice-close").each((function(){var option_array_index=$(this).data("option-array-index");$.each(chosen_object.results_data,(function(index,data){data.array_index===option_array_index&&(select_options+='<option value="'+data.value+'" selected>'+data.value+"</option>")}))})),$prev_select.children().remove(),$prev_select.append(select_options),$prev_select.trigger("change")}})}}))},$.fn.wpcf_checkbox=function(){return this.each((function(){var $this=$(this),$input=$this.find(".wpcf--input"),$checkbox=$this.find(".wpcf--checkbox");$checkbox.on("click",(function(){$input.val(Number($checkbox.prop("checked"))).trigger("change")}))}))},$.fn.wpcf_siblings=function(){return this.each((function(){var $this=$(this),$siblings=$this.find(".wpcf--sibling"),multiple=$this.data("multiple")||!1;$siblings.on("click",(function(){var $sibling=$(this);multiple?$sibling.hasClass("wpcf--active")?($sibling.removeClass("wpcf--active"),$sibling.find("input").prop("checked",!1).trigger("change")):($sibling.addClass("wpcf--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("wpcf--active").siblings().removeClass("wpcf--active"))}))}))},$.fn.wpcf_help=function(){return this.each((function(){var $this=$(this),$tooltip,offset_left;$this.on({mouseenter:function(){$tooltip=$('<div class="wpcf-tooltip"></div>').html($this.find(".wpcf-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})},mouseleave:function(){void 0!==$tooltip&&$tooltip.remove()}})}))},$.fn.wpcf_customizer_refresh=function(){return this.each((function(){var $this=$(this),$complex=$this.closest(".wpcf-customize-complex");if($complex.length){var unique_id=$complex.data("unique-id");if(void 0===unique_id)return;var $input=$complex.find(":input"),option_id=$complex.data("option-id"),obj=$input.serializeObjectSP_WPCF(),data=!$.isEmptyObject(obj)&&obj[unique_id]&&obj[unique_id][option_id]?obj[unique_id][option_id]:"",control=window.wp.customize.control(unique_id+"["+option_id+"]");control.setting._value=null,control.setting.set(data)}else $this.find(":input").first().trigger("change");$(document).trigger("wpcf-customizer-refresh",$this)}))},SP_WPCF.vars.$window.on("resize wpcf.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&&($(".wpcf-section").wpcf_reload_script(),SP_WPCF.vars.onloaded=!0)}),200)).trigger("wpcf.resize"),$.fn.wpcf_widgets=function(){this.length&&($(document).on("widget-added widget-updated",(function(event,$widget){$widget.find(".wpcf-fields").wpcf_reload_script()})),$(".widgets-sortables, .control-section-sidebar").on("sortstop",(function(event,ui){ui.item.find(".wpcf-fields").wpcf_reload_script_retry()})),$(document).on("click",".widget-top",(function(event){$(this).parent().find(".wpcf-fields").wpcf_reload_script()})))},$.fn.wpcf_nav_menu=function(){return this.each((function(){var $navmenu=$(this);$navmenu.on("click","a.item-edit",(function(){$(this).closest("li.menu-item").find(".wpcf-fields").wpcf_reload_script()})),$navmenu.on("sortstop",(function(event,ui){ui.item.find(".wpcf-fields").wpcf_reload_script_retry()}))}))},$.fn.wpcf_reload_script_retry=function(){return this.each((function(){var $this=$(this);$this.data("inited")&&$this.children(".wpcf-field-wp_editor").wpcf_field_wp_editor()}))},$.fn.wpcf_reload_script=function(options){var settings=$.extend({dependency:!0},options);return this.each((function(){var $this=$(this);$this.data("inited")||($this.children(".wpcf-field-code_editor").wpcf_field_code_editor(),$this.children(".wpcf-field-gallery").wpcf_field_gallery(),$this.children(".wpcf-field-media").wpcf_field_media(),$this.children(".wpcf-field-slider").wpcf_field_slider(),$this.children(".wpcf-field-spinner").wpcf_field_spinner(),$this.children(".wpcf-field-switcher").wpcf_field_switcher(),$this.children(".wpcf-field-typography").wpcf_field_typography(),$this.children(".wpcf-field-border").find(".wpcf-color").wpcf_color(),$this.children(".wpcf-field-color").find(".wpcf-color").wpcf_color(),$this.children(".wpcf-field-color_group").find(".wpcf-color").wpcf_color(),$this.children(".wpcf-field-typography").find(".wpcf-color").wpcf_color(),$this.children(".wpcf-field-select").find(".wpcf-chosen").wpcf_chosen(),$this.children(".wpcf-field-checkbox").find(".wpcf-checkbox").wpcf_checkbox(),$this.children(".wpcf-field-button_set").find(".wpcf-siblings").wpcf_siblings(),$this.children(".wpcf-field-carousel_type").find(".wpcf-siblings").wpcf_siblings(),$this.children(".wpcf-field").find(".wpcf-help").wpcf_help(),settings.dependency&&$this.wpcf_dependency(),$this.data("inited",!0),$(document).trigger("wpcf-reload-script",$this))}))},$(document).ready((function(){function wpcf_copyToClipboard(element){var $temp=$("<input>");$("body").append($temp),$temp.val($(element).text()).select(),document.execCommand("copy"),$temp.remove()}function wpcf_SelectText(element){var r=document.createRange(),w=element.get(0);r.selectNodeContents(w);var sel=window.getSelection();sel.removeAllRanges(),sel.addRange(r)}$(".wpcf-save").wpcf_save(),$(".wpcf-options").wpcf_options(),$(".wpcf-sticky-header").wpcf_sticky(),$(".wpcf-nav-options").wpcf_nav_options(),$(".wpcf-nav-metabox").wpcf_nav_metabox(),$(".wpcf-taxonomy").wpcf_taxonomy(),$(".wpcf-page-templates").wpcf_page_templates(),$(".wpcf-post-formats").wpcf_post_formats(),$(".wpcf-shortcode").wpcf_shortcode(),$(".wpcf-search").wpcf_search(),$(".wpcf-confirm").wpcf_confirm(),$(".wpcf-expand-all").wpcf_expand_all(),$(".wpcf-onload").wpcf_reload_script(),$(".widget").wpcf_widgets(),$("#menu-to-edit").wpcf_nav_menu(),$(".wpcf-shortcode-selectable").click((function(e){e.preventDefault(),wpcf_copyToClipboard($(this)),wpcf_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 .wpcf--button").click((function(event){event.preventDefault();var $shortcode_ids=$(".wpcp_post_ids select").val();console.log($shortcode_ids);var $ex_nonce=$("#wpcf_options_noncesp_wpcf_tools").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 $(".wpcf-form-result.wpcf-form-success").text("No carousel selected.").show(),setTimeout((function(){$(".wpcf-form-result.wpcf-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(),$(".wpcf-form-result.wpcf-form-success").text("Exported successfully!").show(),setTimeout((function(){$(".wpcf-form-result.wpcf-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=$("#wpcf_options_noncesp_wpcf_tools").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){$(".wpcf-form-result.wpcf-form-success").text("Imported successfully!").show(),setTimeout((function(){$(".wpcf-form-result.wpcf-form-success").hide().text(""),$("#import").val(""),window.location.replace($("#wpcf_shortcode_link_redirect").attr("href"))}),2e3)}})}}else $(".wpcf-form-result.wpcf-form-success").text("No exported json file chosen.").show(),setTimeout((function(){$(".wpcf-form-result.wpcf-form-success").hide().text("")}),3e3)}))}))}(jQuery,window,document);
admin/views/{wpcfree-metabox/assets/js/spf-plugins.js → sp-framework/assets/js/plugins.js} RENAMED
@@ -1,4 +1,345 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  (function() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  var $, AbstractChosen, Chosen, SelectParser,
3
  bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
4
  extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
@@ -1351,7 +1692,6 @@
1351
  * http://miohtama.github.com/jquery-interdependencies/
1352
  * Copyright 2012-2013 Mikko Ohtamaa, others
1353
  *
1354
- * Modifyed by SP.
1355
  *
1356
  */
1357
  (function($) {
@@ -1533,7 +1873,7 @@
1533
  if( result ) {
1534
 
1535
  $(controls).each(function() {
1536
- $(this).removeClass('hidden');
1537
  });
1538
 
1539
  $(this.rules).each(function() {
@@ -1543,7 +1883,7 @@
1543
  } else {
1544
 
1545
  $(controls).each(function() {
1546
- $(this).addClass('hidden');
1547
  });
1548
 
1549
  $(this.rules).each(function() {
@@ -1573,7 +1913,7 @@
1573
  }
1574
  });
1575
 
1576
- $.spf_deps = {
1577
 
1578
  createRuleset: function() {
1579
  return new Ruleset();
@@ -1581,7 +1921,7 @@
1581
 
1582
  enable: function(selection, ruleset, depends) {
1583
 
1584
- selection.on('change', function(elem) {
1585
 
1586
  var depend_id = elem.target.getAttribute('data-depend-id') || elem.target.getAttribute('data-sub-depend-id');
1587
 
@@ -1599,11 +1939,15 @@
1599
 
1600
  })(jQuery);
1601
  ;/**
 
1602
  * jQuery serializeObject
 
1603
  * @copyright 2014, macek <paulmacek@gmail.com>
1604
  * @link https://github.com/macek/jquery-serialize-object
1605
  * @license BSD
1606
  * @version 2.5.0
 
 
1607
  */
1608
  (function(root, factory) {
1609
 
@@ -1628,10 +1972,10 @@
1628
  }(this, function(exports, $) {
1629
 
1630
  //
1631
- // SP: Added custom patterns for spesific validate
1632
  //
1633
  var patterns = {
1634
- validate: /^(?!_nonce)[a-zA-Z0-9_-]*(?:\[(?:\d*|(?!_nonce)[a-zA-Z0-9_-]+)\])*$/i,
1635
  key: /[a-zA-Z0-9_-]+|(?=\[\])/g,
1636
  named: /^[a-zA-Z0-9_-]+$/,
1637
  push: /^$/,
@@ -1730,7 +2074,7 @@
1730
  };
1731
 
1732
  //
1733
- // SP: Renamed function names for avoid conflicts
1734
  //
1735
 
1736
  if (typeof $.fn !== "undefined") {
@@ -1741,4 +2085,4 @@
1741
  exports.FormSerializer = FormSerializer;
1742
 
1743
  return FormSerializer;
1744
- }));
1
+ /**
2
+ *
3
+ * jQuery Chosen AJAX Autocomplete Library
4
+ *
5
+ * https://github.com/meltingice/ajax-chosen
6
+ * https://github.com/michaelperrin/ajax-chosen
7
+ *
8
+ * MIT License
9
+ *
10
+ */
11
+ (function($) {
12
+
13
+ function SP_WPCFAjaxChosen(element, options) {
14
+ this.element = $(element);
15
+ this.options = options;
16
+ this.init();
17
+ };
18
+
19
+ SP_WPCFAjaxChosen.prototype.init = function() {
20
+ this.element.chosen(this.options);
21
+ this.container = this.element.next('.chosen-container');
22
+ this.search_field = this.container.find('.chosen-search-input');
23
+ this.is_multiple = this.container.hasClass('chosen-container-multi');
24
+ this.is_typing = false;
25
+ this.chosenXhr = null;
26
+ this.events();
27
+ };
28
+
29
+ SP_WPCFAjaxChosen.prototype.events = function() {
30
+
31
+ var _this = this;
32
+
33
+ this.search_field.on('compositionstart', function() {
34
+ _this.is_typing = true;
35
+ });
36
+
37
+ this.search_field.on('compositionend', function() {
38
+ _this.is_typing = false;
39
+ _this.update_list();
40
+ });
41
+
42
+ this.search_field.on('keyup', function() {
43
+ _this.update_list();
44
+ });
45
+
46
+ this.search_field.on('focus', function() {
47
+ _this.search_field_focused();
48
+ });
49
+
50
+ };
51
+
52
+ SP_WPCFAjaxChosen.prototype.search_field_focused = function() {
53
+ this.search_welcome_message();
54
+ if ( this.options.min_length === 0 && this.search_field.val().length === 0 ) {
55
+ this.update_list();
56
+ }
57
+ };
58
+
59
+ SP_WPCFAjaxChosen.prototype.search_welcome_message = function() {
60
+
61
+ var value = $.trim(this.search_field.val());
62
+ var results = this.container.find('.chosen-results');
63
+
64
+ if ( results.children().length === 0 && value.length === 0 ) {
65
+ results.html('<li class="no-results">' + this.options.typing_text.replace('%s', this.options.min_length - value.length) + '</li>');
66
+ }
67
+
68
+ };
69
+
70
+ SP_WPCFAjaxChosen.prototype.update_list = function() {
71
+
72
+ var _this = this;
73
+
74
+ this.search_welcome_message();
75
+
76
+ if ( this.is_typing ) { return; }
77
+
78
+ var value = $.trim(this.search_field.val());
79
+ var message = ( value.length < this.options.min_length ) ? this.options.typing_text.replace('%s', this.options.min_length - value.length) : this.options.searching_text;
80
+
81
+ this.container.find('.no-results').text(message);
82
+
83
+ if ( value === this.search_field.data('prevVal') ) { return; }
84
+
85
+ this.search_field.data('prevVal', value);
86
+
87
+ if (this.timer) {
88
+ clearTimeout(this.timer);
89
+ }
90
+
91
+ if ( value.length < this.options.min_length ) { return; }
92
+
93
+ this.timer = setTimeout( function() {
94
+
95
+ if ( _this.chosenXhr ) {
96
+ _this.chosenXhr.abort();
97
+ }
98
+
99
+ _this.options.data['term'] = value;
100
+
101
+ _this.chosenXhr = window.wp.ajax.post('wpcf-chosen', _this.options.data).done( function( response ) {
102
+ _this.show_results( response );
103
+ }).fail( function( response ) {
104
+ _this.container.find('.no-results').text(response.error);
105
+ });
106
+
107
+ }, this.options.type_delay );
108
+
109
+ };
110
+
111
+ SP_WPCFAjaxChosen.prototype.show_results = function( items ) {
112
+
113
+ var _this = this;
114
+
115
+ if ( this.is_typing || items === null ) { return; }
116
+
117
+ if ( items.length === 0 ) {
118
+ this.element.data().chosen.no_results_clear();
119
+ this.element.data().chosen.no_results(this.search_field.val());
120
+ return;
121
+ }
122
+
123
+ var selected_values = [];
124
+
125
+ this.element.find('option').each(function() {
126
+ if ( $(this).is(':selected') ) {
127
+ selected_values.push( $(this).val() + "-" + $(this).text() );
128
+ } else {
129
+ if( $(this).attr('value').length ) {
130
+ $(this).remove();
131
+ }
132
+ }
133
+ });
134
+
135
+ $.each(items, function(i, item) {
136
+ if ( $.inArray( item.value + "-" + item.text, selected_values ) === -1 ) {
137
+ $('<option />').attr('value', item.value).html(item.text).appendTo(_this.element);
138
+ }
139
+ });
140
+
141
+ var value_before_trigger = this.search_field.val();
142
+ var width_before_trigger = this.search_field.innerWidth();
143
+
144
+ this.element.trigger('chosen:updated');
145
+
146
+ if( this.is_multiple ) {
147
+
148
+ var $hidden_select = this.element.parent().find('.wpcf-hide-select');
149
+ var $hidden_value = $hidden_select.val() || [];
150
+
151
+ this.element.SP_WPCFChosenOrder($hidden_value, true);
152
+ this.search_field.css('width', width_before_trigger);
153
+
154
+ }
155
+
156
+ this.search_field.val(value_before_trigger);
157
+
158
+ if ( this.chosenXhr.done !== null ) {
159
+ this.chosenXhr.done(items);
160
+ }
161
+
162
+ };
163
+
164
+ $.fn.SP_WPCFAjaxChosen = function(chosenOptions) {
165
+ return this.each(function() {
166
+ new SP_WPCFAjaxChosen(this, chosenOptions);
167
+ });
168
+ };
169
+
170
+ })(jQuery);
171
+ ;// Chosen Order v1.2.1
172
+ // This plugin allows you to handle the order of the selection for Chosen multiple <select> dropdowns
173
+ // Full source at https://github.com/tristanjahier/chosen-order
174
+ // Copyright (c) 2013 - Tristan Jahier, http://tristan-jahier.fr
175
  (function() {
176
+ var $, SP_WPCFAbstractChosenOrder, _ref,
177
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
178
+ __hasProp = {}.hasOwnProperty,
179
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
180
+
181
+ SP_WPCFAbstractChosenOrder = (function() {
182
+
183
+ function SP_WPCFAbstractChosenOrder() {}
184
+
185
+ SP_WPCFAbstractChosenOrder.insertAt = function(node, index, parentNode) {
186
+ return parentNode.insertBefore(node, parentNode.children[index].nextSibling);
187
+ };
188
+
189
+ SP_WPCFAbstractChosenOrder.getFlattenedOptionsAndGroups = function(select) {
190
+ var flattened_options, opt, options, sub_opt, sub_options, _i, _j, _len, _len1;
191
+ options = Array.prototype.filter.call(select.childNodes, function(o) {
192
+ var _ref;
193
+ return (_ref = o.nodeName.toUpperCase()) === 'OPTION' || _ref === 'OPTGROUP';
194
+ });
195
+ flattened_options = [];
196
+ for (_i = 0, _len = options.length; _i < _len; _i++) {
197
+ opt = options[_i];
198
+ flattened_options.push(opt);
199
+ if (opt.nodeName.toUpperCase() === 'OPTGROUP') {
200
+ sub_options = Array.prototype.filter.call(opt.childNodes, function(o) {
201
+ return o.nodeName.toUpperCase() === 'OPTION';
202
+ });
203
+ for (_j = 0, _len1 = sub_options.length; _j < _len1; _j++) {
204
+ sub_opt = sub_options[_j];
205
+ flattened_options.push(sub_opt);
206
+ }
207
+ }
208
+ }
209
+ return flattened_options;
210
+ };
211
+
212
+ SP_WPCFAbstractChosenOrder.isValidMultipleSelectElement = function(element) {
213
+ return element !== null && typeof element !== "undefined" && element.nodeName === "SELECT" && element.multiple;
214
+ };
215
+
216
+ SP_WPCFAbstractChosenOrder.getChosenUIContainer = function(select) {
217
+ if (select.id !== "") {
218
+ return document.getElementById(select.id.replace(/-/g, "_") + "_chosen");
219
+ } else {
220
+ return this.searchChosenUIContainer(select);
221
+ }
222
+ };
223
+
224
+ SP_WPCFAbstractChosenOrder.isChosenified = function(select) {
225
+ return this.getChosenUIContainer(select) != null;
226
+ };
227
+
228
+ SP_WPCFAbstractChosenOrder.forceSelection = function(select, selection) {
229
+ var i, opt, options, _ref;
230
+ options = this.getFlattenedOptionsAndGroups(select);
231
+ i = 0;
232
+ while (i < options.length) {
233
+ opt = options[i];
234
+ if (_ref = opt.getAttribute("value"), __indexOf.call(selection, _ref) >= 0) {
235
+ opt.selected = true;
236
+ opt.setAttribute("selected", "");
237
+ } else {
238
+ opt.selected = false;
239
+ opt.removeAttribute("selected");
240
+ }
241
+ i++;
242
+ }
243
+ return this.triggerEvent(select, "chosen:updated");
244
+ };
245
+
246
+ SP_WPCFAbstractChosenOrder.SP_WPCFChosenOrder = function(select, order, force) {
247
+ var chosen_choices, chosen_options, chosen_ui, i, j, opt, opt_val, option, options, rel, relAttributeName, _i, _j, _len, _len1, _results;
248
+ if (this.getDOMElement != null) {
249
+ select = this.getDOMElement(select);
250
+ }
251
+ if (!this.isValidMultipleSelectElement(select)) {
252
+ return;
253
+ }
254
+ chosen_ui = this.getChosenUIContainer(select);
255
+ if (chosen_ui == null) {
256
+ return;
257
+ }
258
+ if (order instanceof Array) {
259
+ order = order.map(Function.prototype.call, String.prototype.trim);
260
+ options = this.getFlattenedOptionsAndGroups(select);
261
+ if ((force != null) && force === true) {
262
+ this.forceSelection(select, order);
263
+ }
264
+ _results = [];
265
+ for (i = _i = 0, _len = order.length; _i < _len; i = ++_i) {
266
+ opt_val = order[i];
267
+ rel = null;
268
+ for (j = _j = 0, _len1 = options.length; _j < _len1; j = ++_j) {
269
+ opt = options[j];
270
+ if (opt.value === opt_val) {
271
+ rel = j;
272
+ }
273
+ }
274
+ chosen_options = chosen_ui.querySelectorAll('.search-choice');
275
+ relAttributeName = this.relAttributeName;
276
+ option = Array.prototype.filter.call(chosen_options, function(o) {
277
+ return o.querySelector("a.search-choice-close[" + relAttributeName + "=\"" + rel + "\"]") != null;
278
+ })[0];
279
+ if (option == null) {
280
+ continue;
281
+ }
282
+ chosen_choices = chosen_ui.querySelector("ul.chosen-choices");
283
+ _results.push(this.insertAt(option, i, chosen_ui.querySelector('ul.chosen-choices')));
284
+ }
285
+ return _results;
286
+ } else {
287
+ return;
288
+ }
289
+ };
290
+
291
+ return SP_WPCFAbstractChosenOrder;
292
+
293
+ })();
294
+
295
+ $ = jQuery;
296
+
297
+ $.fn.extend({
298
+ SP_WPCFChosenOrder: function(order, force) {
299
+ return _SP_WPCFChosenOrder.SP_WPCFChosenOrder(this, order, force);
300
+ }
301
+ });
302
+
303
+ this._SP_WPCFChosenOrder = (function(_super) {
304
+ __extends(_SP_WPCFChosenOrder, _super);
305
+
306
+ function _SP_WPCFChosenOrder() {
307
+ _ref = _SP_WPCFChosenOrder.__super__.constructor.apply(this, arguments);
308
+ return _ref;
309
+ }
310
+
311
+ _SP_WPCFChosenOrder.relAttributeName = 'data-option-array-index';
312
+
313
+ _SP_WPCFChosenOrder.isjQueryObject = function(obj) {
314
+ return (typeof jQuery !== "undefined" && jQuery !== null) && obj instanceof jQuery;
315
+ };
316
+
317
+ _SP_WPCFChosenOrder.getDOMElement = function(element) {
318
+ if (this.isjQueryObject(element)) {
319
+ return element.get(0);
320
+ } else {
321
+ return element;
322
+ }
323
+ };
324
+
325
+ _SP_WPCFChosenOrder.searchChosenUIContainer = function(element) {
326
+ if ($(element).data("chosen") != null) {
327
+ return $(element).data("chosen").container[0];
328
+ } else {
329
+ return $(element).next(".chosen-container.chosen-container-multi").get(0);
330
+ }
331
+ };
332
+
333
+ _SP_WPCFChosenOrder.triggerEvent = function(target, event_name) {
334
+ return $(target).trigger(event_name);
335
+ };
336
+
337
+ return _SP_WPCFChosenOrder;
338
+
339
+ })(SP_WPCFAbstractChosenOrder);
340
+
341
+ }).call(this);
342
+ ;(function() {
343
  var $, AbstractChosen, Chosen, SelectParser,
344
  bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
345
  extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
1692
  * http://miohtama.github.com/jquery-interdependencies/
1693
  * Copyright 2012-2013 Mikko Ohtamaa, others
1694
  *
 
1695
  *
1696
  */
1697
  (function($) {
1873
  if( result ) {
1874
 
1875
  $(controls).each(function() {
1876
+ $(this).removeClass('wpcf-depend-on');
1877
  });
1878
 
1879
  $(this.rules).each(function() {
1883
  } else {
1884
 
1885
  $(controls).each(function() {
1886
+ $(this).addClass('wpcf-depend-on');
1887
  });
1888
 
1889
  $(this.rules).each(function() {
1913
  }
1914
  });
1915
 
1916
+ $.wpcf_deps = {
1917
 
1918
  createRuleset: function() {
1919
  return new Ruleset();
1921
 
1922
  enable: function(selection, ruleset, depends) {
1923
 
1924
+ selection.on('change keyup', function(elem) {
1925
 
1926
  var depend_id = elem.target.getAttribute('data-depend-id') || elem.target.getAttribute('data-sub-depend-id');
1927
 
1939
 
1940
  })(jQuery);
1941
  ;/**
1942
+ *
1943
  * jQuery serializeObject
1944
+ *
1945
  * @copyright 2014, macek <paulmacek@gmail.com>
1946
  * @link https://github.com/macek/jquery-serialize-object
1947
  * @license BSD
1948
  * @version 2.5.0
1949
+ *
1950
+ *
1951
  */
1952
  (function(root, factory) {
1953
 
1972
  }(this, function(exports, $) {
1973
 
1974
  //
1975
+ // Added custom patterns for spesific validate
1976
  //
1977
  var patterns = {
1978
+ validate: /^(?!(_nonce|_pseudo))[a-zA-Z0-9_-]*(?:\[(?:\d*|(?!(_nonce|_pseudo))[a-zA-Z0-9_-]+)\])*$/i,
1979
  key: /[a-zA-Z0-9_-]+|(?=\[\])/g,
1980
  named: /^[a-zA-Z0-9_-]+$/,
1981
  push: /^$/,
2074
  };
2075
 
2076
  //
2077
+ // Renamed function names for avoid conflicts
2078
  //
2079
 
2080
  if (typeof $.fn !== "undefined") {
2085
  exports.FormSerializer = FormSerializer;
2086
 
2087
  return FormSerializer;
2088
+ }));
admin/views/sp-framework/assets/js/plugins.min.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !function($){function SP_WPCFAjaxChosen(element,options){this.element=$(element),this.options=options,this.init()}SP_WPCFAjaxChosen.prototype.init=function(){this.element.chosen(this.options),this.container=this.element.next(".chosen-container"),this.search_field=this.container.find(".chosen-search-input"),this.is_multiple=this.container.hasClass("chosen-container-multi"),this.is_typing=!1,this.chosenXhr=null,this.events()},SP_WPCFAjaxChosen.prototype.events=function(){var _this=this;this.search_field.on("compositionstart",(function(){_this.is_typing=!0})),this.search_field.on("compositionend",(function(){_this.is_typing=!1,_this.update_list()})),this.search_field.on("keyup",(function(){_this.update_list()})),this.search_field.on("focus",(function(){_this.search_field_focused()}))},SP_WPCFAjaxChosen.prototype.search_field_focused=function(){this.search_welcome_message(),0===this.options.min_length&&0===this.search_field.val().length&&this.update_list()},SP_WPCFAjaxChosen.prototype.search_welcome_message=function(){var value=$.trim(this.search_field.val()),results=this.container.find(".chosen-results");0===results.children().length&&0===value.length&&results.html('<li class="no-results">'+this.options.typing_text.replace("%s",this.options.min_length-value.length)+"</li>")},SP_WPCFAjaxChosen.prototype.update_list=function(){var _this=this;if(this.search_welcome_message(),!this.is_typing){var value=$.trim(this.search_field.val()),message=value.length<this.options.min_length?this.options.typing_text.replace("%s",this.options.min_length-value.length):this.options.searching_text;this.container.find(".no-results").text(message),value!==this.search_field.data("prevVal")&&(this.search_field.data("prevVal",value),this.timer&&clearTimeout(this.timer),value.length<this.options.min_length||(this.timer=setTimeout((function(){_this.chosenXhr&&_this.chosenXhr.abort(),_this.options.data.term=value,_this.chosenXhr=window.wp.ajax.post("wpcf-chosen",_this.options.data).done((function(response){_this.show_results(response)})).fail((function(response){_this.container.find(".no-results").text(response.error)}))}),this.options.type_delay)))}},SP_WPCFAjaxChosen.prototype.show_results=function(items){var _this=this;if(!this.is_typing&&null!==items){if(0===items.length)return this.element.data().chosen.no_results_clear(),void this.element.data().chosen.no_results(this.search_field.val());var selected_values=[];this.element.find("option").each((function(){$(this).is(":selected")?selected_values.push($(this).val()+"-"+$(this).text()):$(this).attr("value").length&&$(this).remove()})),$.each(items,(function(i,item){-1===$.inArray(item.value+"-"+item.text,selected_values)&&$("<option />").attr("value",item.value).html(item.text).appendTo(_this.element)}));var value_before_trigger=this.search_field.val(),width_before_trigger=this.search_field.innerWidth();if(this.element.trigger("chosen:updated"),this.is_multiple){var $hidden_select,$hidden_value=this.element.parent().find(".wpcf-hide-select").val()||[];this.element.SP_WPCFChosenOrder($hidden_value,!0),this.search_field.css("width",width_before_trigger)}this.search_field.val(value_before_trigger),null!==this.chosenXhr.done&&this.chosenXhr.done(items)}},$.fn.SP_WPCFAjaxChosen=function(chosenOptions){return this.each((function(){new SP_WPCFAjaxChosen(this,chosenOptions)}))}}(jQuery),function(){var $,SP_WPCFAbstractChosenOrder,_ref,__indexOf=[].indexOf||function(item){for(var i=0,l=this.length;i<l;i++)if(i in this&&this[i]===item)return i;return-1},__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent)__hasProp.call(parent,key)&&(child[key]=parent[key]);function ctor(){this.constructor=child}return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child};SP_WPCFAbstractChosenOrder=function(){function SP_WPCFAbstractChosenOrder(){}return SP_WPCFAbstractChosenOrder.insertAt=function(node,index,parentNode){return parentNode.insertBefore(node,parentNode.children[index].nextSibling)},SP_WPCFAbstractChosenOrder.getFlattenedOptionsAndGroups=function(select){var flattened_options,opt,options,sub_opt,sub_options,_i,_j,_len,_len1;for(flattened_options=[],_i=0,_len=(options=Array.prototype.filter.call(select.childNodes,(function(o){var _ref;return"OPTION"===(_ref=o.nodeName.toUpperCase())||"OPTGROUP"===_ref}))).length;_i<_len;_i++)if(opt=options[_i],flattened_options.push(opt),"OPTGROUP"===opt.nodeName.toUpperCase())for(_j=0,_len1=(sub_options=Array.prototype.filter.call(opt.childNodes,(function(o){return"OPTION"===o.nodeName.toUpperCase()}))).length;_j<_len1;_j++)sub_opt=sub_options[_j],flattened_options.push(sub_opt);return flattened_options},SP_WPCFAbstractChosenOrder.isValidMultipleSelectElement=function(element){return null!=element&&"SELECT"===element.nodeName&&element.multiple},SP_WPCFAbstractChosenOrder.getChosenUIContainer=function(select){return""!==select.id?document.getElementById(select.id.replace(/-/g,"_")+"_chosen"):this.searchChosenUIContainer(select)},SP_WPCFAbstractChosenOrder.isChosenified=function(select){return null!=this.getChosenUIContainer(select)},SP_WPCFAbstractChosenOrder.forceSelection=function(select,selection){var i,opt,options,_ref;for(options=this.getFlattenedOptionsAndGroups(select),i=0;i<options.length;)_ref=(opt=options[i]).getAttribute("value"),__indexOf.call(selection,_ref)>=0?(opt.selected=!0,opt.setAttribute("selected","")):(opt.selected=!1,opt.removeAttribute("selected")),i++;return this.triggerEvent(select,"chosen:updated")},SP_WPCFAbstractChosenOrder.SP_WPCFChosenOrder=function(select,order,force){var chosen_choices,chosen_options,chosen_ui,i,j,opt,opt_val,option,options,rel,relAttributeName,_i,_j,_len,_len1,_results;if(null!=this.getDOMElement&&(select=this.getDOMElement(select)),this.isValidMultipleSelectElement(select)&&null!=(chosen_ui=this.getChosenUIContainer(select))&&order instanceof Array){for(order=order.map(Function.prototype.call,String.prototype.trim),options=this.getFlattenedOptionsAndGroups(select),null!=force&&!0===force&&this.forceSelection(select,order),_results=[],i=_i=0,_len=order.length;_i<_len;i=++_i){for(opt_val=order[i],rel=null,j=_j=0,_len1=options.length;_j<_len1;j=++_j)(opt=options[j]).value===opt_val&&(rel=j);chosen_options=chosen_ui.querySelectorAll(".search-choice"),relAttributeName=this.relAttributeName,null!=(option=Array.prototype.filter.call(chosen_options,(function(o){return null!=o.querySelector("a.search-choice-close["+relAttributeName+'="'+rel+'"]')}))[0])&&(chosen_choices=chosen_ui.querySelector("ul.chosen-choices"),_results.push(this.insertAt(option,i,chosen_ui.querySelector("ul.chosen-choices"))))}return _results}},SP_WPCFAbstractChosenOrder}(),($=jQuery).fn.extend({SP_WPCFChosenOrder:function(order,force){return _SP_WPCFChosenOrder.SP_WPCFChosenOrder(this,order,force)}}),this._SP_WPCFChosenOrder=function(_super){function _SP_WPCFChosenOrder(){return _ref=_SP_WPCFChosenOrder.__super__.constructor.apply(this,arguments)}return __extends(_SP_WPCFChosenOrder,_super),_SP_WPCFChosenOrder.relAttributeName="data-option-array-index",_SP_WPCFChosenOrder.isjQueryObject=function(obj){return"undefined"!=typeof jQuery&&null!==jQuery&&obj instanceof jQuery},_SP_WPCFChosenOrder.getDOMElement=function(element){return this.isjQueryObject(element)?element.get(0):element},_SP_WPCFChosenOrder.searchChosenUIContainer=function(element){return null!=$(element).data("chosen")?$(element).data("chosen").container[0]:$(element).next(".chosen-container.chosen-container-multi").get(0)},_SP_WPCFChosenOrder.triggerEvent=function(target,event_name){return $(target).trigger(event_name)},_SP_WPCFChosenOrder}(SP_WPCFAbstractChosenOrder)}.call(this),function(){var $,AbstractChosen,Chosen,SelectParser,bind=function(fn,me){return function(){return fn.apply(me,arguments)}},extend=function(child,parent){for(var key in parent)hasProp.call(parent,key)&&(child[key]=parent[key]);function ctor(){this.constructor=child}return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child},hasProp={}.hasOwnProperty;(SelectParser=function(){function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(child){return"OPTGROUP"===child.nodeName.toUpperCase()?this.add_group(child):this.add_option(child)},SelectParser.prototype.add_group=function(group){var group_position,i,len,option,ref,results1;for(group_position=this.parsed.length,this.parsed.push({array_index:group_position,group:!0,label:group.label,title:group.title?group.title:void 0,children:0,disabled:group.disabled,classes:group.className}),results1=[],i=0,len=(ref=group.childNodes).length;i<len;i++)option=ref[i],results1.push(this.add_option(option,group_position,group.disabled));return results1},SelectParser.prototype.add_option=function(option,group_position,group_disabled){if("OPTION"===option.nodeName.toUpperCase())return""!==option.text?(null!=group_position&&(this.parsed[group_position].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:option.value,text:option.text,html:option.innerHTML,title:option.title?option.title:void 0,selected:option.selected,disabled:!0===group_disabled?group_disabled:option.disabled,group_array_index:group_position,group_label:null!=group_position?this.parsed[group_position].label:null,classes:option.className,style:option.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},SelectParser}()).select_to_array=function(select){var child,i,len,parser,ref;for(parser=new SelectParser,i=0,len=(ref=select.childNodes).length;i<len;i++)child=ref[i],parser.add_node(child);return parser.parsed},AbstractChosen=function(){function AbstractChosen(form_field,options1){this.form_field=form_field,this.options=null!=options1?options1:{},this.label_click_handler=bind(this.label_click_handler,this),AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return AbstractChosen.prototype.set_default_values=function(){var _this;return this.click_test_action=(_this=this,function(evt){return _this.test_active_click(evt)}),this.activate_action=function(_this){return function(evt){return _this.activate_field(evt)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},AbstractChosen.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.choice_label=function(item){return this.include_group_label_in_selected&&null!=item.group_label?"<b class='group-name'>"+this.escape_html(item.group_label)+"</b>"+item.html:item.html},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(evt){if(this.is_multiple){if(!this.active_field)return setTimeout((_this=this,function(){return _this.container_mousedown()}),50)}else if(!this.active_field)return this.activate_field();var _this},AbstractChosen.prototype.input_blur=function(evt){if(!this.mouse_on_container)return this.active_field=!1,setTimeout((_this=this,function(){return _this.blur_test()}),100);var _this},AbstractChosen.prototype.label_click_handler=function(evt){return this.is_multiple?this.container_mousedown(evt):this.activate_field()},AbstractChosen.prototype.results_option_build=function(options){var content,data,data_content,i,len,ref,shown_results;for(content="",shown_results=0,i=0,len=(ref=this.results_data).length;i<len&&(data_content="",""!==(data_content=(data=ref[i]).group?this.result_add_group(data):this.result_add_option(data))&&(shown_results++,content+=data_content),(null!=options?options.first:void 0)&&(data.selected&&this.is_multiple?this.choice_build(data):data.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(data))),!(shown_results>=this.max_shown_results));i++);return content},AbstractChosen.prototype.result_add_option=function(option){var classes,option_el;return option.search_match&&this.include_option_in_results(option)?(classes=[],option.disabled||option.selected&&this.is_multiple||classes.push("active-result"),!option.disabled||option.selected&&this.is_multiple||classes.push("disabled-result"),option.selected&&classes.push("result-selected"),null!=option.group_array_index&&classes.push("group-option"),""!==option.classes&&classes.push(option.classes),(option_el=document.createElement("li")).className=classes.join(" "),option.style&&(option_el.style.cssText=option.style),option_el.setAttribute("data-option-array-index",option.array_index),option_el.innerHTML=option.highlighted_html||option.html,option.title&&(option_el.title=option.title),this.outerHTML(option_el)):""},AbstractChosen.prototype.result_add_group=function(group){var classes,group_el;return(group.search_match||group.group_match)&&group.active_options>0?((classes=[]).push("group-result"),group.classes&&classes.push(group.classes),(group_el=document.createElement("li")).className=classes.join(" "),group_el.innerHTML=group.highlighted_html||this.escape_html(group.label),group.title&&(group_el.title=group.title),this.outerHTML(group_el)):""},AbstractChosen.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},AbstractChosen.prototype.reset_single_select_options=function(){var i,len,ref,result,results1;for(results1=[],i=0,len=(ref=this.results_data).length;i<len;i++)(result=ref[i]).selected?results1.push(result.selected=!1):results1.push(void 0);return results1},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(evt){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(options){var escapedQuery,fix,i,len,option,prefix,query,ref,regex,results,results_group,search_match,startpos,suffix,text;for(this.no_results_clear(),results=0,escapedQuery=(query=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),regex=this.get_search_regex(escapedQuery),i=0,len=(ref=this.results_data).length;i<len;i++)(option=ref[i]).search_match=!1,results_group=null,search_match=null,option.highlighted_html="",this.include_option_in_results(option)&&(option.group&&(option.group_match=!1,option.active_options=0),null!=option.group_array_index&&this.results_data[option.group_array_index]&&(0===(results_group=this.results_data[option.group_array_index]).active_options&&results_group.search_match&&(results+=1),results_group.active_options+=1),text=option.group?option.label:option.text,option.group&&!this.group_search||(search_match=this.search_string_match(text,regex),option.search_match=null!=search_match,option.search_match&&!option.group&&(results+=1),option.search_match?(query.length&&(startpos=search_match.index,prefix=text.slice(0,startpos),fix=text.slice(startpos,startpos+query.length),suffix=text.slice(startpos+query.length),option.highlighted_html=this.escape_html(prefix)+"<em>"+this.escape_html(fix)+"</em>"+this.escape_html(suffix)),null!=results_group&&(results_group.group_match=!0)):null!=option.group_array_index&&this.results_data[option.group_array_index].search_match&&(option.search_match=!0)));return this.result_clear_highlight(),results<1&&query.length?(this.update_results_content(""),this.no_results(query)):(this.update_results_content(this.results_option_build()),(null!=options?options.skip_highlight:void 0)?void 0:this.winnow_results_set_highlight())},AbstractChosen.prototype.get_search_regex=function(escaped_search_string){var regex_flag,regex_string;return regex_string=this.search_contains?escaped_search_string:"(^|\\s|\\b)"+escaped_search_string+"[^\\s]*",this.enable_split_word_search||this.search_contains||(regex_string="^"+regex_string),regex_flag=this.case_sensitive_search?"":"i",new RegExp(regex_string,regex_flag)},AbstractChosen.prototype.search_string_match=function(search_string,regex){var match;return match=regex.exec(search_string),!this.search_contains&&(null!=match?match[1]:void 0)&&(match.index+=1),match},AbstractChosen.prototype.choices_count=function(){var i,len,option,ref;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,i=0,len=(ref=this.form_field.options).length;i<len;i++)(option=ref[i]).selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(evt){if(evt.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},AbstractChosen.prototype.keydown_checker=function(evt){var ref,stroke;switch(stroke=null!=(ref=evt.which)?ref:evt.keyCode,this.search_field_scale(),8!==stroke&&this.pending_backstroke&&this.clear_backstroke(),stroke){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(evt),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&evt.preventDefault();break;case 32:this.disable_search&&evt.preventDefault();break;case 38:evt.preventDefault(),this.keyup_arrow();break;case 40:evt.preventDefault(),this.keydown_arrow()}},AbstractChosen.prototype.keyup_checker=function(evt){var ref,stroke;switch(stroke=null!=(ref=evt.which)?ref:evt.keyCode,this.search_field_scale(),stroke){case 8:this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:evt.preventDefault(),this.results_showing&&this.result_select(evt);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},AbstractChosen.prototype.clipboard_event_checker=function(evt){var _this;if(!this.is_disabled)return setTimeout((_this=this,function(){return _this.results_search()}),50)},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(option){return!(this.is_multiple&&!this.display_selected_options&&option.selected)&&(!(!this.display_disabled_options&&option.disabled)&&!option.empty)},AbstractChosen.prototype.search_results_touchstart=function(evt){return this.touch_started=!0,this.search_results_mouseover(evt)},AbstractChosen.prototype.search_results_touchmove=function(evt){return this.touch_started=!1,this.search_results_mouseout(evt)},AbstractChosen.prototype.search_results_touchend=function(evt){if(this.touch_started)return this.search_results_mouseup(evt)},AbstractChosen.prototype.outerHTML=function(element){var tmp;return element.outerHTML?element.outerHTML:((tmp=document.createElement("div")).appendChild(element),tmp.innerHTML)},AbstractChosen.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n <span>'+this.default_text+'</span>\n <div><b></b></div>\n</a>\n<div class="chosen-drop">\n <div class="chosen-search">\n <input class="chosen-search-input" type="text" autocomplete="off" />\n </div>\n <ul class="chosen-results"></ul>\n</div>'},AbstractChosen.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n <li class="search-field">\n <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n </li>\n</ul>\n<div class="chosen-drop">\n <ul class="chosen-results"></ul>\n</div>'},AbstractChosen.prototype.get_no_results_html=function(terms){return'<li class="no-results">\n '+this.results_none_found+" <span>"+this.escape_html(terms)+"</span>\n</li>"},AbstractChosen.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen}(),($=jQuery).fn.extend({chosen:function(options){return AbstractChosen.browser_is_supported()?this.each((function(input_field){var $this,chosen;chosen=($this=$(this)).data("chosen"),"destroy"!==options?chosen instanceof Chosen||$this.data("chosen",new Chosen(this,options)):chosen instanceof Chosen&&chosen.destroy()})):this}}),Chosen=function(superClass){function Chosen(){return Chosen.__super__.constructor.apply(this,arguments)}return extend(Chosen,superClass),Chosen.prototype.setup=function(){return this.form_field_jq=$(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},Chosen.prototype.set_up_html=function(){var container_classes,container_props;return(container_classes=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&container_classes.push(this.form_field.className),this.is_rtl&&container_classes.push("chosen-rtl"),container_props={class:container_classes.join(" "),title:this.form_field.title},this.form_field.id.length&&(container_props.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=$("<div />",container_props),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},Chosen.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var _this;return this.container.on("touchstart.chosen",(_this=this,function(evt){_this.container_mousedown(evt)})),this.container.on("touchend.chosen",function(_this){return function(evt){_this.container_mouseup(evt)}}(this)),this.container.on("mousedown.chosen",function(_this){return function(evt){_this.container_mousedown(evt)}}(this)),this.container.on("mouseup.chosen",function(_this){return function(evt){_this.container_mouseup(evt)}}(this)),this.container.on("mouseenter.chosen",function(_this){return function(evt){_this.mouse_enter(evt)}}(this)),this.container.on("mouseleave.chosen",function(_this){return function(evt){_this.mouse_leave(evt)}}(this)),this.search_results.on("mouseup.chosen",function(_this){return function(evt){_this.search_results_mouseup(evt)}}(this)),this.search_results.on("mouseover.chosen",function(_this){return function(evt){_this.search_results_mouseover(evt)}}(this)),this.search_results.on("mouseout.chosen",function(_this){return function(evt){_this.search_results_mouseout(evt)}}(this)),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",function(_this){return function(evt){_this.search_results_mousewheel(evt)}}(this)),this.search_results.on("touchstart.chosen",function(_this){return function(evt){_this.search_results_touchstart(evt)}}(this)),this.search_results.on("touchmove.chosen",function(_this){return function(evt){_this.search_results_touchmove(evt)}}(this)),this.search_results.on("touchend.chosen",function(_this){return function(evt){_this.search_results_touchend(evt)}}(this)),this.form_field_jq.on("chosen:updated.chosen",function(_this){return function(evt){_this.results_update_field(evt)}}(this)),this.form_field_jq.on("chosen:activate.chosen",function(_this){return function(evt){_this.activate_field(evt)}}(this)),this.form_field_jq.on("chosen:open.chosen",function(_this){return function(evt){_this.container_mousedown(evt)}}(this)),this.form_field_jq.on("chosen:close.chosen",function(_this){return function(evt){_this.close_field(evt)}}(this)),this.search_field.on("blur.chosen",function(_this){return function(evt){_this.input_blur(evt)}}(this)),this.search_field.on("keyup.chosen",function(_this){return function(evt){_this.keyup_checker(evt)}}(this)),this.search_field.on("keydown.chosen",function(_this){return function(evt){_this.keydown_checker(evt)}}(this)),this.search_field.on("focus.chosen",function(_this){return function(evt){_this.input_focus(evt)}}(this)),this.search_field.on("cut.chosen",function(_this){return function(evt){_this.clipboard_event_checker(evt)}}(this)),this.search_field.on("paste.chosen",function(_this){return function(evt){_this.clipboard_event_checker(evt)}}(this)),this.is_multiple?this.search_choices.on("click.chosen",function(_this){return function(evt){_this.choices_click(evt)}}(this)):this.container.on("click.chosen",(function(evt){evt.preventDefault()}))},Chosen.prototype.destroy=function(){return $(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.form_field_label.length>0&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},Chosen.prototype.container_mousedown=function(evt){var ref;if(!this.is_disabled)return!evt||"mousedown"!==(ref=evt.type)&&"touchstart"!==ref||this.results_showing||evt.preventDefault(),null!=evt&&$(evt.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!evt||$(evt.target)[0]!==this.selected_item[0]&&!$(evt.target).parents("a.chosen-single").length||(evt.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),$(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(evt){if("ABBR"===evt.target.nodeName&&!this.is_disabled)return this.results_reset(evt)},Chosen.prototype.search_results_mousewheel=function(evt){var delta;if(evt.originalEvent&&(delta=evt.originalEvent.deltaY||-evt.originalEvent.wheelDelta||evt.originalEvent.detail),null!=delta)return evt.preventDefault(),"DOMMouseScroll"===evt.type&&(delta*=40),this.search_results.scrollTop(delta+this.search_results.scrollTop())},Chosen.prototype.blur_test=function(evt){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},Chosen.prototype.close_field=function(){return $(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},Chosen.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(evt){var active_container;return(active_container=$(evt.target).closest(".chosen-container")).length&&this.container[0]===active_container[0]?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(el){var high_bottom,high_top,maxHeight,visible_bottom,visible_top;if(el.length){if(this.result_clear_highlight(),this.result_highlight=el,this.result_highlight.addClass("highlighted"),visible_bottom=(maxHeight=parseInt(this.search_results.css("maxHeight"),10))+(visible_top=this.search_results.scrollTop()),(high_bottom=(high_top=this.result_highlight.position().top+this.search_results.scrollTop())+this.result_highlight.outerHeight())>=visible_bottom)return this.search_results.scrollTop(high_bottom-maxHeight>0?high_bottom-maxHeight:0);if(high_top<visible_top)return this.search_results.scrollTop(high_top)}},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.get_search_field_value()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},Chosen.prototype.update_results_content=function(content){return this.search_results.html(content)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(el){var ti;if(this.form_field.tabIndex)return ti=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=ti},Chosen.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=$("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return this.form_field_label.on("click.chosen",this.label_click_handler)},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(evt){var target;if((target=$(evt.target).hasClass("active-result")?$(evt.target):$(evt.target).parents(".active-result").first()).length)return this.result_highlight=target,this.result_select(evt),this.search_field.focus()},Chosen.prototype.search_results_mouseover=function(evt){var target;if(target=$(evt.target).hasClass("active-result")?$(evt.target):$(evt.target).parents(".active-result").first())return this.result_do_highlight(target)},Chosen.prototype.search_results_mouseout=function(evt){if($(evt.target).hasClass("active-result")||$(evt.target).parents(".active-result").first())return this.result_clear_highlight()},Chosen.prototype.choice_build=function(item){var choice,close_link,_this;return choice=$("<li />",{class:"search-choice"}).html("<span>"+this.choice_label(item)+"</span>"),item.disabled?choice.addClass("search-choice-disabled"):((close_link=$("<a />",{class:"search-choice-close","data-option-array-index":item.array_index})).on("click.chosen",(_this=this,function(evt){return _this.choice_destroy_link_click(evt)})),choice.append(close_link)),this.search_container.before(choice)},Chosen.prototype.choice_destroy_link_click=function(evt){if(evt.preventDefault(),evt.stopPropagation(),!this.is_disabled)return this.choice_destroy($(evt.target))},Chosen.prototype.choice_destroy=function(link){if(this.result_deselect(link[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),link.parents("li").first().remove(),this.search_field_scale()},Chosen.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(evt){var high,item;if(this.result_highlight)return high=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?high.removeClass("active-result"):this.reset_single_select_options(),high.addClass("result-selected"),(item=this.results_data[high[0].getAttribute("data-option-array-index")]).selected=!0,this.form_field.options[item.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(item):this.single_set_selected_text(this.choice_label(item)),this.is_multiple&&(!this.hide_results_on_select||evt.metaKey||evt.ctrlKey)?evt.metaKey||evt.ctrlKey?this.winnow_results({skip_highlight:!0}):(this.search_field.val(""),this.winnow_results()):(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[item.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,evt.preventDefault(),this.search_field_scale())},Chosen.prototype.single_set_selected_text=function(text){return null==text&&(text=this.default_text),text===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(text)},Chosen.prototype.result_deselect=function(pos){var result_data;return result_data=this.results_data[pos],!this.form_field.options[result_data.options_index].disabled&&(result_data.selected=!1,this.form_field.options[result_data.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[result_data.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},Chosen.prototype.get_search_field_value=function(){return this.search_field.val()},Chosen.prototype.get_search_text=function(){return $.trim(this.get_search_field_value())},Chosen.prototype.escape_html=function(text){return $("<div/>").text(text).html()},Chosen.prototype.winnow_results_set_highlight=function(){var do_high,selected_results;if(null!=(do_high=(selected_results=this.is_multiple?[]:this.search_results.find(".result-selected.active-result")).length?selected_results.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(do_high)},Chosen.prototype.no_results=function(terms){var no_results_html;return no_results_html=this.get_no_results_html(terms),this.search_results.append(no_results_html),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var next_sib;return this.results_showing&&this.result_highlight?(next_sib=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(next_sib):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var prev_sibs;return this.results_showing||this.is_multiple?this.result_highlight?(prev_sibs=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(prev_sibs.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},Chosen.prototype.keydown_backstroke=function(){var next_available_destroy;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(next_available_destroy=this.search_container.siblings("li.search-choice").last()).length&&!next_available_destroy.hasClass("search-choice-disabled")?(this.pending_backstroke=next_available_destroy,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.search_field_scale=function(){var div,i,len,style,style_block,styles,width;if(this.is_multiple){for(style_block={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},i=0,len=(styles=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;i<len;i++)style_block[style=styles[i]]=this.search_field.css(style);return(div=$("<div />").css(style_block)).text(this.get_search_field_value()),$("body").append(div),width=div.width()+25,div.remove(),this.container.is(":visible")&&(width=Math.min(this.container.outerWidth()-10,width)),this.search_field.width(width)}},Chosen.prototype.trigger_form_field_change=function(extra){return this.form_field_jq.trigger("input",extra),this.form_field_jq.trigger("change",extra)},Chosen}(AbstractChosen)}.call(this),function($){"use strict";function Rule(controller,condition,value){this.init(controller,condition,value)}function Ruleset(){this.rules=[]}$.extend(Rule.prototype,{init:function(controller,condition,value){this.controller=controller,this.condition=condition,this.value=value,this.rules=[],this.controls=[]},evalCondition:function(context,control,condition,val1,val2){if("=="==condition)return this.checkBoolean(val1)==this.checkBoolean(val2);if("!="==condition)return this.checkBoolean(val1)!=this.checkBoolean(val2);if(">="==condition)return Number(val2)>=Number(val1);if("<="==condition)return Number(val2)<=Number(val1);if(">"==condition)return Number(val2)>Number(val1);if("<"==condition)return Number(val2)<Number(val1);if("()"==condition)return window[val1](context,control,val2);if("any"==condition){if($.isArray(val2)){for(var i=val2.length-1;i>=0;i--)if(-1!==$.inArray(val2[i],val1.split(",")))return!0}else if(-1!==$.inArray(val2,val1.split(",")))return!0}else if("not-any"==condition)if($.isArray(val2)){for(var i=val2.length-1;i>=0;i--)if(-1==$.inArray(val2[i],val1.split(",")))return!0}else if(-1==$.inArray(val2,val1.split(",")))return!0;return!1},checkBoolean:function(value){switch(value){case!0:case"true":case 1:case"1":value=!0;break;case null:case!1:case"false":case 0:case"0":value=!1}return value},checkCondition:function(context){if(!this.condition)return!0;var control=context.find(this.controller),control_value=this.getControlValue(context,control);return void 0!==control_value&&(control_value=this.normalizeValue(control,this.value,control_value),this.evalCondition(context,control,this.condition,this.value,control_value))},normalizeValue:function(control,baseValue,control_value){return"number"==typeof baseValue?parseFloat(control_value):control_value},getControlValue:function(context,control){return control.length>1&&("radio"==control.attr("type")||"checkbox"==control.attr("type"))?control.filter(":checked").map((function(){return this.value})).get():"checkbox"==control.attr("type")||"radio"==control.attr("type")?control.is(":checked"):control.val()},createRule:function(controller,condition,value){var rule=new Rule(controller,condition,value);return this.rules.push(rule),rule},include:function(input){this.controls.push(input)},applyRule:function(context,enforced){var result;result=void 0===enforced?this.checkCondition(context):enforced;var controls=$.map(this.controls,(function(elem,idx){return context.find(elem)}));result?($(controls).each((function(){$(this).removeClass("wpcf-depend-on")})),$(this.rules).each((function(){this.applyRule(context)}))):($(controls).each((function(){$(this).addClass("wpcf-depend-on")})),$(this.rules).each((function(){this.applyRule(context,!1)})))}}),$.extend(Ruleset.prototype,{createRule:function(controller,condition,value){var rule=new Rule(controller,condition,value);return this.rules.push(rule),rule},applyRules:function(context){$(this.rules).each((function(){this.applyRule(context)}))}}),$.wpcf_deps={createRuleset:function(){return new Ruleset},enable:function(selection,ruleset,depends){return selection.on("change keyup",(function(elem){var depend_id=elem.target.getAttribute("data-depend-id")||elem.target.getAttribute("data-sub-depend-id");-1!==depends.indexOf(depend_id)&&ruleset.applyRules(selection)})),ruleset.applyRules(selection),!0}}}(jQuery),
2
+ /**
3
+ *
4
+ * jQuery serializeObject
5
+ *
6
+ * @copyright 2014, macek <paulmacek@gmail.com>
7
+ * @link https://github.com/macek/jquery-serialize-object
8
+ * @license BSD
9
+ * @version 2.5.0
10
+ *
11
+ */
12
+ function(root,factory){if("function"==typeof define&&define.amd)define(["exports","jquery"],(function(exports,$){return factory(exports,$)}));else if("undefined"!=typeof exports){var $=require("jquery");factory(exports,$)}else factory(root,root.jQuery||root.Zepto||root.ender||root.$)}(this,(function(exports,$){var patterns={validate:/^(?!(_nonce|_pseudo))[a-zA-Z0-9_-]*(?:\[(?:\d*|(?!(_nonce|_pseudo))[a-zA-Z0-9_-]+)\])*$/i,key:/[a-zA-Z0-9_-]+|(?=\[\])/g,named:/^[a-zA-Z0-9_-]+$/,push:/^$/,fixed:/^\d+$/};function FormSerializer(helper,$form){var data={},pushes={};function build(base,key,value){return base[key]=value,base}function makeObject(root,value){for(var keys=root.match(patterns.key),k;void 0!==(k=keys.pop());){var idx;if(patterns.push.test(k))value=build([],incrementPush(root.replace(/\[\]$/,"")),value);else patterns.fixed.test(k)?value=build([],k,value):patterns.named.test(k)&&(value=build({},k,value))}return value}function incrementPush(key){return void 0===pushes[key]&&(pushes[key]=0),pushes[key]++}function addPair(pair){if(!patterns.validate.test(pair.name))return this;var obj=makeObject(pair.name,pair.value);return data=helper.extend(!0,data,obj),this}function addPairs(pairs){if(!helper.isArray(pairs))throw new Error("formSerializer.addPairs expects an Array");for(var i=0,len=pairs.length;i<len;i++)this.addPair(pairs[i]);return this}function serialize(){return data}function serializeJSON(){return JSON.stringify(serialize())}this.addPair=addPair,this.addPairs=addPairs,this.serialize=serialize,this.serializeJSON=serializeJSON}return FormSerializer.patterns=patterns,FormSerializer.serializeObject=function serializeObject(){return new FormSerializer($,this).addPairs(this.serializeArray()).serialize()},FormSerializer.serializeJSON=function serializeJSON(){return new FormSerializer($,this).addPairs(this.serializeArray()).serializeJSON()},void 0!==$.fn&&($.fn.serializeObjectSP_WPCF=FormSerializer.serializeObject,$.fn.serializeJSONSP_WPCF=FormSerializer.serializeJSON),exports.FormSerializer=FormSerializer,FormSerializer}));
admin/views/sp-framework/classes/abstract.class.php ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Abstract Class
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ * @package WP Carousel
9
+ * @subpackage wp-carousel-free/sp-framework
10
+ */
11
+
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ die; } // Cannot access directly.
14
+
15
+ if ( ! class_exists( 'SP_WPCF_Abstract' ) ) {
16
+ /**
17
+ *
18
+ * Abstract Class
19
+ *
20
+ * @since 1.0.0
21
+ * @version 1.0.0
22
+ */
23
+ abstract class SP_WPCF_Abstract {
24
+
25
+ /**
26
+ * Abstract
27
+ *
28
+ * @var string
29
+ */
30
+ public $abstract = '';
31
+ /**
32
+ * Output_css
33
+ *
34
+ * @var string
35
+ */
36
+ public $output_css = '';
37
+
38
+ /**
39
+ * Abstract construct
40
+ *
41
+ * @return void
42
+ */
43
+ public function __construct() {
44
+
45
+ // Collect output css and typography.
46
+ if ( ! empty( $this->args['output_css'] ) || ! empty( $this->args['enqueue_webfont'] ) ) {
47
+ add_action( 'wp_enqueue_scripts', array( $this, 'collect_output_css_and_typography' ), 10 );
48
+ SP_WPCF::$css = apply_filters( "wpcf_{$this->unique}_output_css", SP_WPCF::$css, $this );
49
+ }
50
+
51
+ }
52
+
53
+ /**
54
+ * Collect_output_css_and_typography
55
+ *
56
+ * @return void
57
+ */
58
+ public function collect_output_css_and_typography() {
59
+ $this->recursive_output_css( $this->pre_fields );
60
+ }
61
+
62
+ /**
63
+ * Recursive_output_css
64
+ *
65
+ * @param array $fields fields.
66
+ * @param array $combine_field combine field.
67
+ * @return void
68
+ */
69
+ public function recursive_output_css( $fields = array(), $combine_field = array() ) {
70
+
71
+ if ( ! empty( $fields ) ) {
72
+
73
+ foreach ( $fields as $field ) {
74
+
75
+ $field_id = ( ! empty( $field['id'] ) ) ? $field['id'] : '';
76
+ $field_type = ( ! empty( $field['type'] ) ) ? $field['type'] : '';
77
+ $field_output = ( ! empty( $field['output'] ) ) ? $field['output'] : '';
78
+ $field_check = ( 'typography' === $field_type || $field_output ) ? true : false;
79
+ $field_class = 'SP_WPCF_Field_' . $field_type;
80
+
81
+ if ( $field_type && $field_id ) {
82
+
83
+ if ( 'fieldset' === $field_type ) {
84
+ if ( ! empty( $field['fields'] ) ) {
85
+ $this->recursive_output_css( $field['fields'], $field );
86
+ }
87
+ }
88
+
89
+ if ( 'accordion' === $field_type ) {
90
+ if ( ! empty( $field['accordions'] ) ) {
91
+ foreach ( $field['accordions'] as $accordion ) {
92
+ $this->recursive_output_css( $accordion['fields'], $field );
93
+ }
94
+ }
95
+ }
96
+
97
+ if ( 'tabbed' === $field_type ) {
98
+ if ( ! empty( $field['tabs'] ) ) {
99
+ foreach ( $field['tabs'] as $accordion ) {
100
+ $this->recursive_output_css( $accordion['fields'], $field );
101
+ }
102
+ }
103
+ }
104
+
105
+ if ( class_exists( $field_class ) ) {
106
+
107
+ if ( method_exists( $field_class, 'output' ) || method_exists( $field_class, 'enqueue_google_fonts' ) ) {
108
+
109
+ $field_value = '';
110
+
111
+ if ( $field_check && ( 'options' === $this->abstract || 'customize' === $this->abstract ) ) {
112
+
113
+ if ( ! empty( $combine_field ) ) {
114
+
115
+ $field_value = ( isset( $this->options[ $combine_field['id'] ][ $field_id ] ) ) ? $this->options[ $combine_field['id'] ][ $field_id ] : '';
116
+
117
+ } else {
118
+
119
+ $field_value = ( isset( $this->options[ $field_id ] ) ) ? $this->options[ $field_id ] : '';
120
+
121
+ }
122
+ } elseif ( $field_check && ( 'metabox' === $this->abstract && is_singular() || 'taxonomy' === $this->abstract && is_archive() ) ) {
123
+
124
+ if ( ! empty( $combine_field ) ) {
125
+
126
+ $meta_value = $this->get_meta_value( $combine_field );
127
+ $field_value = ( isset( $meta_value[ $field_id ] ) ) ? $meta_value[ $field_id ] : '';
128
+
129
+ } else {
130
+
131
+ $meta_value = $this->get_meta_value( $field );
132
+ $field_value = ( isset( $meta_value ) ) ? $meta_value : '';
133
+
134
+ }
135
+ }
136
+
137
+ $instance = new $field_class( $field, $field_value, $this->unique, 'wp/enqueue', $this );
138
+
139
+ // typography enqueue and embed google web fonts.
140
+ // if ( 'typography' === $field_type && $this->args['enqueue_webfont'] && ! empty( $field_value['font-family'] ) ) {
141
+
142
+ // $method = ( ! empty( $this->args['async_webfont'] ) ) ? 'async' : 'enqueue';
143
+
144
+ // $instance->enqueue_google_fonts( $method );
145
+
146
+ // }
147
+
148
+ // Output css.
149
+ if ( $field_output && $this->args['output_css'] ) {
150
+ SP_WPCF::$css .= $instance->output();
151
+ }
152
+
153
+ unset( $instance );
154
+
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
160
+
161
+ }
162
+
163
+ }
164
+ }
admin/views/sp-framework/classes/admin-options.class.php ADDED
@@ -0,0 +1,878 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Options Class
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ * @package WP Carousel
9
+ * @subpackage wp-carousel-free/sp-framework
10
+ */
11
+
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ die; } // Cannot access directly.
14
+
15
+ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
16
+ /**
17
+ *
18
+ * Options Class
19
+ *
20
+ * @since 1.0.0
21
+ * @version 1.0.0
22
+ */
23
+ class SP_WPCF_Options extends SP_WPCF_Abstract {
24
+
25
+ // Constants.
26
+
27
+ /**
28
+ * Unique
29
+ *
30
+ * @var string
31
+ */
32
+ public $unique = '';
33
+
34
+ /**
35
+ * Notice
36
+ *
37
+ * @var string
38
+ */
39
+ public $notice = '';
40
+
41
+ /**
42
+ * Abstract
43
+ *
44
+ * @var string
45
+ */
46
+ public $abstract = 'options';
47
+
48
+ /**
49
+ * Sections
50
+ *
51
+ * @var array
52
+ */
53
+ public $sections = array();
54
+
55
+ /**
56
+ * Options
57
+ *
58
+ * @var array
59
+ */
60
+ public $options = array();
61
+
62
+ /**
63
+ * Errors
64
+ *
65
+ * @var array
66
+ */
67
+ public $errors = array();
68
+
69
+ /**
70
+ * Pre_tabs
71
+ *
72
+ * @var array
73
+ */
74
+ public $pre_tabs = array();
75
+
76
+ /**
77
+ * Pre_fields
78
+ *
79
+ * @var array
80
+ */
81
+ public $pre_fields = array();
82
+
83
+ /**
84
+ * Pre_sections
85
+ *
86
+ * @var array
87
+ */
88
+ public $pre_sections = array();
89
+
90
+ /**
91
+ * Args
92
+ *
93
+ * @var array
94
+ */
95
+ public $args = array(
96
+
97
+ // Framework title.
98
+ 'framework_title' => '',
99
+ 'framework_class' => '',
100
+
101
+ // menu settings.
102
+ 'menu_title' => '',
103
+ 'menu_slug' => '',
104
+ 'menu_type' => 'menu',
105
+ 'menu_capability' => 'manage_options',
106
+ 'menu_icon' => null,
107
+ 'menu_position' => null,
108
+ 'menu_hidden' => false,
109
+ 'menu_parent' => '',
110
+ 'sub_menu_title' => '',
111
+
112
+ // menu extras.
113
+ 'show_bar_menu' => true,
114
+ 'show_sub_menu' => true,
115
+ 'show_in_network' => true,
116
+ 'show_in_customizer' => false,
117
+
118
+ 'show_search' => true,
119
+ 'show_reset_all' => true,
120
+ 'show_reset_section' => true,
121
+ 'show_footer' => true,
122
+ 'show_all_options' => true,
123
+ 'show_form_warning' => true,
124
+ 'sticky_header' => true,
125
+ 'save_defaults' => true,
126
+ 'ajax_save' => true,
127
+ 'form_action' => '',
128
+
129
+ // admin bar menu settings.
130
+ 'admin_bar_menu_icon' => '',
131
+ 'admin_bar_menu_priority' => 50,
132
+
133
+ // Footer.
134
+ 'footer_text' => '',
135
+ 'footer_after' => '',
136
+ 'footer_credit' => '',
137
+
138
+ // Database model.
139
+ 'database' => '', // options, transient, theme_mod, network.
140
+ 'transient_time' => 0,
141
+
142
+ // Contextual help.
143
+ 'contextual_help' => array(),
144
+ 'contextual_help_sidebar' => '',
145
+
146
+ // Typography options.
147
+ 'enqueue_webfont' => false,
148
+ 'async_webfont' => false,
149
+
150
+ // Others.
151
+ 'output_css' => true,
152
+
153
+ // Theme.
154
+ 'nav' => 'normal',
155
+ 'theme' => 'dark',
156
+ 'class' => '',
157
+
158
+ // External default values.
159
+ 'defaults' => array(),
160
+
161
+ );
162
+
163
+ /**
164
+ * Run framework construct.
165
+ *
166
+ * @param int $key key.
167
+ * @param array $params params.
168
+ * @return void
169
+ */
170
+ public function __construct( $key, $params = array() ) {
171
+
172
+ $this->unique = $key;
173
+ $this->args = apply_filters( "wpcf_{$this->unique}_args", wp_parse_args( $params['args'], $this->args ), $this );
174
+ $this->sections = apply_filters( "wpcf_{$this->unique}_sections", $params['sections'], $this );
175
+
176
+ // Run only is admin panel options, avoid performance loss.
177
+ $this->pre_tabs = $this->pre_tabs( $this->sections );
178
+ $this->pre_fields = $this->pre_fields( $this->sections );
179
+ $this->pre_sections = $this->pre_sections( $this->sections );
180
+
181
+ $this->get_options();
182
+ $this->set_options();
183
+ $this->save_defaults();
184
+
185
+ add_action( 'admin_menu', array( $this, 'add_admin_menu' ) );
186
+ add_action( 'admin_bar_menu', array( $this, 'add_admin_bar_menu' ), $this->args['admin_bar_menu_priority'] );
187
+ add_action( 'wp_ajax_wpcf_' . $this->unique . '_ajax_save', array( $this, 'ajax_save' ) );
188
+
189
+ if ( 'network' === $this->args['database'] && ! empty( $this->args['show_in_network'] ) ) {
190
+ add_action( 'network_admin_menu', array( $this, 'add_admin_menu' ) );
191
+ }
192
+
193
+ // wp enqueue for typography and output css.
194
+ parent::__construct();
195
+
196
+ }
197
+
198
+ /**
199
+ * Instance.
200
+ *
201
+ * @param int $key key.
202
+ * @param array $params params.
203
+ * @return array
204
+ */
205
+ public static function instance( $key, $params = array() ) {
206
+ return new self( $key, $params );
207
+ }
208
+
209
+ /**
210
+ * Pre_tabs.
211
+ *
212
+ * @param array $sections section.
213
+ * @return section
214
+ */
215
+ public function pre_tabs( $sections ) {
216
+
217
+ $result = array();
218
+ $parents = array();
219
+ $count = 100;
220
+
221
+ foreach ( $sections as $key => $section ) {
222
+ if ( ! empty( $section['parent'] ) ) {
223
+ $section['priority'] = ( isset( $section['priority'] ) ) ? $section['priority'] : $count;
224
+ $parents[ $section['parent'] ][] = $section;
225
+ unset( $sections[ $key ] );
226
+ }
227
+ $count++;
228
+ }
229
+
230
+ foreach ( $sections as $key => $section ) {
231
+ $section['priority'] = ( isset( $section['priority'] ) ) ? $section['priority'] : $count;
232
+ if ( ! empty( $section['id'] ) && ! empty( $parents[ $section['id'] ] ) ) {
233
+ $section['subs'] = wp_list_sort( $parents[ $section['id'] ], array( 'priority' => 'ASC' ), 'ASC', true );
234
+ }
235
+ $result[] = $section;
236
+ $count++;
237
+ }
238
+
239
+ return wp_list_sort( $result, array( 'priority' => 'ASC' ), 'ASC', true );
240
+ }
241
+
242
+ /**
243
+ * Pre_fields
244
+ *
245
+ * @param array $sections section.
246
+ * @return array
247
+ */
248
+ public function pre_fields( $sections ) {
249
+
250
+ $result = array();
251
+
252
+ foreach ( $sections as $key => $section ) {
253
+ if ( ! empty( $section['fields'] ) ) {
254
+ foreach ( $section['fields'] as $field ) {
255
+ $result[] = $field;
256
+ }
257
+ }
258
+ }
259
+
260
+ return $result;
261
+ }
262
+
263
+ /**
264
+ * Pre_sections.
265
+ *
266
+ * @param array $sections section.
267
+ * @return array
268
+ */
269
+ public function pre_sections( $sections ) {
270
+
271
+ $result = array();
272
+
273
+ foreach ( $this->pre_tabs as $tab ) {
274
+ if ( ! empty( $tab['subs'] ) ) {
275
+ foreach ( $tab['subs'] as $sub ) {
276
+ $sub['ptitle'] = $tab['title'];
277
+ $result[] = $sub;
278
+ }
279
+ }
280
+ if ( empty( $tab['subs'] ) ) {
281
+ $result[] = $tab;
282
+ }
283
+ }
284
+
285
+ return $result;
286
+ }
287
+
288
+ /**
289
+ * Add admin bar menu
290
+ *
291
+ * @param mixed $wp_admin_bar Admin bar.
292
+ * @return void
293
+ */
294
+ public function add_admin_bar_menu( $wp_admin_bar ) {
295
+
296
+ if ( is_network_admin() && ( 'network' !== $this->args['database'] || true !== $this->args['show_in_network'] ) ) {
297
+ return;
298
+ }
299
+
300
+ if ( ! empty( $this->args['show_bar_menu'] ) && empty( $this->args['menu_hidden'] ) ) {
301
+
302
+ global $submenu;
303
+
304
+ $menu_slug = $this->args['menu_slug'];
305
+ $menu_icon = ( ! empty( $this->args['admin_bar_menu_icon'] ) ) ? '<span class="wpcf-ab-icon ab-icon ' . esc_attr( $this->args['admin_bar_menu_icon'] ) . '"></span>' : '';
306
+
307
+ $wp_admin_bar->add_node(
308
+ array(
309
+ 'id' => $menu_slug,
310
+ 'title' => $menu_icon . esc_attr( $this->args['menu_title'] ),
311
+ 'href' => esc_url( ( is_network_admin() ) ? network_admin_url( 'admin.php?page=' . $menu_slug ) : admin_url( 'admin.php?page=' . $menu_slug ) ),
312
+ )
313
+ );
314
+
315
+ if ( ! empty( $submenu[ $menu_slug ] ) ) {
316
+ foreach ( $submenu[ $menu_slug ] as $menu_key => $menu_value ) {
317
+ $wp_admin_bar->add_node(
318
+ array(
319
+ 'parent' => $menu_slug,
320
+ 'id' => $menu_slug . '-' . $menu_key,
321
+ 'title' => $menu_value[0],
322
+ 'href' => esc_url( ( is_network_admin() ) ? network_admin_url( 'admin.php?page=' . $menu_value[2] ) : admin_url( 'admin.php?page=' . $menu_value[2] ) ),
323
+ )
324
+ );
325
+ }
326
+ }
327
+ }
328
+
329
+ }
330
+
331
+ /**
332
+ * Ajax_save.
333
+ *
334
+ * @return void
335
+ */
336
+ public function ajax_save() {
337
+
338
+ $result = $this->set_options( true );
339
+
340
+ if ( ! $result ) {
341
+ wp_send_json_error( array( 'error' => esc_html__( 'Error while saving the changes.', 'wp-carousel-free' ) ) );
342
+ } else {
343
+ wp_send_json_success(
344
+ array(
345
+ 'notice' => $this->notice,
346
+ 'errors' => $this->errors,
347
+ )
348
+ );
349
+ }
350
+
351
+ }
352
+
353
+ /**
354
+ * Get default value.
355
+ *
356
+ * @param mixed $field Field array.
357
+ * @return array.
358
+ */
359
+ public function get_default( $field ) {
360
+
361
+ $default = ( isset( $field['default'] ) ) ? $field['default'] : '';
362
+ $default = ( isset( $this->args['defaults'][ $field['id'] ] ) ) ? $this->args['defaults'][ $field['id'] ] : $default;
363
+
364
+ return $default;
365
+
366
+ }
367
+
368
+ /**
369
+ * Save defaults and set new fields value to main options
370
+ *
371
+ * @return void
372
+ */
373
+ public function save_defaults() {
374
+
375
+ $tmp_options = $this->options;
376
+
377
+ foreach ( $this->pre_fields as $field ) {
378
+ if ( ! empty( $field['id'] ) ) {
379
+ $this->options[ $field['id'] ] = ( isset( $this->options[ $field['id'] ] ) ) ? $this->options[ $field['id'] ] : $this->get_default( $field );
380
+ }
381
+ }
382
+
383
+ if ( $this->args['save_defaults'] && empty( $tmp_options ) ) {
384
+ $this->save_options( $this->options );
385
+ }
386
+
387
+ }
388
+
389
+ /**
390
+ * Set options.
391
+ *
392
+ * @param bool $ajax is ajax.
393
+ * @return bool
394
+ */
395
+ public function set_options( $ajax = false ) {
396
+
397
+ // XSS ok.
398
+ // No worries, This "POST" requests is sanitizing in the below foreach.
399
+ $response = ( $ajax && ! empty( $_POST['data'] ) ) ? json_decode( wp_unslash( trim( $_POST['data'] ) ), true ) : $_POST; // phpcs:ignore -- nonce veri
400
+
401
+ // Set variables.
402
+ $data = array();
403
+ $noncekey = 'wpcf_options_nonce' . $this->unique;
404
+ $nonce = ( ! empty( $response[ $noncekey ] ) ) ? $response[ $noncekey ] : '';
405
+ $options = ( ! empty( $response[ $this->unique ] ) ) ? $response[ $this->unique ] : array();
406
+ $transient = ( ! empty( $response['wpcf_transient'] ) ) ? $response['wpcf_transient'] : array();
407
+
408
+ if ( wp_verify_nonce( $nonce, 'wpcf_options_nonce' ) ) {
409
+
410
+ $importing = false;
411
+ $section_id = ( ! empty( $transient['section'] ) ) ? $transient['section'] : '';
412
+
413
+ if ( ! $ajax && ! empty( $response['wpcf_import_data'] ) ) {
414
+
415
+ // XSS ok.
416
+ // No worries, This "POST" requests is sanitizing in the below foreach. see #L337 - #L341.
417
+ $import_data = json_decode( wp_unslash( trim( $response['wpcf_import_data'] ) ), true );
418
+ $options = ( is_array( $import_data ) && ! empty( $import_data ) ) ? $import_data : array();
419
+ $importing = true;
420
+ $this->notice = esc_html__( 'Settings successfully imported.', 'wp-carousel-free' );
421
+
422
+ }
423
+
424
+ if ( ! empty( $transient['reset'] ) ) {
425
+
426
+ foreach ( $this->pre_fields as $field ) {
427
+ if ( ! empty( $field['id'] ) ) {
428
+ $data[ $field['id'] ] = $this->get_default( $field );
429
+ }
430
+ }
431
+
432
+ $this->notice = esc_html__( 'Default settings restored.', 'wp-carousel-free' );
433
+
434
+ } elseif ( ! empty( $transient['reset_section'] ) && ! empty( $section_id ) ) {
435
+
436
+ if ( ! empty( $this->pre_sections[ $section_id - 1 ]['fields'] ) ) {
437
+
438
+ foreach ( $this->pre_sections[ $section_id - 1 ]['fields'] as $field ) {
439
+ if ( ! empty( $field['id'] ) ) {
440
+ $data[ $field['id'] ] = $this->get_default( $field );
441
+ }
442
+ }
443
+ }
444
+
445
+ $data = wp_parse_args( $data, $this->options );
446
+
447
+ $this->notice = esc_html__( 'Default settings restored.', 'wp-carousel-free' );
448
+
449
+ } else {
450
+
451
+ // Sanitize and validate.
452
+ foreach ( $this->pre_fields as $field ) {
453
+
454
+ if ( ! empty( $field['id'] ) ) {
455
+
456
+ $field_id = $field['id'];
457
+ $field_value = isset( $options[ $field_id ] ) ? $options[ $field_id ] : '';
458
+
459
+ // Ajax and Importing doing wp_unslash already.
460
+ if ( ! $ajax && ! $importing ) {
461
+ $field_value = wp_unslash( $field_value );
462
+ }
463
+
464
+ // Sanitize "post" request of field.
465
+ if ( ! isset( $field['sanitize'] ) ) {
466
+
467
+ if ( is_array( $field_value ) ) {
468
+
469
+ $data[ $field_id ] = wp_kses_post_deep( $field_value );
470
+
471
+ } else {
472
+
473
+ $data[ $field_id ] = wp_kses_post( $field_value );
474
+
475
+ }
476
+ } elseif ( isset( $field['sanitize'] ) && is_callable( $field['sanitize'] ) ) {
477
+
478
+ $data[ $field_id ] = call_user_func( $field['sanitize'], $field_value );
479
+
480
+ } else {
481
+
482
+ $data[ $field_id ] = $field_value;
483
+
484
+ }
485
+
486
+ // Validate "post" request of field.
487
+ if ( isset( $field['validate'] ) && is_callable( $field['validate'] ) ) {
488
+
489
+ $has_validated = call_user_func( $field['validate'], $field_value );
490
+
491
+ if ( ! empty( $has_validated ) ) {
492
+
493
+ $data[ $field_id ] = ( isset( $this->options[ $field_id ] ) ) ? $this->options[ $field_id ] : '';
494
+ $this->errors[ $field_id ] = $has_validated;
495
+
496
+ }
497
+ }
498
+ }
499
+ }
500
+ }
501
+
502
+ $data = apply_filters( "wpcf_{$this->unique}_save", $data, $this );
503
+
504
+ do_action( "wpcf_{$this->unique}_save_before", $data, $this );
505
+
506
+ $this->options = $data;
507
+
508
+ $this->save_options( $data );
509
+
510
+ do_action( "wpcf_{$this->unique}_save_after", $data, $this );
511
+
512
+ if ( empty( $this->notice ) ) {
513
+ $this->notice = esc_html__( 'Settings saved.', 'wp-carousel-free' );
514
+ }
515
+
516
+ return true;
517
+
518
+ }
519
+
520
+ return false;
521
+
522
+ }
523
+
524
+ /**
525
+ * Save options database
526
+ *
527
+ * @param mixed $data saving data.
528
+ * @return void
529
+ */
530
+ public function save_options( $data ) {
531
+
532
+ if ( 'transient' === $this->args['database'] ) {
533
+ set_transient( $this->unique, $data, $this->args['transient_time'] );
534
+ } elseif ( 'theme_mod' === $this->args['database'] ) {
535
+ set_theme_mod( $this->unique, $data );
536
+ } elseif ( 'network' === $this->args['database'] ) {
537
+ update_site_option( $this->unique, $data );
538
+ } else {
539
+ update_option( $this->unique, $data );
540
+ }
541
+
542
+ do_action( "wpcf_{$this->unique}_saved", $data, $this );
543
+
544
+ }
545
+
546
+ /**
547
+ * Get options from database.
548
+ *
549
+ * @return array
550
+ */
551
+ public function get_options() {
552
+
553
+ if ( 'transient' === $this->args['database'] ) {
554
+ $this->options = get_transient( $this->unique );
555
+ } elseif ( 'theme_mod' === $this->args['database'] ) {
556
+ $this->options = get_theme_mod( $this->unique );
557
+ } elseif ( 'network' === $this->args['database'] ) {
558
+ $this->options = get_site_option( $this->unique );
559
+ } else {
560
+ $this->options = get_option( $this->unique );
561
+ }
562
+
563
+ if ( empty( $this->options ) ) {
564
+ $this->options = array();
565
+ }
566
+
567
+ return $this->options;
568
+
569
+ }
570
+
571
+ /**
572
+ * Admin menu.
573
+ *
574
+ * @return void
575
+ */
576
+ public function add_admin_menu() {
577
+
578
+ extract( $this->args );
579
+
580
+ if ( 'submenu' === $menu_type ) {
581
+
582
+ $menu_page = call_user_func( 'add_submenu_page', $menu_parent, esc_attr( $menu_title ), esc_attr( $menu_title ), $menu_capability, $menu_slug, array( $this, 'add_options_html' ) );
583
+
584
+ } else {
585
+
586
+ $menu_page = call_user_func( 'add_menu_page', esc_attr( $menu_title ), esc_attr( $menu_title ), $menu_capability, $menu_slug, array( $this, 'add_options_html' ), $menu_icon, $menu_position );
587
+
588
+ if ( ! empty( $sub_menu_title ) ) {
589
+ call_user_func( 'add_submenu_page', $menu_slug, esc_attr( $sub_menu_title ), esc_attr( $sub_menu_title ), $menu_capability, $menu_slug, array( $this, 'add_options_html' ) );
590
+ }
591
+
592
+ if ( ! empty( $this->args['show_sub_menu'] ) && count( $this->pre_tabs ) > 1 ) {
593
+
594
+ // create submenus.
595
+ foreach ( $this->pre_tabs as $section ) {
596
+ call_user_func( 'add_submenu_page', $menu_slug, esc_attr( $section['title'] ), esc_attr( $section['title'] ), $menu_capability, $menu_slug . '#tab=' . sanitize_title( $section['title'] ), '__return_null' );
597
+ }
598
+
599
+ remove_submenu_page( $menu_slug, $menu_slug );
600
+
601
+ }
602
+
603
+ if ( ! empty( $menu_hidden ) ) {
604
+ remove_menu_page( $menu_slug );
605
+ }
606
+ }
607
+
608
+ add_action( 'load-' . $menu_page, array( $this, 'add_page_on_load' ) );
609
+
610
+ }
611
+
612
+ /**
613
+ * Add_page_on_load.
614
+ *
615
+ * @return void.
616
+ */
617
+ public function add_page_on_load() {
618
+
619
+ if ( ! empty( $this->args['contextual_help'] ) ) {
620
+
621
+ $screen = get_current_screen();
622
+
623
+ foreach ( $this->args['contextual_help'] as $tab ) {
624
+ $screen->add_help_tab( $tab );
625
+ }
626
+
627
+ if ( ! empty( $this->args['contextual_help_sidebar'] ) ) {
628
+ $screen->set_help_sidebar( $this->args['contextual_help_sidebar'] );
629
+ }
630
+ }
631
+
632
+ // add_filter( 'admin_footer_text', array( $this, 'add_admin_footer_text' ) );
633
+ }
634
+
635
+
636
+ /**
637
+ * Error_check.
638
+ *
639
+ * @param mixed $sections section.
640
+ * @param mixed $err error.
641
+ * @return statement.
642
+ */
643
+ public function error_check( $sections, $err = '' ) {
644
+
645
+ if ( ! $this->args['ajax_save'] ) {
646
+
647
+ if ( ! empty( $sections['fields'] ) ) {
648
+ foreach ( $sections['fields'] as $field ) {
649
+ if ( ! empty( $field['id'] ) ) {
650
+ if ( array_key_exists( $field['id'], $this->errors ) ) {
651
+ $err = '<span class="wpcf-label-error">!</span>';
652
+ }
653
+ }
654
+ }
655
+ }
656
+
657
+ if ( ! empty( $sections['subs'] ) ) {
658
+ foreach ( $sections['subs'] as $sub ) {
659
+ $err = $this->error_check( $sub, $err );
660
+ }
661
+ }
662
+
663
+ if ( ! empty( $sections['id'] ) && array_key_exists( $sections['id'], $this->errors ) ) {
664
+ $err = $this->errors[ $sections['id'] ];
665
+ }
666
+ }
667
+
668
+ return $err;
669
+ }
670
+
671
+ /**
672
+ * Option page html output
673
+ *
674
+ * @return void
675
+ */
676
+ public function add_options_html() {
677
+
678
+ $has_nav = ( count( $this->pre_tabs ) > 1 ) ? true : false;
679
+ $show_all = ( ! $has_nav ) ? ' wpcf-show-all' : '';
680
+ $show_buttons = isset( $this->args['show_buttons'] ) ? $this->args['show_buttons'] : true;
681
+ $ajax_class = ( $this->args['ajax_save'] ) ? ' wpcf-save-ajax' : '';
682
+ $sticky_class = ( $this->args['sticky_header'] ) ? ' wpcf-sticky-header' : '';
683
+ $wrapper_class = ( $this->args['framework_class'] ) ? ' ' . $this->args['framework_class'] : '';
684
+ $theme = ( $this->args['theme'] ) ? ' wpcf-theme-' . $this->args['theme'] : '';
685
+ $class = ( $this->args['class'] ) ? ' ' . $this->args['class'] : '';
686
+ $nav_type = ( 'inline' === $this->args['nav'] ) ? 'inline' : 'normal';
687
+ $form_action = ( $this->args['form_action'] ) ? $this->args['form_action'] : '';
688
+
689
+ do_action( 'wpcf_options_before' );
690
+
691
+ echo '<div class="wpcf wpcf-options' . esc_attr( $theme . $class . $wrapper_class ) . '" data-slug="' . esc_attr( $this->args['menu_slug'] ) . '" data-unique="' . esc_attr( $this->unique ) . '">';
692
+ $notice_class = ( ! empty( $this->notice ) ) ? 'wpcf-form-show' : '';
693
+ $notice_text = ( ! empty( $this->notice ) ) ? $this->notice : '';
694
+ echo '<div class="wpcf-form-result wpcf-form-success ' . esc_attr( $notice_class ) . '">' . wp_kses_post( $notice_text ) . '</div>';
695
+
696
+ // echo ( $this->args['show_form_warning'] ) ? '<div class="wpcf-form-result wpcf-form-warning">' . esc_html__( 'You have unsaved changes, save your changes!', 'wp-carousel-free' ) . '</div>' : '';
697
+
698
+ echo '<div class="wpcf-container">';
699
+
700
+ echo '<form method="post" action="' . esc_attr( $form_action ) . '" enctype="multipart/form-data" id="wpcf-form" autocomplete="off" novalidate="novalidate">';
701
+
702
+ echo '<input type="hidden" class="wpcf-section-id" name="wpcf_transient[section]" value="1">';
703
+
704
+ wp_nonce_field( 'wpcf_options_nonce', 'wpcf_options_nonce' . $this->unique );
705
+
706
+ echo '<div class="wpcf-header' . esc_attr( $sticky_class ) . '">';
707
+ echo '<div class="wpcf-header-inner">';
708
+
709
+ echo '<div class="wpcf-header-left">';
710
+ // 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>';
711
+ if ( $show_buttons ) {
712
+ 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>';
713
+ } else {
714
+ echo '<h1 class="export-import"><img src="' . WPCAROUSELF_URL . 'admin/img/import-export.svg">' . $this->args['framework_title'] . '</h1>';
715
+ }
716
+ echo '</div>';
717
+
718
+ echo '<div class="wpcf-header-right">';
719
+
720
+
721
+
722
+ // echo '<div class="wpcf-form-result wpcf-form-success ' . esc_attr( $notice_class ) . '">' . wp_kses_post( $notice_text ) . '</div>';
723
+
724
+ // echo ( $this->args['show_form_warning'] ) ? '<div class="wpcf-form-result wpcf-form-warning">' . esc_html__( 'You have unsaved changes, save your changes!', 'wp-carousel-free' ) . '</div>' : '';
725
+
726
+ echo ( $has_nav && $this->args['show_all_options'] ) ? '<div class="wpcf-expand-all" title="' . esc_html__( 'show all settings', 'wp-carousel-free' ) . '"><i class="fa fa-outdent"></i></div>' : '';
727
+
728
+ echo ( $this->args['show_search'] ) ? '<div class="wpcf-search"><input type="text" name="wpcf-search" placeholder="' . esc_html__( 'Search...', 'wp-carousel-free' ) . '" autocomplete="off" /></div>' : '';
729
+ if ( $show_buttons ) {
730
+ echo '<div class="wpcf-buttons">';
731
+ echo '<input type="submit" name="' . esc_attr( $this->unique ) . '[_nonce][save]" class="button button-primary wpcf-top-save wpcf-save' . esc_attr( $ajax_class ) . '" value="' . esc_html__( 'Save', 'wp-carousel-free' ) . '" data-save="' . esc_html__( 'Saving...', 'wp-carousel-free' ) . '">';
732
+ echo ( $this->args['show_reset_section'] ) ? '<input type="submit" name="wpcf_transient[reset_section]" class="button button-secondary wpcf-reset-section wpcf-confirm" value="' . esc_html__( 'Reset Section', 'wp-carousel-free' ) . '" data-confirm="' . esc_html__( 'Are you sure to reset this section options?', 'wp-carousel-free' ) . '">' : '';
733
+ echo ( $this->args['show_reset_all'] ) ? '<input type="submit" name="wpcf_transient[reset]" class="button wpcf-warning-primary wpcf-reset-all wpcf-confirm" value="' . ( ( $this->args['show_reset_section'] ) ? esc_html__( 'Reset All', 'wp-carousel-free' ) : esc_html__( 'Reset', 'wp-carousel-free' ) ) . '" data-confirm="' . esc_html__( 'Are you sure you want to reset all settings to default values?', 'wp-carousel-free' ) . '">' : '';
734
+ echo '</div>';
735
+ }
736
+ echo '</div>';
737
+
738
+ echo '<div class="clear"></div>';
739
+ echo '</div>';
740
+ echo '</div>';
741
+
742
+ echo '<div class="wpcf-wrapper' . esc_attr( $show_all ) . '">';
743
+
744
+ if ( $has_nav ) {
745
+
746
+ echo '<div class="wpcf-nav wpcf-nav-' . esc_attr( $nav_type ) . ' wpcf-nav-options">';
747
+
748
+ echo '<ul>';
749
+
750
+ foreach ( $this->pre_tabs as $tab ) {
751
+
752
+ $tab_id = sanitize_title( $tab['title'] );
753
+ $tab_error = $this->error_check( $tab );
754
+ $tab_icon = ( ! empty( $tab['icon'] ) ) ? '<i class="wpcf-tab-icon ' . esc_attr( $tab['icon'] ) . '"></i>' : '';
755
+
756
+ if ( ! empty( $tab['subs'] ) ) {
757
+
758
+ echo '<li class="wpcf-tab-item">';
759
+
760
+ echo wp_kses_post( '<a href="#tab=' . esc_attr( $tab_id ) . '" data-tab-id="' . esc_attr( $tab_id ) . '" class="wpcf-arrow">' . $tab_icon . $tab['title'] . $tab_error . '</a>' );
761
+
762
+ echo '<ul>';
763
+
764
+ foreach ( $tab['subs'] as $sub ) {
765
+
766
+ $sub_id = $tab_id . '/' . sanitize_title( $sub['title'] );
767
+ $sub_error = $this->error_check( $sub );
768
+ $sub_icon = ( ! empty( $sub['icon'] ) ) ? '<i class="wpcf-tab-icon ' . esc_attr( $sub['icon'] ) . '"></i>' : '';
769
+
770
+ echo wp_kses_post( '<li><a href="#tab=' . esc_attr( $sub_id ) . '" data-tab-id="' . esc_attr( $sub_id ) . '">' . $sub_icon . $sub['title'] . $sub_error . '</a></li>' );
771
+
772
+ }
773
+
774
+ echo '</ul>';
775
+
776
+ echo '</li>';
777
+
778
+ } else {
779
+
780
+ echo wp_kses_post( '<li class="wpcf-tab-item"><a href="#tab=' . esc_attr( $tab_id ) . '" data-tab-id="' . esc_attr( $tab_id ) . '">' . $tab_icon . $tab['title'] . $tab_error . '</a></li>' );
781
+
782
+ }
783
+ }
784
+
785
+ echo '</ul>';
786
+
787
+ echo '</div>';
788
+
789
+ }
790
+
791
+ echo '<div class="wpcf-content">';
792
+
793
+ echo '<div class="wpcf-sections">';
794
+
795
+ foreach ( $this->pre_sections as $section ) {
796
+
797
+ $section_onload = ( ! $has_nav ) ? ' wpcf-onload' : '';
798
+ $section_class = ( ! empty( $section['class'] ) ) ? ' ' . $section['class'] : '';
799
+ $section_icon = ( ! empty( $section['icon'] ) ) ? '<i class="wpcf-section-icon ' . esc_attr( $section['icon'] ) . '"></i>' : '';
800
+ $section_title = ( ! empty( $section['title'] ) ) ? $section['title'] : '';
801
+ $section_parent = ( ! empty( $section['ptitle'] ) ) ? sanitize_title( $section['ptitle'] ) . '/' : '';
802
+ $section_slug = ( ! empty( $section['title'] ) ) ? sanitize_title( $section_title ) : '';
803
+
804
+ echo '<div class="wpcf-section hidden' . esc_attr( $section_onload . $section_class ) . '" data-section-id="' . esc_attr( $section_parent . $section_slug ) . '">';
805
+ echo ( $has_nav ) ? wp_kses_post( '<div class="wpcf-section-title"><h3>' . $section_icon . $section_title . '</h3></div>' ) : '';
806
+ echo ( ! empty( $section['description'] ) ) ? '<div class="wpcf-field wpcf-section-description">' . wp_kses_post( $section['description'] ) . '</div>' : '';
807
+
808
+ if ( ! empty( $section['fields'] ) ) {
809
+
810
+ foreach ( $section['fields'] as $field ) {
811
+
812
+ $is_field_error = $this->error_check( $field );
813
+
814
+ if ( ! empty( $is_field_error ) ) {
815
+ $field['_error'] = $is_field_error;
816
+ }
817
+
818
+ if ( ! empty( $field['id'] ) ) {
819
+ $field['default'] = $this->get_default( $field );
820
+ }
821
+
822
+ $value = ( ! empty( $field['id'] ) && isset( $this->options[ $field['id'] ] ) ) ? $this->options[ $field['id'] ] : '';
823
+
824
+ SP_WPCF::field( $field, $value, $this->unique, 'options' );
825
+
826
+ }
827
+ } else {
828
+
829
+ echo '<div class="wpcf-no-option">' . esc_html__( 'No data available.', 'wp-carousel-free' ) . '</div>';
830
+
831
+ }
832
+
833
+ echo '</div>';
834
+
835
+ }
836
+
837
+ echo '</div>';
838
+
839
+ echo '<div class="clear"></div>';
840
+
841
+ echo '</div>';
842
+
843
+ echo ( $has_nav && 'normal' === $nav_type ) ? '<div class="wpcf-nav-background"></div>' : '';
844
+
845
+ echo '</div>';
846
+
847
+ if ( ! empty( $this->args['show_footer'] ) ) {
848
+
849
+ echo '<div class="wpcf-footer">';
850
+
851
+ echo '<div class="wpcf-buttons">';
852
+ echo '<input type="submit" name="wpcf_transient[save]" class="button button-primary wpcf-save' . esc_attr( $ajax_class ) . '" value="' . esc_html__( 'Save', 'wp-carousel-free' ) . '" data-save="' . esc_html__( 'Saving...', 'wp-carousel-free' ) . '">';
853
+ echo ( $this->args['show_reset_section'] ) ? '<input type="submit" name="wpcf_transient[reset_section]" class="button button-secondary wpcf-reset-section wpcf-confirm" value="' . esc_html__( 'Restore', 'wp-carousel-free' ) . '" data-confirm="' . esc_html__( 'Are you sure to reset this section options?', 'wp-carousel-free' ) . '">' : '';
854
+ echo ( $this->args['show_reset_all'] ) ? '<input type="submit" name="wpcf_transient[reset]" class="button wpcf-warning-primary wpcf-reset-all wpcf-confirm" value="' . ( ( $this->args['show_reset_section'] ) ? esc_html__( 'Reset All', 'wp-carousel-free' ) : esc_html__( 'Reset', 'wp-carousel-free' ) ) . '" data-confirm="' . esc_html__( 'Are you sure you want to reset all settings to default values?', 'wp-carousel-free' ) . '">' : '';
855
+ echo '</div>';
856
+
857
+ echo ( ! empty( $this->args['footer_text'] ) ) ? '<div class="wpcf-copyright">' . wp_kses_post( $this->args['footer_text'] ) . '</div>' : '';
858
+
859
+ echo '<div class="clear"></div>';
860
+ echo '</div>';
861
+
862
+ }
863
+
864
+ echo '</form>';
865
+
866
+ echo '</div>';
867
+
868
+ echo '<div class="clear"></div>';
869
+
870
+ echo ( ! empty( $this->args['footer_after'] ) ) ? wp_kses_post( $this->args['footer_after'] ) : '';
871
+
872
+ echo '</div>';
873
+
874
+ do_action( 'wpcf_options_after' );
875
+
876
+ }
877
+ }
878
+ }
admin/views/sp-framework/classes/fields.class.php ADDED
@@ -0,0 +1,572 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+
4
+ if ( ! class_exists( 'SP_WPCF_Fields' ) ) {
5
+ /**
6
+ *
7
+ * Fields Class
8
+ *
9
+ * @since 1.0.0
10
+ * @version 1.0.0
11
+ */
12
+ abstract class SP_WPCF_Fields extends SP_WPCF_Abstract {
13
+
14
+ /**
15
+ * Create fields.
16
+ *
17
+ * @param array $field field.
18
+ * @param mixed $value value.
19
+ * @param mixed $unique unique id.
20
+ * @param mixed $where where to add.
21
+ * @param mixed $parent parent.
22
+ * @return void
23
+ */
24
+ public function __construct( $field = array(), $value = '', $unique = '', $where = '', $parent = '' ) {
25
+ $this->field = $field;
26
+ $this->value = $value;
27
+ $this->unique = $unique;
28
+ $this->where = $where;
29
+ $this->parent = $parent;
30
+ }
31
+
32
+ /**
33
+ * Field name.
34
+ *
35
+ * @param mixed $nested_name name.
36
+ * @return string
37
+ */
38
+ public function field_name( $nested_name = '' ) {
39
+
40
+ $field_id = ( ! empty( $this->field['id'] ) ) ? $this->field['id'] : '';
41
+ $unique_id = ( ! empty( $this->unique ) ) ? $this->unique . '[' . $field_id . ']' : $field_id;
42
+ $field_name = ( ! empty( $this->field['name'] ) ) ? $this->field['name'] : $unique_id;
43
+ $tag_prefix = ( ! empty( $this->field['tag_prefix'] ) ) ? $this->field['tag_prefix'] : '';
44
+
45
+ if ( ! empty( $tag_prefix ) ) {
46
+ $nested_name = str_replace( '[', '[' . $tag_prefix, $nested_name );
47
+ }
48
+
49
+ return $field_name . $nested_name;
50
+
51
+ }
52
+
53
+ /**
54
+ * Field_attributes.
55
+ *
56
+ * @param mixed $custom_atts custom attr.
57
+ * @return statement.
58
+ */
59
+ public function field_attributes( $custom_atts = array() ) {
60
+
61
+ $field_id = ( ! empty( $this->field['id'] ) ) ? $this->field['id'] : '';
62
+ $attributes = ( ! empty( $this->field['attributes'] ) ) ? $this->field['attributes'] : array();
63
+
64
+ if ( ! empty( $field_id ) && empty( $attributes['data-depend-id'] ) ) {
65
+ $attributes['data-depend-id'] = $field_id;
66
+ }
67
+
68
+ if ( ! empty( $this->field['placeholder'] ) ) {
69
+ $attributes['placeholder'] = $this->field['placeholder'];
70
+ }
71
+
72
+ $attributes = wp_parse_args( $attributes, $custom_atts );
73
+
74
+ $atts = '';
75
+
76
+ if ( ! empty( $attributes ) ) {
77
+ foreach ( $attributes as $key => $value ) {
78
+ if ( 'only-key' === $value ) {
79
+ $atts .= ' ' . esc_attr( $key );
80
+ } else {
81
+ $atts .= ' ' . esc_attr( $key ) . '="' . esc_attr( $value ) . '"';
82
+ }
83
+ }
84
+ }
85
+
86
+ return $atts;
87
+
88
+ }
89
+
90
+ /**
91
+ * Field_before.
92
+ *
93
+ * @return statement.
94
+ */
95
+ public function field_before() {
96
+ return ( ! empty( $this->field['before'] ) ) ? '<div class="wpcf-before-text">' . $this->field['before'] . '</div>' : '';
97
+ }
98
+
99
+ /**
100
+ * Field_after.
101
+ *
102
+ * @return statement.
103
+ */
104
+ public function field_after() {
105
+
106
+ $output = ( ! empty( $this->field['after'] ) ) ? '<div class="wpcf-after-text">' . $this->field['after'] . '</div>' : '';
107
+ $output .= ( ! empty( $this->field['desc'] ) ) ? '<div class="clear"></div><div class="wpcf-desc-text">' . $this->field['desc'] . '</div>' : '';
108
+ $output .= ( ! empty( $this->field['help'] ) ) ? '<div class="wpcf-help"><span class="wpcf-help-text">' . $this->field['help'] . '</span><i class="fa fa-question-circle"></i></div>' : '';
109
+ $output .= ( ! empty( $this->field['_error'] ) ) ? '<div class="wpcf-error-text">' . $this->field['_error'] . '</div>' : '';
110
+
111
+ return $output;
112
+
113
+ }
114
+
115
+ /**
116
+ * Field_data
117
+ *
118
+ * @param mixed $type field type.
119
+ * @param mixed $term term.
120
+ * @param mixed $query_args array.
121
+ * @return statement.
122
+ */
123
+ public static function field_data( $type = '', $term = false, $query_args = array() ) {
124
+
125
+ $options = array();
126
+ $array_search = false;
127
+
128
+ // sanitize type name.
129
+ if ( in_array( $type, array( 'page', 'pages' ) ) ) {
130
+ $option = 'page';
131
+ } elseif ( in_array( $type, array( 'post', 'posts' ) ) ) {
132
+ $option = 'post';
133
+ } elseif ( in_array( $type, array( 'category', 'categories' ) ) ) {
134
+ $option = 'category';
135
+ } elseif ( in_array( $type, array( 'tag', 'tags' ) ) ) {
136
+ $option = 'post_tag';
137
+ } elseif ( in_array( $type, array( 'menu', 'menus' ) ) ) {
138
+ $option = 'nav_menu';
139
+ } else {
140
+ $option = '';
141
+ }
142
+
143
+ // switch type.
144
+ switch ( $type ) {
145
+
146
+ case 'page':
147
+ case 'pages':
148
+ case 'post':
149
+ case 'posts':
150
+ // term query required for ajax select.
151
+ if ( ! empty( $term ) ) {
152
+
153
+ $query = new WP_Query(
154
+ wp_parse_args(
155
+ $query_args,
156
+ array(
157
+ 's' => $term,
158
+ 'post_type' => $option,
159
+ 'post_status' => 'publish',
160
+ 'posts_per_page' => 25,
161
+ )
162
+ )
163
+ );
164
+
165
+ } else {
166
+
167
+ $query = new WP_Query(
168
+ wp_parse_args(
169
+ $query_args,
170
+ array(
171
+ 'post_type' => $option,
172
+ 'post_status' => 'publish',
173
+ )
174
+ )
175
+ );
176
+
177
+ }
178
+
179
+ if ( ! is_wp_error( $query ) && ! empty( $query->posts ) ) {
180
+ foreach ( $query->posts as $item ) {
181
+ $options[ $item->ID ] = $item->post_title;
182
+ }
183
+ }
184
+
185
+ break;
186
+ case 'sp_wp_carousel':
187
+ $lcp_get_specific = array(
188
+ 'post_type' => 'sp_wp_carousel',
189
+ );
190
+ $query_args = array_merge( $query_args, $lcp_get_specific );
191
+ $all_posts = get_posts( $query_args );
192
+
193
+ if ( ! is_wp_error( $all_posts ) && ! empty( $all_posts ) ) {
194
+ foreach ( $all_posts as $post_obj ) {
195
+ $options[ $post_obj->ID ] = isset( $post_obj->post_title ) && ! empty( $post_obj->post_title ) ? $post_obj->post_title : 'Untitled';
196
+ }
197
+ }
198
+ wp_reset_postdata();
199
+ break;
200
+ case 'all_post':
201
+ case 'all_posts':
202
+ global $post;
203
+ $upload_data = get_post_meta( $post->ID, 'wpcf_upload_options', true );
204
+ $sp_selected_posts = isset( $upload_data['wpcf_specific_posts'] ) ? $upload_data['wpcf_specific_posts'] : '';
205
+ if ( isset( $sp_selected_posts ) && ! empty( $sp_selected_posts ) ) {
206
+ $wpcf_get_specific = array(
207
+ 'post_type' => $upload_data['wpcf_post_type'],
208
+ );
209
+ $query_args = array_merge( $query_args, $wpcf_get_specific );
210
+ $all_posts = get_posts( $query_args );
211
+ } else {
212
+ $all_posts = get_posts( $query_args );
213
+ }
214
+
215
+ if ( ! is_wp_error( $all_posts ) && ! empty( $all_posts ) ) {
216
+ foreach ( $all_posts as $post_obj ) {
217
+ $options[ $post_obj->ID ] = $post_obj->post_title;
218
+ }
219
+ }
220
+ wp_reset_postdata();
221
+ break;
222
+
223
+ case 'taxonomies':
224
+ case 'taxonomy':
225
+ global $post;
226
+ $saved_meta = get_post_meta( $post->ID, 'wpcf_upload_options', true );
227
+ if ( isset( $saved_meta['wpcf_post_type'] ) && ! empty( $saved_meta['wpcf_post_type'] ) ) {
228
+ $taxonomy_names = get_object_taxonomies( $saved_meta['wpcf_post_type'], 'names' );
229
+ if ( ! is_wp_error( $taxonomy_names ) && ! empty( $taxonomy_names ) ) {
230
+ foreach ( $taxonomy_names as $taxonomy => $label ) {
231
+ $options[ $label ] = $label;
232
+ }
233
+ }
234
+ } else {
235
+ $post_types = get_post_types( array( 'public' => true ) );
236
+ $post_type_list = array();
237
+ $post_type_number = 1;
238
+ foreach ( $post_types as $post_type => $label ) {
239
+ $post_type_list[ $post_type_number++ ] = $label;
240
+ }
241
+ $taxonomy_names = get_object_taxonomies( $post_type_list['1'], 'names' );
242
+ foreach ( $taxonomy_names as $taxonomy => $label ) {
243
+ $options[ $label ] = $label;
244
+ }
245
+ }
246
+
247
+ break;
248
+
249
+ case 'terms':
250
+ case 'term':
251
+ global $post;
252
+ $saved_meta = get_post_meta( $post->ID, 'wpcf_upload_options', true );
253
+ if ( isset( $saved_meta['wpcf_post_taxonomy'] ) && ! empty( $saved_meta['wpcf_post_taxonomy'] ) ) {
254
+ $terms = get_terms( $saved_meta['wpcf_post_taxonomy'] );
255
+ foreach ( $terms as $key => $value ) {
256
+ $options[ $value->term_id ] = $value->name;
257
+ }
258
+ } else {
259
+ $post_types = get_post_types( array( 'public' => true ) );
260
+ $post_type_list = array();
261
+ $post_type_number = 1;
262
+ foreach ( $post_types as $post_type => $label ) {
263
+ $post_type_list[ $post_type_number++ ] = $label;
264
+ }
265
+ $taxonomy_names = get_object_taxonomies( $post_type_list['1'], 'names' );
266
+ $taxonomy_number = 1;
267
+ foreach ( $taxonomy_names as $taxonomy => $label ) {
268
+ $taxonomy_terms[ $taxonomy_number++ ] = $label;
269
+ }
270
+ $terms = get_terms( $taxonomy_terms['1'] );
271
+ foreach ( $terms as $key => $value ) {
272
+ $options[ $value->term_id ] = $value->name;
273
+ }
274
+ }
275
+
276
+ break;
277
+
278
+ case 'category':
279
+ case 'categories':
280
+ $categories = get_categories( $query_args );
281
+
282
+ if ( ! is_wp_error( $categories ) && ! empty( $categories ) && ! isset( $categories['errors'] ) ) {
283
+ foreach ( $categories as $category ) {
284
+ $options[ $category->term_id ] = $category->name;
285
+ }
286
+ }
287
+
288
+ break;
289
+
290
+ case 'tag':
291
+ case 'tags':
292
+ $taxonomies = ( isset( $query_args['taxonomies'] ) ) ? $query_args['taxonomies'] : 'post_tag';
293
+ $tags = get_terms( $taxonomies, $query_args );
294
+
295
+ if ( ! is_wp_error( $tags ) && ! empty( $tags ) ) {
296
+ foreach ( $tags as $tag ) {
297
+ $options[ $tag->term_id ] = $tag->name;
298
+ }
299
+ }
300
+
301
+ break;
302
+
303
+ case 'menu':
304
+ case 'menus':
305
+ if ( ! empty( $term ) ) {
306
+
307
+ $query = new WP_Term_Query(
308
+ wp_parse_args(
309
+ $query_args,
310
+ array(
311
+ 'search' => $term,
312
+ 'taxonomy' => $option,
313
+ 'hide_empty' => false,
314
+ 'number' => 25,
315
+ )
316
+ )
317
+ );
318
+
319
+ } else {
320
+
321
+ $query = new WP_Term_Query(
322
+ wp_parse_args(
323
+ $query_args,
324
+ array(
325
+ 'taxonomy' => $option,
326
+ 'hide_empty' => false,
327
+ )
328
+ )
329
+ );
330
+
331
+ }
332
+
333
+ if ( ! is_wp_error( $query ) && ! empty( $query->terms ) ) {
334
+ foreach ( $query->terms as $item ) {
335
+ $options[ $item->term_id ] = $item->name;
336
+ }
337
+ }
338
+
339
+ break;
340
+
341
+ case 'user':
342
+ case 'users':
343
+ if ( ! empty( $term ) ) {
344
+
345
+ $query = new WP_User_Query(
346
+ array(
347
+ 'search' => '*' . $term . '*',
348
+ 'number' => 25,
349
+ 'orderby' => 'title',
350
+ 'order' => 'ASC',
351
+ 'fields' => array( 'display_name', 'ID' ),
352
+ )
353
+ );
354
+
355
+ } else {
356
+
357
+ $query = new WP_User_Query( array( 'fields' => array( 'display_name', 'ID' ) ) );
358
+
359
+ }
360
+
361
+ if ( ! is_wp_error( $query ) && ! empty( $query->get_results() ) ) {
362
+ foreach ( $query->get_results() as $item ) {
363
+ $options[ $item->ID ] = $item->display_name;
364
+ }
365
+ }
366
+
367
+ break;
368
+
369
+ case 'sidebar':
370
+ case 'sidebars':
371
+ global $wp_registered_sidebars;
372
+
373
+ if ( ! empty( $wp_registered_sidebars ) ) {
374
+ foreach ( $wp_registered_sidebars as $sidebar ) {
375
+ $options[ $sidebar['id'] ] = $sidebar['name'];
376
+ }
377
+ }
378
+
379
+ $array_search = true;
380
+
381
+ break;
382
+
383
+ case 'role':
384
+ case 'roles':
385
+ global $wp_roles;
386
+
387
+ if ( ! empty( $wp_roles ) ) {
388
+ if ( ! empty( $wp_roles->roles ) ) {
389
+ foreach ( $wp_roles->roles as $role_key => $role_value ) {
390
+ $options[ $role_key ] = $role_value['name'];
391
+ }
392
+ }
393
+ }
394
+
395
+ $array_search = true;
396
+
397
+ break;
398
+
399
+ case 'post_type':
400
+ case 'post_types':
401
+ $post_types = get_post_types( array( 'show_in_nav_menus' => true ), 'objects' );
402
+
403
+ if ( ! is_wp_error( $post_types ) && ! empty( $post_types ) ) {
404
+ foreach ( $post_types as $post_type ) {
405
+ $options[ $post_type->name ] = $post_type->labels->name;
406
+ }
407
+ }
408
+
409
+ $array_search = true;
410
+
411
+ break;
412
+
413
+ case 'location':
414
+ case 'locations':
415
+ $nav_menus = get_registered_nav_menus();
416
+
417
+ if ( ! is_wp_error( $nav_menus ) && ! empty( $nav_menus ) ) {
418
+ foreach ( $nav_menus as $nav_menu_key => $nav_menu_name ) {
419
+ $options[ $nav_menu_key ] = $nav_menu_name;
420
+ }
421
+ }
422
+
423
+ $array_search = true;
424
+
425
+ break;
426
+
427
+ default:
428
+ if ( is_callable( $type ) ) {
429
+ if ( ! empty( $term ) ) {
430
+ $options = call_user_func( $type, $query_args );
431
+ } else {
432
+ $options = call_user_func( $type, $term, $query_args );
433
+ }
434
+ }
435
+
436
+ break;
437
+
438
+ }
439
+
440
+ // Array search by "term".
441
+ if ( ! empty( $term ) && ! empty( $options ) && ! empty( $array_search ) ) {
442
+ $options = preg_grep( '/' . $term . '/i', $options );
443
+ }
444
+
445
+ // Make multidimensional array for ajax search.
446
+ if ( ! empty( $term ) && ! empty( $options ) ) {
447
+ $arr = array();
448
+ foreach ( $options as $option_key => $option_value ) {
449
+ $arr[] = array(
450
+ 'value' => $option_key,
451
+ 'text' => $option_value,
452
+ );
453
+ }
454
+ $options = $arr;
455
+ }
456
+
457
+ return $options;
458
+
459
+ }
460
+
461
+ /**
462
+ * Field_wp_query_data_title.
463
+ *
464
+ * @param mixed $type type.
465
+ * @param mixed $values value.
466
+ * @return array
467
+ */
468
+ public function field_wp_query_data_title( $type, $values ) {
469
+
470
+ $options = array();
471
+
472
+ if ( ! empty( $values ) && is_array( $values ) ) {
473
+
474
+ foreach ( $values as $value ) {
475
+
476
+ $options[ $value ] = ucfirst( $value );
477
+
478
+ switch ( $type ) {
479
+
480
+ case 'post':
481
+ case 'posts':
482
+ case 'page':
483
+ case 'pages':
484
+ $title = get_the_title( $value );
485
+
486
+ if ( ! is_wp_error( $title ) && ! empty( $title ) ) {
487
+ $options[ $value ] = $title;
488
+ }
489
+
490
+ break;
491
+
492
+ case 'category':
493
+ case 'categories':
494
+ case 'tag':
495
+ case 'tags':
496
+ case 'menu':
497
+ case 'menus':
498
+ $term = get_term( $value );
499
+
500
+ if ( ! is_wp_error( $term ) && ! empty( $term ) ) {
501
+ $options[ $value ] = $term->name;
502
+ }
503
+
504
+ break;
505
+
506
+ case 'user':
507
+ case 'users':
508
+ $user = get_user_by( 'id', $value );
509
+
510
+ if ( ! is_wp_error( $user ) && ! empty( $user ) ) {
511
+ $options[ $value ] = $user->display_name;
512
+ }
513
+
514
+ break;
515
+
516
+ case 'sidebar':
517
+ case 'sidebars':
518
+ global $wp_registered_sidebars;
519
+
520
+ if ( ! empty( $wp_registered_sidebars[ $value ] ) ) {
521
+ $options[ $value ] = $wp_registered_sidebars[ $value ]['name'];
522
+ }
523
+
524
+ break;
525
+
526
+ case 'role':
527
+ case 'roles':
528
+ global $wp_roles;
529
+
530
+ if ( ! empty( $wp_roles ) && ! empty( $wp_roles->roles ) && ! empty( $wp_roles->roles[ $value ] ) ) {
531
+ $options[ $value ] = $wp_roles->roles[ $value ]['name'];
532
+ }
533
+
534
+ break;
535
+
536
+ case 'post_type':
537
+ case 'post_types':
538
+ $post_types = get_post_types( array( 'show_in_nav_menus' => true ) );
539
+
540
+ if ( ! is_wp_error( $post_types ) && ! empty( $post_types ) && ! empty( $post_types[ $value ] ) ) {
541
+ $options[ $value ] = ucfirst( $value );
542
+ }
543
+
544
+ break;
545
+
546
+ case 'location':
547
+ case 'locations':
548
+ $nav_menus = get_registered_nav_menus();
549
+
550
+ if ( ! is_wp_error( $nav_menus ) && ! empty( $nav_menus ) && ! empty( $nav_menus[ $value ] ) ) {
551
+ $options[ $value ] = $nav_menus[ $value ];
552
+ }
553
+
554
+ break;
555
+
556
+ default:
557
+ if ( is_callable( $type . '_title' ) ) {
558
+ $options[ $value ] = call_user_func( $type . '_title', $value );
559
+ }
560
+
561
+ break;
562
+
563
+ }
564
+ }
565
+ }
566
+
567
+ return $options;
568
+
569
+ }
570
+
571
+ }
572
+ }
admin/views/sp-framework/classes/metabox-options.class.php ADDED
@@ -0,0 +1,495 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Metabox Class
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ * @package WP Carousel
10
+ * @subpackage wp-carousel-free/sp-framework
11
+ */
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ die; } // Cannot access directly.
15
+
16
+ if ( ! class_exists( 'SP_WPCF_Metabox' ) ) {
17
+
18
+ /**
19
+ *
20
+ * Metabox Class
21
+ *
22
+ * @since 1.0.0
23
+ * @version 1.0.0
24
+ */
25
+ class SP_WPCF_Metabox extends SP_WPCF_Abstract {
26
+
27
+ // Constants.
28
+ /**
29
+ * Unique
30
+ *
31
+ * @var string
32
+ */
33
+ public $unique = '';
34
+ /**
35
+ * Abstract
36
+ *
37
+ * @var string
38
+ */
39
+ public $abstract = 'metabox';
40
+ /**
41
+ * Pre_fields
42
+ *
43
+ * @var array
44
+ */
45
+ public $pre_fields = array();
46
+ /**
47
+ * Sections
48
+ *
49
+ * @var array
50
+ */
51
+ public $sections = array();
52
+ /**
53
+ * Post_type
54
+ *
55
+ * @var array
56
+ */
57
+ public $post_type = array();
58
+ /**
59
+ * Args
60
+ *
61
+ * @var array
62
+ */
63
+ public $args = array(
64
+ 'title' => '',
65
+ 'post_type' => 'post',
66
+ 'data_type' => 'serialize',
67
+ 'context' => 'advanced',
68
+ 'priority' => 'default',
69
+ 'exclude_post_types' => array(),
70
+ 'page_templates' => '',
71
+ 'post_formats' => '',
72
+ 'show_reset' => false,
73
+ 'show_restore' => false,
74
+ 'enqueue_webfont' => true,
75
+ 'async_webfont' => false,
76
+ 'output_css' => true,
77
+ 'nav' => 'normal',
78
+ 'theme' => 'dark',
79
+ 'class' => '',
80
+ 'defaults' => array(),
81
+ );
82
+
83
+ /**
84
+ * Run metabox construct
85
+ *
86
+ * @param string $key key.
87
+ * @param array $params params.
88
+ * @return void
89
+ */
90
+ public function __construct( $key, $params = array() ) {
91
+
92
+ $this->unique = $key;
93
+ $this->args = apply_filters( "wpcf_{$this->unique}_args", wp_parse_args( $params['args'], $this->args ), $this );
94
+ $this->sections = apply_filters( "wpcf_{$this->unique}_sections", $params['sections'], $this );
95
+ $this->post_type = ( is_array( $this->args['post_type'] ) ) ? $this->args['post_type'] : array_filter( (array) $this->args['post_type'] );
96
+ $this->post_formats = ( is_array( $this->args['post_formats'] ) ) ? $this->args['post_formats'] : array_filter( (array) $this->args['post_formats'] );
97
+ $this->page_templates = ( is_array( $this->args['page_templates'] ) ) ? $this->args['page_templates'] : array_filter( (array) $this->args['page_templates'] );
98
+ $this->pre_fields = $this->pre_fields( $this->sections );
99
+
100
+ add_action( 'add_meta_boxes', array( $this, 'add_meta_box' ) );
101
+ add_action( 'save_post', array( $this, 'save_meta_box' ) );
102
+ add_action( 'edit_attachment', array( $this, 'save_meta_box' ) );
103
+
104
+ if ( ! empty( $this->page_templates ) || ! empty( $this->post_formats ) || ! empty( $this->args['class'] ) ) {
105
+ foreach ( $this->post_type as $post_type ) {
106
+ add_filter( 'postbox_classes_' . $post_type . '_' . $this->unique, array( $this, 'add_metabox_classes' ) );
107
+ }
108
+ }
109
+
110
+ // wp enqueue for typography and output css.
111
+ parent::__construct();
112
+
113
+ }
114
+
115
+
116
+ /**
117
+ * Instance
118
+ *
119
+ * @param string $key key.
120
+ * @param array $params params.
121
+ * @return array
122
+ */
123
+ public static function instance( $key, $params = array() ) {
124
+ return new self( $key, $params );
125
+ }
126
+
127
+ /**
128
+ * Pre_fields
129
+ *
130
+ * @param mixed $sections sections.
131
+ * @return array
132
+ */
133
+ public function pre_fields( $sections ) {
134
+ $result = array();
135
+ foreach ( $sections as $key => $section ) {
136
+ if ( ! empty( $section['fields'] ) ) {
137
+ foreach ( $section['fields'] as $field ) {
138
+ $result[] = $field;
139
+ }
140
+ }
141
+ }
142
+
143
+ return $result;
144
+
145
+ }
146
+
147
+ /**
148
+ * Add_metabox_classes
149
+ *
150
+ * @param mixed $classes Classes.
151
+ * @return string
152
+ */
153
+ public function add_metabox_classes( $classes ) {
154
+
155
+ global $post;
156
+
157
+ if ( ! empty( $this->post_formats ) ) {
158
+
159
+ $saved_post_format = ( is_object( $post ) ) ? get_post_format( $post ) : false;
160
+ $saved_post_format = ( ! empty( $saved_post_format ) ) ? $saved_post_format : 'default';
161
+
162
+ $classes[] = 'wpcf-post-formats';
163
+
164
+ // Sanitize post format for standard to default.
165
+ if ( ( $key = array_search( 'standard', $this->post_formats ) ) !== false ) {
166
+ $this->post_formats[ $key ] = 'default';
167
+ }
168
+
169
+ foreach ( $this->post_formats as $format ) {
170
+ $classes[] = 'wpcf-post-format-' . $format;
171
+ }
172
+
173
+ if ( ! in_array( $saved_post_format, $this->post_formats ) ) {
174
+ $classes[] = 'wpcf-metabox-hide';
175
+ } else {
176
+ $classes[] = 'wpcf-metabox-show';
177
+ }
178
+ }
179
+
180
+ if ( ! empty( $this->page_templates ) ) {
181
+
182
+ $saved_template = ( is_object( $post ) && ! empty( $post->page_template ) ) ? $post->page_template : 'default';
183
+
184
+ $classes[] = 'wpcf-page-templates';
185
+
186
+ foreach ( $this->page_templates as $template ) {
187
+ $classes[] = 'wpcf-page-' . preg_replace( '/[^a-zA-Z0-9]+/', '-', strtolower( $template ) );
188
+ }
189
+
190
+ if ( ! in_array( $saved_template, $this->page_templates ) ) {
191
+ $classes[] = 'wpcf-metabox-hide';
192
+ } else {
193
+ $classes[] = 'wpcf-metabox-show';
194
+ }
195
+ }
196
+
197
+ if ( ! empty( $this->args['class'] ) ) {
198
+ $classes[] = $this->args['class'];
199
+ }
200
+
201
+ return $classes;
202
+
203
+ }
204
+
205
+ /**
206
+ * Add metabox.
207
+ *
208
+ * @param mixed $post_type post type.
209
+ * @return void
210
+ */
211
+ public function add_meta_box( $post_type ) {
212
+
213
+ if ( ! in_array( $post_type, $this->args['exclude_post_types'] ) ) {
214
+ add_meta_box( $this->unique, $this->args['title'], array( $this, 'add_meta_box_content' ), $this->post_type, $this->args['context'], $this->args['priority'], $this->args );
215
+ }
216
+
217
+ }
218
+
219
+ /**
220
+ * Get default value
221
+ *
222
+ * @param mixed $field field.
223
+ * @return string
224
+ */
225
+ public function get_default( $field ) {
226
+
227
+ $default = ( isset( $field['default'] ) ) ? $field['default'] : '';
228
+ $default = ( isset( $this->args['defaults'][ $field['id'] ] ) ) ? $this->args['defaults'][ $field['id'] ] : $default;
229
+ return $default;
230
+ }
231
+
232
+ /**
233
+ * Get meta value.
234
+ *
235
+ * @param mixed $field field.
236
+ * @return statement
237
+ */
238
+ public function get_meta_value( $field ) {
239
+
240
+ global $post;
241
+
242
+ $value = null;
243
+
244
+ if ( is_object( $post ) && ! empty( $field['id'] ) ) {
245
+
246
+ if ( 'serialize' !== $this->args['data_type'] ) {
247
+ $meta = get_post_meta( $post->ID, $field['id'] );
248
+ $value = ( isset( $meta[0] ) ) ? $meta[0] : null;
249
+ } else {
250
+ $meta = get_post_meta( $post->ID, $this->unique, true );
251
+ $value = ( isset( $meta[ $field['id'] ] ) ) ? $meta[ $field['id'] ] : null;
252
+ }
253
+ }
254
+
255
+ $default = ( isset( $field['id'] ) ) ? $this->get_default( $field ) : '';
256
+ $value = ( isset( $value ) ) ? $value : $default;
257
+
258
+ return $value;
259
+
260
+ }
261
+
262
+ /**
263
+ * Add metabox content
264
+ *
265
+ * @param mixed $post post.
266
+ * @param mixed $callback call back function.
267
+ * @return void
268
+ */
269
+ public function add_meta_box_content( $post, $callback ) {
270
+
271
+ global $post;
272
+
273
+ $has_nav = ( count( $this->sections ) > 1 && 'side' !== $this->args['context'] ) ? true : false;
274
+ $show_all = ( ! $has_nav ) ? ' wpcf-show-all' : '';
275
+ $post_type = ( is_object( $post ) ) ? $post->post_type : '';
276
+ $errors = ( is_object( $post ) ) ? get_post_meta( $post->ID, '_wpcf_errors_' . $this->unique, true ) : array();
277
+ $errors = ( ! empty( $errors ) ) ? $errors : array();
278
+ $theme = ( $this->args['theme'] ) ? ' wpcf-theme-' . $this->args['theme'] : '';
279
+ $nav_type = ( 'inline' === $this->args['nav'] ) ? 'inline' : 'normal';
280
+
281
+ if ( is_object( $post ) && ! empty( $errors ) ) {
282
+ delete_post_meta( $post->ID, '_wpcf_errors_' . $this->unique );
283
+ }
284
+
285
+ wp_nonce_field( 'wpcf_metabox_nonce', 'wpcf_metabox_nonce' . $this->unique );
286
+
287
+ echo '<div class="wpcf wpcf-metabox' . esc_attr( $theme ) . '">';
288
+
289
+ echo '<div class="wpcf-wrapper' . esc_attr( $show_all ) . '">';
290
+
291
+ if ( $has_nav ) {
292
+
293
+ echo '<div class="wpcf-nav wpcf-nav-' . esc_attr( $nav_type ) . ' wpcf-nav-metabox" data-unique="' . esc_attr( $this->unique ) . '">';
294
+
295
+ echo '<ul>';
296
+
297
+ $tab_key = 0;
298
+
299
+ foreach ( $this->sections as $section ) {
300
+
301
+ if ( ! empty( $section['post_type'] ) && ! in_array( $post_type, array_filter( (array) $section['post_type'] ) ) ) {
302
+ continue;
303
+ }
304
+
305
+ $tab_error = ( ! empty( $errors['sections'][ $tab_key ] ) ) ? '<i class="wpcf-label-error wpcf-error">!</i>' : '';
306
+ $tab_icon = ( ! empty( $section['icon'] ) ) ? '<i class="wpcf-tab-icon ' . esc_attr( $section['icon'] ) . '"></i>' : '';
307
+
308
+ 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>';
309
+
310
+ $tab_key++;
311
+
312
+ }
313
+
314
+ echo '</ul>';
315
+
316
+ echo '</div>';
317
+
318
+ }
319
+
320
+ echo '<div class="wpcf-content">';
321
+
322
+ echo '<div class="wpcf-sections">';
323
+
324
+ $section_key = 0;
325
+
326
+ foreach ( $this->sections as $section ) {
327
+
328
+ if ( ! empty( $section['post_type'] ) && ! in_array( $post_type, array_filter( (array) $section['post_type'] ) ) ) {
329
+ continue;
330
+ }
331
+
332
+ $section_onload = ( ! $has_nav ) ? ' wpcf-onload' : '';
333
+ $section_class = ( ! empty( $section['class'] ) ) ? ' ' . $section['class'] : '';
334
+ $section_title = ( ! empty( $section['title'] ) ) ? $section['title'] : '';
335
+ $section_icon = ( ! empty( $section['icon'] ) ) ? '<i class="wpcf-section-icon ' . esc_attr( $section['icon'] ) . '"></i>' : '';
336
+
337
+ echo '<div id="wpcf-section-' . esc_attr( $this->unique ) . '_' . esc_attr( $section_key ) . '" class="wpcf-section hidden' . esc_attr( $section_onload . $section_class ) . '" >';
338
+
339
+ echo ( $section_title || $section_icon ) ? '<div class="wpcf-section-title"><h3>' . wp_kses_post( $section_icon . $section_title ) . '</h3></div>' : '';
340
+ echo ( ! empty( $section['description'] ) ) ? '<div class="wpcf-field wpcf-section-description">' . wp_kses_post( $section['description'] ) . '</div>' : '';
341
+
342
+ if ( ! empty( $section['fields'] ) ) {
343
+
344
+ foreach ( $section['fields'] as $field ) {
345
+
346
+ if ( ! empty( $field['id'] ) && ! empty( $errors['fields'][ $field['id'] ] ) ) {
347
+ $field['_error'] = $errors['fields'][ $field['id'] ];
348
+ }
349
+
350
+ if ( ! empty( $field['id'] ) ) {
351
+ $field['default'] = $this->get_default( $field );
352
+ }
353
+
354
+ SP_WPCF::field( $field, $this->get_meta_value( $field ), $this->unique, 'metabox' );
355
+
356
+ }
357
+ } else {
358
+
359
+ echo '<div class="wpcf-no-option">' . esc_html__( 'No data available.', 'wpcf' ) . '</div>';
360
+
361
+ }
362
+
363
+ echo '</div>';
364
+
365
+ $section_key++;
366
+
367
+ }
368
+
369
+ echo '</div>';
370
+
371
+ if ( ! empty( $this->args['show_restore'] ) || ! empty( $this->args['show_reset'] ) ) {
372
+
373
+ echo '<div class="wpcf-sections-reset">';
374
+ echo '<label>';
375
+ echo '<input type="checkbox" name="' . esc_attr( $this->unique ) . '[_reset]" />';
376
+ echo '<span class="button wpcf-button-reset">' . esc_html__( 'Reset', 'wpcf' ) . '</span>';
377
+ echo '<span class="button wpcf-button-cancel">' . sprintf( '<small>( %s )</small> %s', esc_html__( 'update post', 'wpcf' ), esc_html__( 'Cancel', 'wpcf' ) ) . '</span>';
378
+ echo '</label>';
379
+ echo '</div>';
380
+
381
+ }
382
+
383
+ echo '</div>';
384
+
385
+ echo ( $has_nav && 'normal' === $nav_type ) ? '<div class="wpcf-nav-background"></div>' : '';
386
+
387
+ echo '<div class="clear"></div>';
388
+
389
+ echo '</div>';
390
+
391
+ echo '</div>';
392
+
393
+ }
394
+
395
+ /**
396
+ * Save metabox.
397
+ *
398
+ * @param int $post_id id.
399
+ * @return mixed
400
+ */
401
+ public function save_meta_box( $post_id ) {
402
+
403
+ $count = 1;
404
+ $data = array();
405
+ $errors = array();
406
+ $noncekey = 'wpcf_metabox_nonce' . $this->unique;
407
+ $nonce = ( ! empty( $_POST[ $noncekey ] ) ) ? sanitize_text_field( wp_unslash( $_POST[ $noncekey ] ) ) : '';
408
+
409
+ if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) || ! wp_verify_nonce( $nonce, 'wpcf_metabox_nonce' ) ) {
410
+ return $post_id;
411
+ }
412
+
413
+ // XSS ok.
414
+ // No worries, This "POST" requests is sanitizing in the below foreach.
415
+ $request = ( ! empty( $_POST[ $this->unique ] ) ) ? $_POST[ $this->unique ] : array(); // phpcs:ignore
416
+
417
+ if ( ! empty( $request ) ) {
418
+
419
+ foreach ( $this->sections as $section ) {
420
+
421
+ if ( ! empty( $section['fields'] ) ) {
422
+
423
+ foreach ( $section['fields'] as $field ) {
424
+
425
+ if ( ! empty( $field['id'] ) ) {
426
+
427
+ $field_id = $field['id'];
428
+ $field_value = isset( $request[ $field_id ] ) ? $request[ $field_id ] : '';
429
+ // Sanitize "post" request of field.
430
+ if ( ! isset( $field['sanitize'] ) ) {
431
+ if ( is_array( $field_value ) ) {
432
+ $data[ $field_id ] = wp_kses_post_deep( $field_value );
433
+ } else {
434
+ $data[ $field_id ] = wp_kses_post( $field_value );
435
+ }
436
+ } elseif ( isset( $field['sanitize'] ) && is_callable( $field['sanitize'] ) ) {
437
+ $data[ $field_id ] = call_user_func( $field['sanitize'], $field_value );
438
+ } else {
439
+ $data[ $field_id ] = $field_value;
440
+ }
441
+
442
+ // Validate "post" request of field.
443
+ if ( isset( $field['validate'] ) && is_callable( $field['validate'] ) ) {
444
+ $has_validated = call_user_func( $field['validate'], $field_value );
445
+ if ( ! empty( $has_validated ) ) {
446
+ $errors['sections'][ $count ] = true;
447
+ $errors['fields'][ $field_id ] = $has_validated;
448
+ $data[ $field_id ] = $this->get_meta_value( $field );
449
+
450
+ }
451
+ }
452
+ }
453
+ }
454
+ }
455
+
456
+ $count++;
457
+
458
+ }
459
+ }
460
+
461
+ $data = apply_filters( "wpcf_{$this->unique}_save", $data, $post_id, $this );
462
+
463
+ do_action( "wpcf_{$this->unique}_save_before", $data, $post_id, $this );
464
+
465
+ if ( empty( $data ) || ! empty( $request['_reset'] ) ) {
466
+
467
+ if ( 'serialize' !== $this->args['data_type'] ) {
468
+ foreach ( $data as $key => $value ) {
469
+ delete_post_meta( $post_id, $key );
470
+ }
471
+ } else {
472
+ delete_post_meta( $post_id, $this->unique );
473
+ }
474
+ } else {
475
+
476
+ if ( 'serialize' !== $this->args['data_type'] ) {
477
+ foreach ( $data as $key => $value ) {
478
+ update_post_meta( $post_id, $key, $value );
479
+ }
480
+ } else {
481
+ update_post_meta( $post_id, $this->unique, $data );
482
+ }
483
+
484
+ if ( ! empty( $errors ) ) {
485
+ update_post_meta( $post_id, '_wpcf_errors_' . $this->unique, $errors );
486
+ }
487
+ }
488
+
489
+ do_action( "wpcf_{$this->unique}_saved", $data, $post_id, $this );
490
+
491
+ do_action( "wpcf_{$this->unique}_save_after", $data, $post_id, $this );
492
+
493
+ }
494
+ }
495
+ }
admin/views/sp-framework/classes/setup.class.php ADDED
@@ -0,0 +1,592 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+
4
+ if ( ! class_exists( 'SP_WPCF' ) ) {
5
+ /**
6
+ *
7
+ * Setup Class
8
+ *
9
+ * @since 1.0.0
10
+ * @version 1.0.0
11
+ */
12
+ class SP_WPCF {
13
+
14
+ // Default constants.
15
+
16
+ /**
17
+ * Premium.
18
+ *
19
+ * @var string
20
+ */
21
+ public static $premium = true;
22
+ /**
23
+ * Version.
24
+ *
25
+ * @var string
26
+ */
27
+ public static $version = '2.2.4';
28
+ /**
29
+ * Dir.
30
+ *
31
+ * @var string
32
+ */
33
+ public static $dir = '';
34
+ /**
35
+ * Url.
36
+ *
37
+ * @var string
38
+ */
39
+ public static $url = '';
40
+ /**
41
+ * Css.
42
+ *
43
+ * @var string
44
+ */
45
+ public static $css = '';
46
+
47
+ /**
48
+ * File.
49
+ *
50
+ * @var string
51
+ */
52
+ public static $file = '';
53
+ public static $enqueue = false;
54
+ /**
55
+ * Init.
56
+ *
57
+ * @var array
58
+ */
59
+ public static $inited = array();
60
+ /**
61
+ * Field.
62
+ *
63
+ * @var array
64
+ */
65
+ public static $fields = array();
66
+ /**
67
+ * Args.
68
+ *
69
+ * @var array
70
+ */
71
+ public static $args = array(
72
+ 'admin_options' => array(),
73
+ 'metabox_options' => array(),
74
+ );
75
+
76
+ // Shortcode instances.
77
+
78
+ private static $instance = null;
79
+
80
+ public static function init( $file = __FILE__ ) {
81
+
82
+ // Set file constant.
83
+ self::$file = $file;
84
+
85
+ // Set constants.
86
+ self::constants();
87
+
88
+ // Include files.
89
+ self::includes();
90
+
91
+ if ( is_null( self::$instance ) ) {
92
+ self::$instance = new self();
93
+ }
94
+
95
+ return self::$instance;
96
+
97
+ }
98
+
99
+ /**
100
+ * Initialize.
101
+ *
102
+ * @return void
103
+ */
104
+ public function __construct() {
105
+
106
+ // Init action.
107
+ do_action( 'wpcf_init' );
108
+
109
+ add_action( 'after_setup_theme', array( 'SP_WPCF', 'setup' ) );
110
+ add_action( 'init', array( 'SP_WPCF', 'setup' ) );
111
+ add_action( 'switch_theme', array( 'SP_WPCF', 'setup' ) );
112
+ add_action( 'admin_enqueue_scripts', array( 'SP_WPCF', 'add_admin_enqueue_scripts' ) );
113
+ }
114
+
115
+ /**
116
+ * Setup frameworks
117
+ *
118
+ * @return void
119
+ */
120
+ public static function setup() {
121
+
122
+ // Welcome page.
123
+ // self::include_plugin_file( 'config/framework.config.php' );
124
+
125
+ // Setup admin option framework.
126
+ $params = array();
127
+ if ( class_exists( 'SP_WPCF_Options' ) && ! empty( self::$args['admin_options'] ) ) {
128
+ foreach ( self::$args['admin_options'] as $key => $value ) {
129
+ if ( ! empty( self::$args['sections'][ $key ] ) && ! isset( self::$inited[ $key ] ) ) {
130
+
131
+ $params['args'] = $value;
132
+ $params['sections'] = self::$args['sections'][ $key ];
133
+ self::$inited[ $key ] = true;
134
+
135
+ SP_WPCF_Options::instance( $key, $params );
136
+
137
+ if ( ! empty( $value['show_in_customizer'] ) ) {
138
+ $value['output_css'] = false;
139
+ $value['enqueue_webfont'] = false;
140
+ self::$args['customize_options'][ $key ] = $value;
141
+ self::$inited[ $key ] = null;
142
+ }
143
+ }
144
+ }
145
+ }
146
+ // Setup metabox option framework.
147
+ $params = array();
148
+ if ( class_exists( 'SP_WPCF_Metabox' ) && ! empty( self::$args['metabox_options'] ) ) {
149
+ foreach ( self::$args['metabox_options'] as $key => $value ) {
150
+ if ( ! empty( self::$args['sections'][ $key ] ) && ! isset( self::$inited[ $key ] ) ) {
151
+
152
+ $params['args'] = $value;
153
+ $params['sections'] = self::$args['sections'][ $key ];
154
+ self::$inited[ $key ] = true;
155
+
156
+ SP_WPCF_Metabox::instance( $key, $params );
157
+
158
+ }
159
+ }
160
+ }
161
+ do_action( 'wpcf_loaded' );
162
+
163
+ }
164
+
165
+ /**
166
+ * Create options
167
+ *
168
+ * @param mixed $id id.
169
+ * @param mixed $args array.
170
+ * @return void
171
+ */
172
+ public static function createOptions( $id, $args = array() ) {
173
+ self::$args['admin_options'][ $id ] = $args;
174
+ }
175
+ /**
176
+ * Create metabox options
177
+ *
178
+ * @param mixed $id id.
179
+ * @param mixed $args array.
180
+ * @return void
181
+ */
182
+ public static function createMetabox( $id, $args = array() ) {
183
+ self::$args['metabox_options'][ $id ] = $args;
184
+ }
185
+ /**
186
+ * Create section.
187
+ *
188
+ * @param mixed $id id.
189
+ * @param mixed $sections Section.
190
+ * @return void
191
+ */
192
+ public static function createSection( $id, $sections ) {
193
+ self::$args['sections'][ $id ][] = $sections;
194
+ self::set_used_fields( $sections );
195
+ }
196
+
197
+ /**
198
+ * Set directory constants
199
+ *
200
+ * @return void
201
+ */
202
+ public static function constants() {
203
+
204
+ // We need this path-finder code for set URL of framework.
205
+ $dirname = str_replace( '//', '/', wp_normalize_path( dirname( dirname( self::$file ) ) ) );
206
+ $theme_dir = str_replace( '//', '/', wp_normalize_path( get_parent_theme_file_path() ) );
207
+ $plugin_dir = str_replace( '//', '/', wp_normalize_path( WP_PLUGIN_DIR ) );
208
+ $plugin_dir = str_replace( '/opt/bitnami', '/bitnami', $plugin_dir );
209
+ $located_plugin = ( preg_match( '#' . self::sanitize_dirname( $plugin_dir ) . '#', self::sanitize_dirname( $dirname ) ) ) ? true : false;
210
+ $directory = ( $located_plugin ) ? $plugin_dir : $theme_dir;
211
+ $directory_uri = ( $located_plugin ) ? WP_PLUGIN_URL : get_parent_theme_file_uri();
212
+ $foldername = str_replace( $directory, '', $dirname );
213
+ $protocol_uri = ( is_ssl() ) ? 'https' : 'http';
214
+ $directory_uri = set_url_scheme( $directory_uri, $protocol_uri );
215
+
216
+ self::$dir = $dirname;
217
+ self::$url = $directory_uri . $foldername;
218
+
219
+ }
220
+
221
+ /**
222
+ * Include file helper.
223
+ *
224
+ * @param mixed $file file.
225
+ * @param mixed $load load.
226
+ * @return Statement.
227
+ */
228
+ public static function include_plugin_file( $file, $load = true ) {
229
+ $path = '';
230
+ $file = ltrim( $file, '/' );
231
+ $override = apply_filters( 'wpcf_override', 'wpcf-override' );
232
+
233
+ if ( file_exists( get_parent_theme_file_path( $override . '/' . $file ) ) ) {
234
+ $path = get_parent_theme_file_path( $override . '/' . $file );
235
+ } elseif ( file_exists( get_theme_file_path( $override . '/' . $file ) ) ) {
236
+ $path = get_theme_file_path( $override . '/' . $file );
237
+ } elseif ( file_exists( self::$dir . '/' . $override . '/' . $file ) ) {
238
+ $path = self::$dir . '/' . $override . '/' . $file;
239
+ } elseif ( file_exists( self::$dir . '/' . $file ) ) {
240
+ $path = self::$dir . '/' . $file;
241
+ }
242
+
243
+ if ( ! empty( $path ) && ! empty( $file ) && $load ) {
244
+
245
+ global $wp_query;
246
+
247
+ if ( is_object( $wp_query ) && function_exists( 'load_template' ) ) {
248
+
249
+ load_template( $path, true );
250
+
251
+ } else {
252
+
253
+ require_once $path;
254
+
255
+ }
256
+ } else {
257
+ return self::$dir . '/' . $file;
258
+ }
259
+
260
+ }
261
+
262
+ /**
263
+ * Is active plugin helper.
264
+ *
265
+ * @param mixed $file file path.
266
+ * @return array.
267
+ */
268
+ public static function is_active_plugin( $file = '' ) {
269
+ return in_array( $file, (array) get_option( 'active_plugins', array() ) );
270
+ }
271
+
272
+ /**
273
+ * Sanitize dirname
274
+ *
275
+ * @param mixed $dirname dir name.
276
+ * @return statement
277
+ */
278
+ public static function sanitize_dirname( $dirname ) {
279
+ return preg_replace( '/[^A-Za-z]/', '', $dirname );
280
+ }
281
+
282
+ /**
283
+ * Set url constant.
284
+ *
285
+ * @param mixed $file file url.
286
+ * @return url
287
+ */
288
+ public static function include_plugin_url( $file ) {
289
+ return esc_url( self::$url ) . '/' . ltrim( $file, '/' );
290
+ }
291
+
292
+ /**
293
+ * Include files
294
+ *
295
+ * @return void
296
+ */
297
+ public static function includes() {
298
+
299
+ // Helpers.
300
+ self::include_plugin_file( 'functions/actions.php' );
301
+ self::include_plugin_file( 'functions/helpers.php' );
302
+ self::include_plugin_file( 'functions/sanitize.php' );
303
+ self::include_plugin_file( 'functions/validate.php' );
304
+
305
+ // Includes free version classes.
306
+ self::include_plugin_file( 'classes/abstract.class.php' );
307
+ self::include_plugin_file( 'classes/fields.class.php' );
308
+ self::include_plugin_file( 'classes/admin-options.class.php' );
309
+ self::include_plugin_file( 'classes/metabox-options.class.php' );
310
+
311
+ // Include all framework fields.
312
+ $fields = apply_filters(
313
+ 'wpcf_fields',
314
+ array(
315
+ 'border',
316
+ 'button_set',
317
+ 'carousel_type',
318
+ 'checkbox',
319
+ 'code_editor',
320
+ 'color',
321
+ 'color_group',
322
+ 'custom_import',
323
+ 'column',
324
+ 'content',
325
+ 'gallery',
326
+ 'heading',
327
+ 'image_select',
328
+ 'image_sizes',
329
+ 'media',
330
+ 'notice',
331
+ 'number',
332
+ 'radio',
333
+ 'select',
334
+ 'slider',
335
+ 'shortcode',
336
+ 'spacing',
337
+ 'spinner',
338
+ 'subheading',
339
+ 'switcher',
340
+ 'text',
341
+ 'textarea',
342
+ 'typography',
343
+ 'upload',
344
+ )
345
+ );
346
+
347
+ if ( ! empty( $fields ) ) {
348
+ foreach ( $fields as $field ) {
349
+ if ( ! class_exists( 'SP_WPCF_Field_' . $field ) && class_exists( 'SP_WPCF_Fields' ) ) {
350
+ self::include_plugin_file( 'fields/' . $field . '/' . $field . '.php' );
351
+ }
352
+ }
353
+ }
354
+
355
+ }
356
+
357
+ /**
358
+ * Set all of used fields
359
+ *
360
+ * @param mixed $sections section.
361
+ * @return void
362
+ */
363
+ public static function set_used_fields( $sections ) {
364
+
365
+ if ( ! empty( $sections['fields'] ) ) {
366
+
367
+ foreach ( $sections['fields'] as $field ) {
368
+
369
+ if ( ! empty( $field['fields'] ) ) {
370
+ self::set_used_fields( $field );
371
+ }
372
+
373
+ if ( ! empty( $field['tabs'] ) ) {
374
+ self::set_used_fields( array( 'fields' => $field['tabs'] ) );
375
+ }
376
+
377
+ if ( ! empty( $field['accordions'] ) ) {
378
+ self::set_used_fields( array( 'fields' => $field['accordions'] ) );
379
+ }
380
+
381
+ if ( ! empty( $field['type'] ) ) {
382
+ self::$fields[ $field['type'] ] = $field;
383
+ }
384
+ }
385
+ }
386
+
387
+ }
388
+
389
+ /**
390
+ * Enqueue admin and fields styles and scripts
391
+ *
392
+ * @return void
393
+ */
394
+ public static function add_admin_enqueue_scripts() {
395
+
396
+ // Loads scripts and styles only when needed.
397
+ $wpscreen = get_current_screen();
398
+ $current_screen = get_current_screen();
399
+ $the_current_post_type = $current_screen->post_type;
400
+ if ( 'sp_wp_carousel' === $the_current_post_type ) {
401
+ if ( ! empty( self::$args['admin_options'] ) ) {
402
+ foreach ( self::$args['admin_options'] as $argument ) {
403
+ if ( substr( $wpscreen->id, -strlen( $argument['menu_slug'] ) ) === $argument['menu_slug'] ) {
404
+ self::$enqueue = true;
405
+ }
406
+ }
407
+ }
408
+ if ( ! empty( self::$args['metabox_options'] ) ) {
409
+ foreach ( self::$args['metabox_options'] as $argument ) {
410
+ if ( in_array( $wpscreen->post_type, (array) $argument['post_type'] ) ) {
411
+ self::$enqueue = true;
412
+ }
413
+ }
414
+ }
415
+
416
+ if ( ! apply_filters( 'wpcf_enqueue_assets', self::$enqueue ) ) {
417
+ return;
418
+ }
419
+
420
+ // Check for developer mode.
421
+ $min = ( self::$premium && SCRIPT_DEBUG ) ? '' : '.min';
422
+
423
+ // Admin utilities.
424
+ wp_enqueue_media();
425
+
426
+ // Wp color picker.
427
+ wp_enqueue_style( 'wp-color-picker' );
428
+ wp_enqueue_script( 'wp-color-picker' );
429
+
430
+ // Font awesome 4 and 5 loader.
431
+ if ( apply_filters( 'wpcf_fa4', true ) ) {
432
+ wp_enqueue_style( 'wpcf-fa', 'https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome' . $min . '.css', array(), '4.7.0', 'all' );
433
+ } else {
434
+ wp_enqueue_style( 'wpcf-fa5', 'https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/all' . $min . '.css', array(), '5.15.5', 'all' );
435
+ wp_enqueue_style( 'wpcf-fa5-v4-shims', 'https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/v4-shims' . $min . '.css', array(), '5.15.5', 'all' );
436
+ }
437
+
438
+ // Main style.
439
+ wp_enqueue_style( 'wpcf', self::include_plugin_url( 'assets/css/style' . $min . '.css' ), array(), self::$version, 'all' );
440
+ // Main RTL styles.
441
+ if ( is_rtl() ) {
442
+ wp_enqueue_style( 'wpcf-rtl', self::include_plugin_url( 'assets/css/style-rtl' . $min . '.css' ), array(), self::$version, 'all' );
443
+ }
444
+
445
+ // Main scripts.
446
+ wp_enqueue_script( 'wpcf-plugins', self::include_plugin_url( 'assets/js/plugins' . $min . '.js' ), array(), self::$version, true );
447
+ wp_enqueue_script( 'wpcf', self::include_plugin_url( 'assets/js/main' . $min . '.js' ), array( 'wpcf-plugins' ), self::$version, true );
448
+
449
+ // Main variables.
450
+ wp_localize_script(
451
+ 'wpcf',
452
+ 'wpcf_vars',
453
+ array(
454
+ 'color_palette' => apply_filters( 'wpcf_color_palette', array() ),
455
+ 'i18n' => array(
456
+ 'confirm' => esc_html__( 'Are you sure?', 'wp-carousel-free' ),
457
+ 'typing_text' => esc_html__( 'Please enter %s or more characters', 'wp-carousel-free' ),
458
+ 'searching_text' => esc_html__( 'Searching...', 'wp-carousel-free' ),
459
+ 'no_results_text' => esc_html__( 'No results found.', 'wp-carousel-free' ),
460
+ ),
461
+ )
462
+ );
463
+
464
+ // Enqueue fields scripts and styles.
465
+ $enqueued = array();
466
+
467
+ if ( ! empty( self::$fields ) ) {
468
+ foreach ( self::$fields as $field ) {
469
+ if ( ! empty( $field['type'] ) ) {
470
+ $classname = 'SP_WPCF_Field_' . $field['type'];
471
+ if ( class_exists( $classname ) && method_exists( $classname, 'enqueue' ) ) {
472
+ $instance = new $classname( $field );
473
+ if ( method_exists( $classname, 'enqueue' ) ) {
474
+ $instance->enqueue();
475
+ }
476
+ unset( $instance );
477
+ }
478
+ }
479
+ }
480
+ }
481
+
482
+ do_action( 'wpcf_enqueue' );
483
+ }
484
+
485
+ }
486
+
487
+
488
+ /**
489
+ * Add a new framework field.
490
+ *
491
+ * @param array $field field.
492
+ * @param string $value string.
493
+ * @param mixed $unique unique id.
494
+ * @param mixed $where where to add.
495
+ * @param mixed $parent parent.
496
+ * @return void
497
+ */
498
+ public static function field( $field = array(), $value = '', $unique = '', $where = '', $parent = '' ) {
499
+
500
+ // Check for disallow fields.
501
+ if ( ! empty( $field['_notice'] ) ) {
502
+
503
+ $field_type = $field['type'];
504
+
505
+ $field = array();
506
+ $field['content'] = esc_html__( 'Oops! Not allowed.', 'wp-carousel-free' ) . ' <strong>(' . $field_type . ')</strong>';
507
+ $field['type'] = 'notice';
508
+ $field['style'] = 'danger';
509
+
510
+ }
511
+
512
+ $depend = '';
513
+ $visible = '';
514
+ $unique = ( ! empty( $unique ) ) ? $unique : '';
515
+ $class = ( ! empty( $field['class'] ) ) ? ' ' . esc_attr( $field['class'] ) : '';
516
+ $is_pseudo = ( ! empty( $field['pseudo'] ) ) ? ' wpcf-pseudo-field' : '';
517
+ $field_type = ( ! empty( $field['type'] ) ) ? esc_attr( $field['type'] ) : '';
518
+
519
+ if ( ! empty( $field['dependency'] ) ) {
520
+
521
+ $dependency = $field['dependency'];
522
+ $depend_visible = '';
523
+ $data_controller = '';
524
+ $data_condition = '';
525
+ $data_value = '';
526
+ $data_global = '';
527
+
528
+ if ( is_array( $dependency[0] ) ) {
529
+ $data_controller = implode( '|', array_column( $dependency, 0 ) );
530
+ $data_condition = implode( '|', array_column( $dependency, 1 ) );
531
+ $data_value = implode( '|', array_column( $dependency, 2 ) );
532
+ $data_global = implode( '|', array_column( $dependency, 3 ) );
533
+ $depend_visible = implode( '|', array_column( $dependency, 4 ) );
534
+ } else {
535
+ $data_controller = ( ! empty( $dependency[0] ) ) ? $dependency[0] : '';
536
+ $data_condition = ( ! empty( $dependency[1] ) ) ? $dependency[1] : '';
537
+ $data_value = ( ! empty( $dependency[2] ) ) ? $dependency[2] : '';
538
+ $data_global = ( ! empty( $dependency[3] ) ) ? $dependency[3] : '';
539
+ $depend_visible = ( ! empty( $dependency[4] ) ) ? $dependency[4] : '';
540
+ }
541
+
542
+ $depend .= ' data-controller="' . esc_attr( $data_controller ) . '"';
543
+ $depend .= ' data-condition="' . esc_attr( $data_condition ) . '"';
544
+ $depend .= ' data-value="' . esc_attr( $data_value ) . '"';
545
+ $depend .= ( ! empty( $data_global ) ) ? ' data-depend-global="true"' : '';
546
+
547
+ $visible = ( ! empty( $depend_visible ) ) ? ' wpcf-depend-visible' : ' wpcf-depend-hidden';
548
+
549
+ }
550
+
551
+ // These attributes has been sanitized above.
552
+ echo wp_kses_post( '<div class="wpcf-field wpcf-field-' . $field_type . $is_pseudo . $class . $visible . '"' . $depend . '>' );
553
+ if ( ! empty( $field_type ) ) {
554
+ if ( ! empty( $field['fancy_title'] ) ) {
555
+ echo '<div class="wpcf-fancy-title">' . wp_kses_post( $field['fancy_title'] ) . '</div>';
556
+ }
557
+
558
+ if ( ! empty( $field['title'] ) ) {
559
+ echo '<div class="wpcf-title">';
560
+ echo '<h4>' . wp_kses_post( $field['title'] ) . '</h4>';
561
+ echo ( ! empty( $field['subtitle'] ) ) ? '<div class="wpcf-subtitle-text">' . wp_kses_post( $field['subtitle'] ) . '</div>' : '';
562
+ echo '</div>';
563
+ }
564
+
565
+ echo ( ! empty( $field['title'] ) || ! empty( $field['fancy_title'] ) ) ? '<div class="wpcf-fieldset">' : '';
566
+
567
+ $value = ( ! isset( $value ) && isset( $field['default'] ) ) ? $field['default'] : $value;
568
+ $value = ( isset( $field['value'] ) ) ? $field['value'] : $value;
569
+
570
+ $classname = 'SP_WPCF_Field_' . $field_type;
571
+
572
+ if ( class_exists( $classname ) ) {
573
+ $instance = new $classname( $field, $value, $unique, $where, $parent );
574
+ $instance->render();
575
+ } else {
576
+ echo '<p>' . esc_html__( 'Field not found!', 'wp-carousel-free' ) . '</p>';
577
+ }
578
+ } else {
579
+ echo '<p>' . esc_html__( 'Field not found!', 'wp-carousel-free' ) . '</p>';
580
+ }
581
+
582
+ echo ( ! empty( $field['title'] ) || ! empty( $field['fancy_title'] ) ) ? '</div>' : '';
583
+ echo '<div class="clear"></div>';
584
+ echo '</div>';
585
+
586
+ }
587
+
588
+ }
589
+
590
+ }
591
+
592
+ SP_WPCF::init( __FILE__ );
admin/views/{wpcfree-metabox → sp-framework}/fields/border/border.php RENAMED
@@ -1,42 +1,59 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access directly.
3
  /**
4
  *
5
  * Field: border
6
  *
7
  * @since 1.0.0
8
  * @version 1.0.0
 
 
9
  */
 
 
 
 
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(
35
- 'top_icon' => '<i class="fa fa-long-arrow-up"></i>',
36
- 'left_icon' => '<i class="fa fa-long-arrow-left"></i>',
37
- 'bottom_icon' => '<i class="fa fa-long-arrow-down"></i>',
38
- 'right_icon' => '<i class="fa fa-long-arrow-right"></i>',
39
- 'all_icon' => '<i class="fa fa-arrows"></i>',
40
  'top_placeholder' => esc_html__( 'top', 'wp-carousel-free' ),
41
  'right_placeholder' => esc_html__( 'right', 'wp-carousel-free' ),
42
  'bottom_placeholder' => esc_html__( 'bottom', 'wp-carousel-free' ),
@@ -48,9 +65,9 @@ if ( ! class_exists( 'SP_WPCF_Field_border' ) ) {
48
  'right' => true,
49
  'all' => false,
50
  'color' => true,
 
51
  'style' => true,
52
  'unit' => 'px',
53
- 'min' => '0',
54
  )
55
  );
56
 
@@ -62,7 +79,6 @@ if ( ! class_exists( 'SP_WPCF_Field_border' ) ) {
62
  'color' => '',
63
  'style' => 'solid',
64
  'all' => '',
65
- 'min' => '',
66
  );
67
 
68
  $border_props = array(
@@ -83,64 +99,73 @@ if ( ! class_exists( 'SP_WPCF_Field_border' ) ) {
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
  }
123
  }
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
 
1
+ <?php
 
2
  /**
3
  *
4
  * Field: border
5
  *
6
  * @since 1.0.0
7
  * @version 1.0.0
8
+ * @package WP Carousel
9
+ * @subpackage wp-carousel-free/sp-framework
10
  */
11
+
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ die; } // Cannot access directly.
14
+
15
  if ( ! class_exists( 'SP_WPCF_Field_border' ) ) {
16
+ /**
17
+ *
18
+ * Field: border
19
+ *
20
+ * @since 1.0.0
21
+ * @version 1.0.0
22
+ * @package WP Carousel
23
+ * @subpackage wp-carousel-free/sp-framework
24
+ */
25
  class SP_WPCF_Field_border extends SP_WPCF_Fields {
26
 
27
  /**
28
+ * Create fields.
29
  *
30
+ * @param mixed $field field.
31
+ * @param mixed $value value.
32
+ * @param mixed $unique unique id.
33
+ * @param mixed $where where to add.
34
+ * @param mixed $parent parent.
35
+ * @return void
36
  */
37
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
38
  parent::__construct( $field, $value, $unique, $where, $parent );
39
  }
40
 
41
+
42
  /**
43
+ * Render
44
  *
45
  * @return void
46
  */
47
  public function render() {
48
+
49
  $args = wp_parse_args(
50
  $this->field,
51
  array(
52
+ 'top_icon' => '<i class="fa fa-long-arrow-alt-up"></i>',
53
+ 'left_icon' => '<i class="fa fa-long-arrow-alt-left"></i>',
54
+ 'bottom_icon' => '<i class="fa fa-long-arrow-alt-down"></i>',
55
+ 'right_icon' => '<i class="fa fa-long-arrow-alt-right"></i>',
56
+ 'all_icon' => '<i class="fa fa-arrows-alt"></i>',
57
  'top_placeholder' => esc_html__( 'top', 'wp-carousel-free' ),
58
  'right_placeholder' => esc_html__( 'right', 'wp-carousel-free' ),
59
  'bottom_placeholder' => esc_html__( 'bottom', 'wp-carousel-free' ),
65
  'right' => true,
66
  'all' => false,
67
  'color' => true,
68
+ 'hover_color' => false,
69
  'style' => true,
70
  'unit' => 'px',
 
71
  )
72
  );
73
 
79
  'color' => '',
80
  'style' => 'solid',
81
  'all' => '',
 
82
  );
83
 
84
  $border_props = array(
99
 
100
  echo wp_kses_post( $this->field_before() );
101
 
102
+ echo '<div class="wpcf--inputs" data-depend-id="' . esc_attr( $this->field['id'] ) . '">';
103
 
104
  if ( ! empty( $args['all'] ) ) {
105
 
106
  $placeholder = ( ! empty( $args['all_placeholder'] ) ) ? ' placeholder="' . esc_attr( $args['all_placeholder'] ) . '"' : '';
107
 
108
+ echo '<div class="wpcf--input">';
109
+ echo ( ! empty( $args['all_icon'] ) ) ? '<span class="wpcf--label wpcf--icon">' . $args['all_icon'] . '</span>' : '';
110
  // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
111
+ echo '<input type="number" name="' . esc_attr( $this->field_name( '[all]' ) ) . '" value="' . esc_attr( $value['all'] ) . '"' . $placeholder . ' class="wpcf-input-number wpcf--is-unit" step="any" />';
112
+ echo ( ! empty( $args['unit'] ) ) ? '<span class="wpcf--label wpcf--unit">' . esc_attr( $args['unit'] ) . '</span>' : '';
 
113
  echo '</div>';
114
 
115
  } else {
116
 
117
  $properties = array();
118
+
119
  foreach ( array( 'top', 'right', 'bottom', 'left' ) as $prop ) {
120
  if ( ! empty( $args[ $prop ] ) ) {
121
  $properties[] = $prop;
122
  }
123
  }
124
+
125
+ $properties = ( $properties === array( 'right', 'left' ) ) ? array_reverse( $properties ) : $properties;
126
 
127
  foreach ( $properties as $property ) {
128
 
129
  $placeholder = ( ! empty( $args[ $property . '_placeholder' ] ) ) ? ' placeholder="' . esc_attr( $args[ $property . '_placeholder' ] ) . '"' : '';
130
 
131
+ echo '<div class="wpcf--input">';
132
+ echo ( ! empty( $args[ $property . '_icon' ] ) ) ? '<span class="wpcf--label wpcf--icon">' . $args[ $property . '_icon' ] . '</span>' : '';
133
+ echo '<input type="number" name="' . esc_attr( $this->field_name( '[' . $property . ']' ) ) . '" value="' . esc_attr( $value[ $property ] ) . '"' . $placeholder . ' class="wpcf-input-number wpcf--is-unit" step="any" />';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
134
+ echo ( ! empty( $args['unit'] ) ) ? '<span class="wpcf--label wpcf--unit">' . esc_attr( $args['unit'] ) . '</span>' : '';
 
 
135
  echo '</div>';
136
 
137
  }
138
  }
139
 
140
  if ( ! empty( $args['style'] ) ) {
141
+ echo '<div class="wpcf--input">';
142
  echo '<select name="' . esc_attr( $this->field_name( '[style]' ) ) . '">';
143
  foreach ( $border_props as $border_prop_key => $border_prop_value ) {
144
  $selected = ( $value['style'] === $border_prop_key ) ? ' selected' : '';
145
+ echo '<option value="' . esc_attr( $border_prop_key ) . '"' . esc_attr( $selected ) . '>' . esc_attr( $border_prop_value ) . '</option>';
146
  }
147
  echo '</select>';
148
  echo '</div>';
149
  }
150
 
151
+ echo '</div>';
152
+
153
  if ( ! empty( $args['color'] ) ) {
154
  $default_color_attr = ( ! empty( $default_value['color'] ) ) ? ' data-default-color="' . esc_attr( $default_value['color'] ) . '"' : '';
155
+ echo '<div class="wpcf--color">';
156
+ echo '<div class="wpcf-field-color">';
157
+ echo '<input type="text" name="' . esc_attr( $this->field_name( '[color]' ) ) . '" value="' . esc_attr( $value['color'] ) . '" class="wpcf-color"' . $default_color_attr . ' />';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
158
+ echo '</div>';
159
+ echo '</div>';
160
+ }
161
+ if ( ! empty( $args['hover_color'] ) ) {
162
+ $default_color_attr = ( ! empty( $default_value['hover_color'] ) ) ? ' data-default-color="' . esc_attr( $default_value['hover_color'] ) . '"' : '';
163
+ echo '<div class="wpcf--color">';
164
+ echo '<div class="wpcf-field-color">';
165
+ echo '<input type="text" name="' . esc_attr( $this->field_name( '[hover_color]' ) ) . '" value="' . esc_attr( $value['hover_color'] ) . '" class="wpcf-color"' . $default_color_attr . ' />'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
166
+ echo '</div>';
167
  echo '</div>';
168
  }
 
 
169
 
170
  echo wp_kses_post( $this->field_after() );
171
 
admin/views/sp-framework/fields/button_set/button_set.php ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Field: button_set
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ * @package WP Carousel
10
+ * @subpackage wp-carousel-free/sp-framework
11
+ */
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ die; } // Cannot access directly.
15
+
16
+ if ( ! class_exists( 'SP_WPCF_Field_button_set' ) ) {
17
+ /**
18
+ *
19
+ * Field: button_set
20
+ *
21
+ * @since 1.0.0
22
+ * @version 1.0.0
23
+ */
24
+ class SP_WPCF_Field_button_set extends SP_WPCF_Fields {
25
+
26
+ /**
27
+ * Button set 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
+ /**
41
+ * Render
42
+ *
43
+ * @return void
44
+ */
45
+ public function render() {
46
+
47
+ $args = wp_parse_args(
48
+ $this->field,
49
+ array(
50
+ 'multiple' => false,
51
+ 'options' => array(),
52
+ 'query_args' => array(),
53
+ )
54
+ );
55
+
56
+ $value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
57
+
58
+ echo wp_kses_post( $this->field_before() );
59
+
60
+ if ( isset( $this->field['options'] ) ) {
61
+
62
+ $options = $this->field['options'];
63
+ $options = ( is_array( $options ) ) ? $options : '';
64
+
65
+ if ( is_array( $options ) && ! empty( $options ) ) {
66
+
67
+ echo '<div class="wpcf-siblings wpcf--button-group" data-multiple="' . esc_attr( $args['multiple'] ) . '">';
68
+
69
+ foreach ( $options as $key => $option ) {
70
+
71
+ $type = ( $args['multiple'] ) ? 'checkbox' : 'radio';
72
+ $extra = ( $args['multiple'] ) ? '[]' : '';
73
+ $active = ( in_array( $key, $value ) || ( empty( $value ) && empty( $key ) ) ) ? ' wpcf--active' : '';
74
+ $checked = ( in_array( $key, $value ) || ( empty( $value ) && empty( $key ) ) ) ? ' checked' : '';
75
+ $pro_only_class = ( isset( $option['pro_only'] ) && $option['pro_only'] ) ? ' wpcf-pro-only' : '';
76
+
77
+ echo '<div class="wpcf--sibling wpcf--button' . esc_attr( $active . $pro_only_class ) . '">';
78
+ 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
79
+ if ( isset( $option['option_name'] ) && ! empty( $option['option_name'] ) ) {
80
+ echo esc_html( $option['option_name'] );
81
+ } else {
82
+ echo esc_html( $option );
83
+ }
84
+ echo '</div>';
85
+
86
+ }
87
+
88
+ echo '</div>';
89
+
90
+ } else {
91
+
92
+ echo ! empty( $this->field['empty_message'] ) ? esc_attr( $this->field['empty_message'] ) : esc_html__( 'No data available.', 'wp-carousel-free' );
93
+
94
+ }
95
+ }
96
+
97
+ echo wp_kses_post( $this->field_after() );
98
+
99
+ }
100
+
101
+ }
102
+ }
admin/views/{wpcfree-metabox → sp-framework}/fields/carousel_type/carousel_type.php RENAMED
@@ -1,14 +1,28 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access directly.
3
  /**
4
  *
5
- * Field: image_select
6
  *
7
  * @since 1.0.0
8
  * @version 1.0.0
 
 
 
9
  */
 
 
 
 
10
  if ( ! class_exists( 'SP_WPCF_Field_carousel_type' ) ) {
 
 
 
 
 
 
 
11
  class SP_WPCF_Field_carousel_type extends SP_WPCF_Fields {
 
12
  /**
13
  * Carousel type field constructor.
14
  *
@@ -43,7 +57,7 @@ if ( ! class_exists( 'SP_WPCF_Field_carousel_type' ) ) {
43
 
44
  if ( ! empty( $args['options'] ) ) {
45
 
46
- echo '<div class="spf-siblings spf--image-group" data-multiple="' . $args['multiple'] . '">';
47
 
48
  $num = 1;
49
 
@@ -51,13 +65,13 @@ if ( ! class_exists( 'SP_WPCF_Field_carousel_type' ) ) {
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
  }
1
+ <?php
 
2
  /**
3
  *
4
+ * Field: carousel_type
5
  *
6
  * @since 1.0.0
7
  * @version 1.0.0
8
+ *
9
+ * @package WP Carousel
10
+ * @subpackage wp-carousel-free/sp-framework
11
  */
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ die; } // Cannot access directly.
15
+
16
  if ( ! class_exists( 'SP_WPCF_Field_carousel_type' ) ) {
17
+ /**
18
+ *
19
+ * Field: carousel_type
20
+ *
21
+ * @since 1.0.0
22
+ * @version 1.0.0
23
+ */
24
  class SP_WPCF_Field_carousel_type extends SP_WPCF_Fields {
25
+
26
  /**
27
  * Carousel type field constructor.
28
  *
57
 
58
  if ( ! empty( $args['options'] ) ) {
59
 
60
+ echo '<div class="wpcf-siblings wpcf--image-group" data-multiple="' . esc_attr( $args['multiple'] ) . '">';
61
 
62
  $num = 1;
63
 
65
 
66
  $type = ( $args['multiple'] ) ? 'checkbox' : 'radio';
67
  $extra = ( $args['multiple'] ) ? '[]' : '';
68
+ $active = ( in_array( $key, $value ) ) ? ' wpcf--active' : '';
69
  $checked = ( in_array( $key, $value ) ) ? ' checked' : '';
70
  $pro_only = isset( $option['pro_only'] ) ? ' disabled' : '';
71
  $pro_only_text = isset( $option['pro_only'] ) ? '<strong class="ct-pro-only">' . esc_html__( 'PRO', 'wp-carousel-free' ) . '</strong>' : '';
72
+ echo '<div class="wpcf--sibling wpcf--image' . $active . '">';
73
+ // echo '<img src="' . $option . '" alt="img-' . $num++ . '" />';
74
+ echo '<label><input' . esc_attr( $pro_only ) . ' type="' . esc_attr( $type ) . '" name="' . esc_attr( $this->field_name( $extra ) ) . '" value="' . esc_attr( $key ) . '"' . $this->field_attributes() . esc_attr( $checked ) . '/>' . $pro_only_text . '<i class="' . $option['icon'] . '"></i><p class="sp-carousel-type">' . esc_html( $option['text'] ) . '</p></label>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
75
  echo '</div>';
76
 
77
  }
admin/views/sp-framework/fields/checkbox/checkbox.php ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Field: checkbox
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ * @package WP Carousel
10
+ * @subpackage wp-carousel-free/sp-framework
11
+ */
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ die; } // Cannot access directly.
15
+
16
+ if ( ! class_exists( 'SP_WPCF_Field_checkbox' ) ) {
17
+ /**
18
+ *
19
+ * Field: checkbox
20
+ *
21
+ * @since 1.0.0
22
+ * @version 1.0.0
23
+ */
24
+ class SP_WPCF_Field_checkbox extends SP_WPCF_Fields {
25
+
26
+ /**
27
+ * Checkbox 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
+ /**
41
+ * Render
42
+ *
43
+ * @return void
44
+ */
45
+ public function render() {
46
+
47
+ $args = wp_parse_args(
48
+ $this->field,
49
+ array(
50
+ 'inline' => false,
51
+ 'query_args' => array(),
52
+ )
53
+ );
54
+
55
+ $inline_class = ( $args['inline'] ) ? ' class="wpcf--inline-list"' : '';
56
+
57
+ echo wp_kses_post( $this->field_before() );
58
+
59
+ if ( isset( $this->field['options'] ) ) {
60
+
61
+ $value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
62
+ $options = $this->field['options'];
63
+ $options = ( is_array( $options ) ) ? $options : '';
64
+
65
+ if ( is_array( $options ) && ! empty( $options ) ) {
66
+
67
+ echo '<ul' . $inline_class . '>';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
68
+
69
+ foreach ( $options as $option_key => $option_value ) {
70
+
71
+ if ( is_array( $option_value ) && ! empty( $option_value ) ) {
72
+
73
+ echo '<li>';
74
+ echo '<ul>';
75
+ echo '<li><strong>' . esc_attr( $option_key ) . '</strong></li>';
76
+ foreach ( $option_value as $sub_key => $sub_value ) {
77
+ $checked = ( in_array( $sub_key, $value ) ) ? ' checked' : '';
78
+ echo '<li>';
79
+ echo '<label>';
80
+ echo '<input type="checkbox" name="' . esc_attr( $this->field_name( '[]' ) ) . '" value="' . esc_attr( $sub_key ) . '"' . $this->field_attributes() . esc_attr( $checked ) . '/>';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
81
+ echo '<span class="wpcf--text">' . esc_attr( $sub_value ) . '</span>';
82
+ echo '</label>';
83
+ echo '</li>';
84
+ }
85
+ echo '</ul>';
86
+ echo '</li>';
87
+
88
+ } else {
89
+
90
+ $checked = ( in_array( $option_key, $value ) ) ? ' checked' : '';
91
+
92
+ echo '<li>';
93
+ echo '<label>';
94
+ echo '<input type="checkbox" name="' . esc_attr( $this->field_name( '[]' ) ) . '" value="' . esc_attr( $option_key ) . '"' . $this->field_attributes() . esc_attr( $checked ) . '/>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
95
+ echo '<span class="wpcf--text">' . esc_attr( $option_value ) . '</span>';
96
+ echo '</label>';
97
+ echo '</li>';
98
+
99
+ }
100
+ }
101
+
102
+ echo '</ul>';
103
+
104
+ } else {
105
+ echo ! empty( $this->field['empty_message'] ) ? esc_attr( $this->field['empty_message'] ) : esc_html__( 'No data available.', 'wp-carousel-free' );
106
+ }
107
+ } else {
108
+ echo '<label class="wpcf-checkbox">';
109
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name() ) . '" value="' . esc_attr( $this->value ) . '" class="wpcf--input"' . $this->field_attributes() . '/>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
110
+ echo '<input type="checkbox" name="_pseudo" class="wpcf--checkbox"' . esc_attr( checked( $this->value, 1, false ) ) . '/>';
111
+ echo ( ! empty( $this->field['label'] ) ) ? '<span class="wpcf--text">' . esc_attr( $this->field['label'] ) . '</span>' : '';
112
+ echo '</label>';
113
+
114
+ }
115
+
116
+ echo wp_kses_post( $this->field_after() );
117
+
118
+ }
119
+
120
+ }
121
+ }
admin/views/{wpcfree-metabox → sp-framework}/fields/code_editor/code_editor.php RENAMED
@@ -1,23 +1,37 @@
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
  */
@@ -36,8 +50,9 @@ if ( ! class_exists( 'SP_WPCF_Field_code_editor' ) ) {
36
  parent::__construct( $field, $value, $unique, $where, $parent );
37
  }
38
 
 
39
  /**
40
- * Render field
41
  *
42
  * @return void
43
  */
@@ -53,10 +68,9 @@ if ( ! class_exists( 'SP_WPCF_Field_code_editor' ) ) {
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
  }
@@ -67,18 +81,19 @@ if ( ! class_exists( 'SP_WPCF_Field_code_editor' ) ) {
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
  }
1
+ <?php
 
2
  /**
3
  *
4
  * Field: code_editor
5
  *
6
  * @since 1.0.0
7
  * @version 1.0.0
8
+ *
9
+ * @package WP Carousel
10
+ * @subpackage wp-carousel-free/sp-framework
11
  */
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ die; } // Cannot access directly.
15
+
16
  if ( ! class_exists( 'SP_WPCF_Field_code_editor' ) ) {
17
+
18
+ /**
19
+ *
20
+ * Field: code_editor
21
+ *
22
+ * @since 1.0.0
23
+ * @version 1.0.0
24
+ */
25
  class SP_WPCF_Field_code_editor extends SP_WPCF_Fields {
26
 
27
  /**
28
+ * Code mirror Version
29
  *
30
  * @var string
31
  */
32
+ public $version = '5.62.2';
33
  /**
34
+ * Code mirror url.
35
  *
36
  * @var string
37
  */
50
  parent::__construct( $field, $value, $unique, $where, $parent );
51
  }
52
 
53
+
54
  /**
55
+ * Render
56
  *
57
  * @return void
58
  */
68
 
69
  $settings = ( ! empty( $this->field['settings'] ) ) ? $this->field['settings'] : array();
70
  $settings = wp_parse_args( $settings, $default_settings );
 
71
 
72
  echo wp_kses_post( $this->field_before() );
73
+ echo '<textarea name="' . esc_attr( $this->field_name() ) . '"' . $this->field_attributes() . ' data-editor="' . esc_attr( wp_json_encode( $settings ) ) . '">' . wp_kses_post( $this->value ) . '</textarea>';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $this->field_attributes() is escaped before being passed in.
74
  echo wp_kses_post( $this->field_after() );
75
 
76
  }
81
  * @return void
82
  */
83
  public function enqueue() {
84
+ $page = ( isset( $_GET['page'] ) && ! empty( $_GET['page'] ) ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : ''; // phpcs:ignore
85
 
86
  // Do not loads CodeMirror in revslider page.
87
+ if ( in_array( $page, array( 'revslider' ) ) ) {
88
  return; }
89
 
90
+ if ( ! wp_script_is( 'wpcf-codemirror' ) ) {
91
+ wp_enqueue_script( 'wpcf-codemirror', esc_url( $this->cdn_url . $this->version . '/lib/codemirror.min.js' ), array( 'wpcf' ), $this->version, true );
92
+ wp_enqueue_script( 'wpcf-codemirror-loadmode', esc_url( $this->cdn_url . $this->version . '/addon/mode/loadmode.min.js' ), array( 'wpcf-codemirror' ), $this->version, true );
93
  }
94
 
95
+ if ( ! wp_style_is( 'wpcf-codemirror' ) ) {
96
+ wp_enqueue_style( 'wpcf-codemirror', esc_url( $this->cdn_url . $this->version . '/lib/codemirror.min.css' ), array(), $this->version );
97
  }
98
 
99
  }
admin/views/{wpcfree-metabox → sp-framework}/fields/color/color.php RENAMED
@@ -1,4 +1,15 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
 
 
 
 
 
 
 
 
 
 
 
2
  die; } // Cannot access directly.
3
  /**
4
  *
@@ -8,23 +19,32 @@
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
  */
@@ -33,7 +53,7 @@ if ( ! class_exists( 'SP_WPCF_Field_color' ) ) {
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
  }
@@ -41,7 +61,7 @@ if ( ! class_exists( 'SP_WPCF_Field_color' ) ) {
41
  /**
42
  * Output
43
  *
44
- * @return statement
45
  */
46
  public function output() {
47
 
@@ -50,7 +70,7 @@ if ( ! class_exists( 'SP_WPCF_Field_color' ) ) {
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 . ';}';
@@ -62,7 +82,9 @@ if ( ! class_exists( 'SP_WPCF_Field_color' ) ) {
62
  }
63
 
64
  $this->parent->output_css .= $output;
 
65
  return $output;
 
66
  }
67
 
68
  }
1
+ <?php
2
+ /**
3
+ *
4
+ * Field: color
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ * @package WP Carousel
10
+ * @subpackage wp-carousel-free/sp-framework
11
+ */
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
  die; } // Cannot access directly.
14
  /**
15
  *
19
  * @version 1.0.0
20
  */
21
  if ( ! class_exists( 'SP_WPCF_Field_color' ) ) {
22
+ /**
23
+ *
24
+ * Field: color
25
+ *
26
+ * @since 1.0.0
27
+ * @version 1.0.0
28
+ */
29
  class SP_WPCF_Field_color extends SP_WPCF_Fields {
30
 
31
  /**
32
+ * Create fields.
33
  *
34
+ * @param mixed $field field.
35
+ * @param mixed $value value.
36
+ * @param mixed $unique unique id.
37
+ * @param mixed $where where to add.
38
+ * @param mixed $parent parent.
39
+ * @return void
40
  */
41
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
42
  parent::__construct( $field, $value, $unique, $where, $parent );
43
  }
44
 
45
+
46
  /**
47
+ * Render
48
  *
49
  * @return void
50
  */
53
  $default_attr = ( ! empty( $this->field['default'] ) ) ? ' data-default-color="' . esc_attr( $this->field['default'] ) . '"' : '';
54
 
55
  echo wp_kses_post( $this->field_before() );
56
+ echo '<input type="text" name="' . esc_attr( $this->field_name() ) . '" value="' . esc_attr( $this->value ) . '" class="wpcf-color"' . $default_attr . $this->field_attributes() . '/>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $this->field_attributes() is escaped before being passed in.
57
  echo wp_kses_post( $this->field_after() );
58
 
59
  }
61
  /**
62
  * Output
63
  *
64
+ * @return css
65
  */
66
  public function output() {
67
 
70
  $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
71
  $mode = ( ! empty( $this->field['output_mode'] ) ) ? $this->field['output_mode'] : 'color';
72
 
73
+ if ( ! empty( $elements ) && isset( $this->value ) && $this->value !== '' ) {
74
  foreach ( $elements as $key_property => $element ) {
75
  if ( is_numeric( $key_property ) ) {
76
  $output = implode( ',', $elements ) . '{' . $mode . ':' . $this->value . $important . ';}';
82
  }
83
 
84
  $this->parent->output_css .= $output;
85
+
86
  return $output;
87
+
88
  }
89
 
90
  }
admin/views/{wpcfree-metabox → sp-framework}/fields/color_group/color_group.php RENAMED
@@ -1,31 +1,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
  */
@@ -41,16 +54,12 @@ if ( ! class_exists( 'SP_WPCF_Field_color_group' ) ) {
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
  }
1
+ <?php
 
2
  /**
3
  *
4
  * Field: color_group
5
  *
6
  * @since 1.0.0
7
  * @version 1.0.0
8
+ * @package WP Carousel
9
+ * @subpackage wp-carousel-free/sp-framework
10
  */
11
+ if ( ! defined( 'ABSPATH' ) ) {
12
+ die; } // Cannot access directly.
13
+
14
  if ( ! class_exists( 'SP_WPCF_Field_color_group' ) ) {
 
15
 
16
+ /**
17
+ *
18
+ * Field: color_group
19
+ *
20
+ * @since 1.0.0
21
+ * @version 1.0.0
22
+ */
23
+ class SP_WPCF_Field_color_group extends SP_WPCF_Fields {
24
 
25
  /**
26
+ * Create fields.
27
  *
28
+ * @param mixed $field field.
29
+ * @param mixed $value value.
30
+ * @param mixed $unique unique id.
31
+ * @param mixed $where where to add.
32
+ * @param mixed $parent parent.
33
+ * @return void
34
  */
35
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
36
  parent::__construct( $field, $value, $unique, $where, $parent );
37
  }
38
 
39
+
40
  /**
41
+ * Render
42
  *
43
  * @return void
44
  */
54
  $color_value = ( ! empty( $this->value[ $key ] ) ) ? $this->value[ $key ] : '';
55
  $default_attr = ( ! empty( $this->field['default'][ $key ] ) ) ? ' data-default-color="' . esc_attr( $this->field['default'][ $key ] ) . '"' : '';
56
 
57
+ echo '<div class="wpcf--left wpcf-field-color">';
58
+ echo '<div class="wpcf--title">' . esc_html( $option ) . '</div>';
59
+ echo '<input type="text" name="' . esc_attr( $this->field_name( '[' . $key . ']' ) ) . '" value="' . esc_attr( $color_value ) . '" class="wpcf-color"' . $default_attr . $this->field_attributes() . '/>';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $this->field_attributes(), $default_attr is escaped before being passed in.
60
  echo '</div>';
 
61
  }
62
  }
 
 
 
63
  echo wp_kses_post( $this->field_after() );
64
 
65
  }
admin/views/{wpcfree-metabox → sp-framework}/fields/column/column.php RENAMED
@@ -1,12 +1,17 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access directly.
3
  /**
4
  *
5
  * Field: column
6
  *
7
  * @since 1.0.0
8
  * @version 1.0.0
 
 
9
  */
 
 
 
 
10
  if ( ! class_exists( 'SP_WPCF_Field_column' ) ) {
11
 
12
  /**
@@ -32,11 +37,6 @@ if ( ! class_exists( 'SP_WPCF_Field_column' ) ) {
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,18 +48,18 @@ if ( ! class_exists( 'SP_WPCF_Field_column' ) ) {
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,
60
  'tablet' => true,
61
  'mobile' => true,
62
- 'min' => '0',
63
  'unit' => false,
64
  'all' => false,
65
  'units' => array( 'px', '%', 'em' ),
@@ -81,17 +81,16 @@ if ( ! class_exists( 'SP_WPCF_Field_column' ) ) {
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 {
96
 
97
  $properties = array();
@@ -108,10 +107,10 @@ if ( ! class_exists( 'SP_WPCF_Field_column' ) ) {
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
  }
@@ -126,7 +125,8 @@ if ( ! class_exists( 'SP_WPCF_Field_column' ) ) {
126
  echo '</select>';
127
  }
128
 
129
- // echo '<div class="clear"></div>';
 
130
 
131
  echo wp_kses_post( $this->field_after() );
132
 
@@ -135,7 +135,7 @@ if ( ! class_exists( 'SP_WPCF_Field_column' ) ) {
135
  /**
136
  * The output function.
137
  *
138
- * @return statement
139
  */
140
  public function output() {
141
 
1
+ <?php
 
2
  /**
3
  *
4
  * Field: column
5
  *
6
  * @since 1.0.0
7
  * @version 1.0.0
8
+ * @package WP Carousel
9
+ * @subpackage wp-carousel-free/sp-framework
10
  */
11
+
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ die; } // Cannot access directly.
14
+
15
  if ( ! class_exists( 'SP_WPCF_Field_column' ) ) {
16
 
17
  /**
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' => esc_html__( 'Large Desktop', 'wp-carousel-free' ),
52
+ 'desktop_placeholder' => esc_html__( 'Desktop', 'wp-carousel-free' ),
53
+ 'laptop_placeholder' => esc_html__( 'Small Desktop', 'wp-carousel-free' ),
54
+ 'tablet_placeholder' => esc_html__( 'Tablet', 'wp-carousel-free' ),
55
+ 'mobile_placeholder' => esc_html__( 'Mobile', 'wp-carousel-free' ),
56
+ 'all_placeholder' => esc_html__( 'all', 'wp-carousel-free' ),
57
  'lg_desktop' => true,
58
  'desktop' => true,
59
  'laptop' => true,
60
  'tablet' => true,
61
  'mobile' => true,
62
+ 'min' => '1',
63
  'unit' => false,
64
  'all' => false,
65
  'units' => array( 'px', '%', 'em' ),
81
 
82
  echo wp_kses_post( $this->field_before() );
83
 
84
+ echo '<div class="wpcf--inputs" data-depend-id="' . esc_attr( $this->field['id'] ) . '">';
85
  $min = ( isset( $args['min'] ) ) ? ' min="' . esc_attr( $args['min'] ) . '"' : '';
86
  if ( ! empty( $args['all'] ) ) {
87
 
88
  $placeholder = ( ! empty( $args['all_placeholder'] ) ) ? ' placeholder="' . esc_attr( $args['all_placeholder'] ) . '"' : '';
89
+ echo '<div class="wpcf--input">';
90
+ echo ( ! empty( $args['all_text'] ) ) ? '<span class="wpcf--label wpcf--label-icon">' . wp_kses_post( $args['all_text'] ) . '</span>' : '';
91
+ echo '<input type="number" name="' . esc_attr( $this->field_name( '[all]' ) ) . '" value="' . esc_attr( $value['all'] ) . '"' . $placeholder . $min . ' class="wpcf-number" />'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $placeholder , $min is escaped before being passed in.
92
+ echo ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? '<span class="wpcf--label wpcf--unit">' . esc_attr( $args['units'][0] ) . '</span>' : '';
 
93
  echo '</div>';
 
94
  } else {
95
 
96
  $properties = array();
107
 
108
  $placeholder = ( ! empty( $args[ $property . '_placeholder' ] ) ) ? ' placeholder="' . esc_attr( $args[ $property . '_placeholder' ] ) . '"' : '';
109
 
110
+ echo '<div class="wpcf--input">';
111
+ echo ( ! empty( $args[ $property . '_icon' ] ) ) ? '<span class="wpcf--label wpcf--icon">' . wp_kses_post( $args[ $property . '_icon' ] ) . '</span>' : '';
112
+ echo '<input type="number" name="' . esc_attr( $this->field_name( '[' . $property . ']' ) ) . '" value="' . esc_attr( $value[ $property ] ) . '"' . $placeholder . $min . ' class="wpcf-number" />'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $placeholder , $min is escaped before being passed in.
113
+ echo ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? '<span class="wpcf--label wpcf--unit">' . esc_attr( $args['units'][0] ) . '</span>' : '';
114
  echo '</div>';
115
 
116
  }
125
  echo '</select>';
126
  }
127
 
128
+ echo '<div class="clear"></div>';
129
+ echo '</div>';
130
 
131
  echo wp_kses_post( $this->field_after() );
132
 
135
  /**
136
  * The output function.
137
  *
138
+ * @return CSS
139
  */
140
  public function output() {
141
 
admin/views/sp-framework/fields/content/content.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Field: content
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ * @package WP Carousel
9
+ * @subpackage wp-carousel-free/sp-framework
10
+ */
11
+
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ die; } // Cannot access directly.
14
+
15
+ if ( ! class_exists( 'SP_WPCF_Field_content' ) ) {
16
+
17
+ /**
18
+ *
19
+ * Field: content
20
+ *
21
+ * @since 1.0.0
22
+ * @version 1.0.0
23
+ * @package WP Carousel
24
+ * @subpackage wp-carousel-free/sp-framework
25
+ */
26
+ class SP_WPCF_Field_content extends SP_WPCF_Fields {
27
+
28
+ /**
29
+ * Content field constructor.
30
+ *
31
+ * @param array $field The field type.
32
+ * @param string $value The values of the field.
33
+ * @param string $unique The unique ID for the field.
34
+ * @param string $where To where show the output CSS.
35
+ * @param string $parent The parent args.
36
+ */
37
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
38
+ parent::__construct( $field, $value, $unique, $where, $parent );
39
+ }
40
+
41
+ /**
42
+ * Render
43
+ *
44
+ * @return void
45
+ */
46
+ public function render() {
47
+
48
+ if ( ! empty( $this->field['content'] ) ) {
49
+
50
+ echo wp_kses_post( $this->field['content'] );
51
+
52
+ }
53
+
54
+ }
55
+
56
+ }
57
+ }
admin/views/{wpcfree-metabox → sp-framework}/fields/custom_import/custom_import.php RENAMED
@@ -1,7 +1,19 @@
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
@@ -12,7 +24,7 @@ if ( ! class_exists( 'SP_WPCF_Field_custom_import' ) ) {
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.
@@ -23,18 +35,19 @@ if ( ! class_exists( 'SP_WPCF_Field_custom_import' ) ) {
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
  }
1
+ <?php
2
+ /**
3
+ *
4
+ * Field: Custom_import
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ * @package WP Carousel
9
+ * @subpackage wp-carousel-free/sp-framework
10
+ */
11
+
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
  die; } // Cannot access directly.
14
 
15
  if ( ! class_exists( 'SP_WPCF_Field_custom_import' ) ) {
16
+
17
  /**
18
  *
19
  * Field: Custom_import
24
  class SP_WPCF_Field_custom_import extends SP_WPCF_Fields {
25
 
26
  /**
27
+ * Custom import constructor.
28
  *
29
  * @param array $field The field type.
30
  * @param string $value The values of the field.
35
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
36
  parent::__construct( $field, $value, $unique, $where, $parent );
37
  }
38
+
39
  /**
40
+ * Render
41
  *
42
  * @return void
43
  */
44
  public function render() {
45
  echo wp_kses_post( $this->field_before() );
46
+ $wpcf_shortcodelink = admin_url( 'edit.php?post_type=sp_wp_carousel' );
47
  echo '<p><input type="file" id="import" accept=".json"></p>';
48
  echo '<p><button type="button" class="import">Import</button></p>';
49
+ echo '<a id="wpcf_shortcode_link_redirect" href="' . esc_url( $wpcf_shortcodelink ) . '"></a>';
50
  echo wp_kses_post( $this->field_after() );
51
  }
52
+ }
53
  }
admin/views/sp-framework/fields/gallery/gallery.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Field: gallery
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ * @package WP Carousel
9
+ * @subpackage wp-carousel-free/sp-framework
10
+ */
11
+
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ die; } // Cannot access directly.
14
+
15
+ if ( ! class_exists( 'SP_WPCF_Field_gallery' ) ) {
16
+ /**
17
+ *
18
+ * Field: gallery
19
+ *
20
+ * @since 1.0.0
21
+ * @version 1.0.0
22
+ */
23
+ class SP_WPCF_Field_gallery extends SP_WPCF_Fields {
24
+
25
+ /**
26
+ * Gallery field constructor.
27
+ *
28
+ * @param array $field The field type.
29
+ * @param string $value The values of the field.
30
+ * @param string $unique The unique ID for the field.
31
+ * @param string $where To where show the output CSS.
32
+ * @param string $parent The parent args.
33
+ */
34
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
35
+ parent::__construct( $field, $value, $unique, $where, $parent );
36
+ }
37
+
38
+
39
+ /**
40
+ * Render
41
+ *
42
+ * @return void
43
+ */
44
+ public function render() {
45
+
46
+ $args = wp_parse_args(
47
+ $this->field,
48
+ array(
49
+ 'add_title' => esc_html__( 'Add Gallery', 'wp-carousel-free' ),
50
+ 'edit_title' => esc_html__( 'Edit Gallery', 'wp-carousel-free' ),
51
+ 'clear_title' => esc_html__( 'Clear', 'wp-carousel-free' ),
52
+ )
53
+ );
54
+
55
+ $hidden = ( empty( $this->value ) ) ? ' hidden' : '';
56
+
57
+ echo wp_kses_post( $this->field_before() );
58
+ echo '<a href="#" class="button button-primary wpcf-button"><i class="fa fa-plus-circle"></i>' . esc_html( $args['add_title'] ) . '</a>';
59
+
60
+ echo '<ul class="sp-gallery-images">';
61
+ if ( ! empty( $this->value ) ) {
62
+
63
+ $values = explode( ',', $this->value );
64
+
65
+ foreach ( $values as $id ) {
66
+ $attachment = wp_get_attachment_image_src( $id, 'thumbnail' );
67
+ echo '<li><img src="' . esc_url( $attachment[0] ) . '" /></li>';
68
+ }
69
+ }
70
+ echo '</ul>';
71
+ echo '<ul> <li>';
72
+ echo '<a href="#" class="button wpcf-edit-gallery' . esc_attr( $hidden ) . '"><i class="fa fa-pencil-square-o"></i>' . esc_html( $args['edit_title'] ) . '</a>';
73
+ echo '</ul></li>';
74
+ echo '<ul> <li>';
75
+ echo '<a href="#" class="button wpcf-warning-primary wpcf-clear-gallery' . esc_attr( $hidden ) . '"><i class="fa fa-trash"></i>' . esc_html( $args['clear_title'] ). '</a>';
76
+ echo '</ul></li>';
77
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name() ) . '" value="' . esc_attr( $this->value ) . '"' . $this->field_attributes() . '/>';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $this->field_attributes() is escaped before being passed in.
78
+
79
+ echo wp_kses_post( $this->field_after() );
80
+
81
+ }
82
+
83
+ }
84
+ }
admin/views/{wpcfree-metabox → sp-framework}/fields/heading/heading.php RENAMED
@@ -1,17 +1,29 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access directly.
3
  /**
4
  *
5
  * Field: heading
6
  *
7
  * @since 1.0.0
8
  * @version 1.0.0
 
 
9
  */
 
 
 
 
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.
@@ -24,7 +36,7 @@ if ( ! class_exists( 'SP_WPCF_Field_heading' ) ) {
24
  }
25
 
26
  /**
27
- * Render field
28
  *
29
  * @return void
30
  */
1
+ <?php
 
2
  /**
3
  *
4
  * Field: heading
5
  *
6
  * @since 1.0.0
7
  * @version 1.0.0
8
+ * @package WP Carousel
9
+ * @subpackage wp-carousel-free/sp-framework
10
  */
11
+
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ die; } // Cannot access directly.
14
+
15
  if ( ! class_exists( 'SP_WPCF_Field_heading' ) ) {
16
+ /**
17
+ *
18
+ * Field: heading
19
+ *
20
+ * @since 1.0.0
21
+ * @version 1.0.0
22
+ */
23
  class SP_WPCF_Field_heading extends SP_WPCF_Fields {
24
 
25
  /**
26
+ * Heading field constructor.
27
  *
28
  * @param array $field The field type.
29
  * @param string $value The values of the field.
36
  }
37
 
38
  /**
39
+ * Render
40
  *
41
  * @return void
42
  */
admin/views/{wpcfree-metabox → sp-framework}/fields/image_select/image_select.php RENAMED
@@ -1,4 +1,15 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
 
 
 
 
 
 
 
 
 
 
 
2
  die; } // Cannot access directly.
3
  /**
4
  *
@@ -8,10 +19,18 @@
8
  * @version 1.0.0
9
  */
10
  if ( ! class_exists( 'SP_WPCF_Field_image_select' ) ) {
 
 
 
 
 
 
 
 
11
  class SP_WPCF_Field_image_select extends SP_WPCF_Fields {
12
 
13
  /**
14
- * Image select field constructor.
15
  *
16
  * @param array $field The field type.
17
  * @param string $value The values of the field.
@@ -23,8 +42,9 @@ if ( ! class_exists( 'SP_WPCF_Field_image_select' ) ) {
23
  parent::__construct( $field, $value, $unique, $where, $parent );
24
  }
25
 
 
26
  /**
27
- * Render field
28
  *
29
  * @return void
30
  */
@@ -34,17 +54,20 @@ if ( ! class_exists( 'SP_WPCF_Field_image_select' ) ) {
34
  $this->field,
35
  array(
36
  'multiple' => false,
 
37
  'options' => array(),
38
  )
39
  );
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
 
@@ -52,30 +75,34 @@ if ( ! class_exists( 'SP_WPCF_Field_image_select' ) ) {
52
 
53
  $type = ( $args['multiple'] ) ? 'checkbox' : 'radio';
54
  $extra = ( $args['multiple'] ) ? '[]' : '';
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
  }
 
65
  echo '</div>';
66
 
67
  }
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
 
@@ -84,7 +111,7 @@ if ( ! class_exists( 'SP_WPCF_Field_image_select' ) ) {
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
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Field: image_select
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ * @package WP Carousel
9
+ * @subpackage wp-carousel-free/sp-framework
10
+ */
11
+
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
  die; } // Cannot access directly.
14
  /**
15
  *
19
  * @version 1.0.0
20
  */
21
  if ( ! class_exists( 'SP_WPCF_Field_image_select' ) ) {
22
+
23
+ /**
24
+ *
25
+ * Field: image_select
26
+ *
27
+ * @since 1.0.0
28
+ * @version 1.0.0
29
+ */
30
  class SP_WPCF_Field_image_select extends SP_WPCF_Fields {
31
 
32
  /**
33
+ * Column field constructor.
34
  *
35
  * @param array $field The field type.
36
  * @param string $value The values of the field.
42
  parent::__construct( $field, $value, $unique, $where, $parent );
43
  }
44
 
45
+
46
  /**
47
+ * Render
48
  *
49
  * @return void
50
  */
54
  $this->field,
55
  array(
56
  'multiple' => false,
57
+ 'inline' => false,
58
  'options' => array(),
59
  )
60
  );
61
 
62
+ $inline = ( $args['inline'] ) ? ' wpcf--inline-list' : '';
63
+
64
  $value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
65
 
66
  echo wp_kses_post( $this->field_before() );
67
 
68
  if ( ! empty( $args['options'] ) ) {
69
 
70
+ echo '<div class="wpcf-siblings wpcf--image-group' . esc_attr( $inline ) . '" data-multiple="' . esc_attr( $args['multiple'] ) . '">';
71
 
72
  $num = 1;
73
 
75
 
76
  $type = ( $args['multiple'] ) ? 'checkbox' : 'radio';
77
  $extra = ( $args['multiple'] ) ? '[]' : '';
78
+ $active = ( in_array( $key, $value ) ) ? ' wpcf--active' : '';
79
  $checked = ( in_array( $key, $value ) ) ? ' checked' : '';
80
+ $image = isset( $option['image'] ) ? $option['image'] : $option;
81
+ $pro_only_class = isset( $option['pro_only'] ) ? ' wpcf-pro-only' : '';
82
+
83
+ echo '<div class="wpcf--sibling wpcf--image' . esc_attr( $active . $pro_only_class ) . '">';
84
+ echo '<figure>';
85
+ echo '<img src="' . esc_url( $image ) . '" alt="img-' . esc_attr( $num++ ) . '" />';
86
+ echo isset( $option['text'] ) ? '<p class="sp-carousel-type">' . esc_html( $option['text'] ) . '</p>' : '';
87
+
88
+ 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 -- $this->field_attributes() is escaped before being passed in.
89
+ echo '</figure>';
90
  echo '</div>';
91
 
92
  }
93
+
94
  echo '</div>';
95
 
96
  }
97
 
 
 
98
  echo wp_kses_post( $this->field_after() );
99
 
100
  }
101
 
102
  /**
103
+ * Output
104
  *
105
+ * @return CSS
106
  */
107
  public function output() {
108
 
111
  $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
112
  $elements = ( is_array( $this->field['output'] ) ) ? join( ',', $this->field['output'] ) : $this->field['output'];
113
 
114
+ if ( ! empty( $elements ) && isset( $this->value ) && $this->value !== '' ) {
115
  $output = $elements . '{background-image:url(' . $this->value . ')' . $important . ';}';
116
  }
117
 
admin/views/{wpcfree-metabox → sp-framework}/fields/image_sizes/image_sizes.php RENAMED
@@ -1,7 +1,19 @@
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.
@@ -12,7 +24,7 @@ if ( ! class_exists( 'SP_WPCF_Field_image_sizes' ) ) {
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.
@@ -25,7 +37,7 @@ if ( ! class_exists( 'SP_WPCF_Field_image_sizes' ) ) {
25
  }
26
 
27
  /**
28
- * Render field
29
  *
30
  * @return void
31
  */
@@ -73,16 +85,19 @@ if ( ! class_exists( 'SP_WPCF_Field_image_sizes' ) ) {
73
  )
74
  );
75
 
 
76
  if ( ! empty( $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'] ) ) {
@@ -96,12 +111,13 @@ if ( ! class_exists( 'SP_WPCF_Field_image_sizes' ) ) {
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 {
@@ -110,11 +126,12 @@ if ( ! class_exists( 'SP_WPCF_Field_image_sizes' ) ) {
110
  }
111
  }
112
  echo '<option disabled value="custom">Set custom size (Pro)</option>';
 
113
  echo '</select>';
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
  }
1
+ <?php
2
+ /**
3
+ *
4
+ * Field: Image sizes.
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ * @package WP Carousel
9
+ * @subpackage wp-carousel-free/sp-framework
10
+ */
11
+
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
  die; } // Cannot access directly.
14
 
15
  if ( ! class_exists( 'SP_WPCF_Field_image_sizes' ) ) {
16
+
17
  /**
18
  *
19
  * Field: Image sizes.
24
  class SP_WPCF_Field_image_sizes extends SP_WPCF_Fields {
25
 
26
  /**
27
+ * Image sizes field constructor.
28
  *
29
  * @param array $field The field type.
30
  * @param string $value The values of the field.
37
  }
38
 
39
  /**
40
+ * Render
41
  *
42
  * @return void
43
  */
85
  )
86
  );
87
 
88
+ // if ( ! empty( $this->field['options'] ) ) {
89
  if ( ! empty( $sizes ) ) {
90
+
91
+ // $options = ( is_array( $this->field['options'] ) ) ? $this->field['options'] : $this->field_data( $this->field['options'] );
92
  $multiple_name = ( $args['multiple'] ) ? '[]' : '';
93
  $multiple_attr = ( $args['multiple'] ) ? ' multiple="multiple"' : '';
94
  $chosen_rtl = ( is_rtl() ) ? ' chosen-rtl' : '';
95
+ $chosen_attr = ( $args['chosen'] ) ? ' class="wpcf-chosen' . esc_attr( $chosen_rtl ) . '"' : '';
96
+ $placeholder_attr = ( $args['chosen'] && $args['placeholder'] ) ? ' data-placeholder="' . esc_attr( $args['placeholder'] ) . '"' : '';
97
 
98
  if ( ! empty( $sizes ) ) {
99
+
100
+ echo '<select name="' . esc_attr( $this->field_name( $multiple_name ) ) . '"' . $multiple_attr . $chosen_attr . $placeholder_attr . $this->field_attributes() . '>';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $multiple_attr , $chosen_attr ,$placeholder_attr , $this->field_attributes() are escaped before being passed in.
101
 
102
  if ( $args['placeholder'] && empty( $args['multiple'] ) ) {
103
  if ( ! empty( $args['chosen'] ) ) {
111
 
112
  if ( is_array( $option ) && ! empty( $option ) ) {
113
 
114
+ echo '<optgroup label="' . esc_attr( $option_key ) . '">';
115
 
116
  foreach ( $option as $sub_key => $sub_value ) {
117
  $selected = ( in_array( $sub_key, $this->value ) ) ? ' selected' : '';
118
  echo '<option value="' . esc_attr( $sub_key ) . '" ' . esc_attr( $selected ) . '>' . esc_html( $sub_value ) . '</option>';
119
  }
120
+
121
  echo '</optgroup>';
122
 
123
  } else {
126
  }
127
  }
128
  echo '<option disabled value="custom">Set custom size (Pro)</option>';
129
+
130
  echo '</select>';
131
 
132
  } else {
133
 
134
+ echo ! empty( $this->field['empty_message'] ) ? wp_kses_post( $this->field['empty_message'] ) : esc_html__( 'No image sizes found.', 'wp-carousel-free' );
135
 
136
  }
137
  }
admin/views/{wpcfree-metabox → sp-framework/fields}/index.php RENAMED
File without changes
admin/views/{wpcfree-metabox → sp-framework}/fields/media/media.php RENAMED
@@ -1,4 +1,16 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
2
  die; } // Cannot access directly.
3
 
4
  if ( ! class_exists( 'SP_WPCF_Field_media' ) ) {
@@ -13,7 +25,7 @@ if ( ! class_exists( 'SP_WPCF_Field_media' ) ) {
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.
@@ -25,21 +37,25 @@ if ( ! class_exists( 'SP_WPCF_Field_media' ) ) {
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
 
@@ -54,14 +70,17 @@ if ( ! class_exists( 'SP_WPCF_Field_media' ) ) {
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'] );
@@ -69,29 +88,37 @@ if ( ! class_exists( 'SP_WPCF_Field_media' ) ) {
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
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Field: media
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ * @package WP Carousel
10
+ * @subpackage wp-carousel-free/sp-framework
11
+ */
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
  die; } // Cannot access directly.
15
 
16
  if ( ! class_exists( 'SP_WPCF_Field_media' ) ) {
25
  class SP_WPCF_Field_media extends SP_WPCF_Fields {
26
 
27
  /**
28
+ * Media field constructor.
29
  *
30
  * @param array $field The field type.
31
  * @param string $value The values of the field.
37
  parent::__construct( $field, $value, $unique, $where, $parent );
38
  }
39
 
40
+
41
  /**
42
+ * Render
43
  *
44
  * @return void
45
  */
46
  public function render() {
47
+
48
  $args = wp_parse_args(
49
  $this->field,
50
  array(
51
+ 'url' => true,
52
+ 'preview' => true,
53
+ 'preview_width' => '',
54
+ 'preview_height' => '',
55
+ 'library' => array(),
56
+ 'button_title' => esc_html__( 'Upload', 'wp-carousel-free' ),
57
+ 'remove_title' => esc_html__( 'Remove', 'wp-carousel-free' ),
58
+ 'preview_size' => 'thumbnail',
59
  )
60
  );
61
 
70
  'description' => '',
71
  );
72
 
73
+ // Fallback.
74
  if ( is_numeric( $this->value ) ) {
75
+
76
  $this->value = array(
77
  'id' => $this->value,
78
  'url' => wp_get_attachment_url( $this->value ),
79
  'thumbnail' => wp_get_attachment_image_src( $this->value, 'thumbnail', true )[0],
80
  );
81
+
82
  }
83
+
84
  $this->value = wp_parse_args( $this->value, $default_values );
85
 
86
  $library = ( is_array( $args['library'] ) ) ? $args['library'] : array_filter( (array) $args['library'] );
88
  $preview_src = ( 'thumbnail' !== $args['preview_size'] ) ? $this->value['url'] : $this->value['thumbnail'];
89
  $hidden_url = ( empty( $args['url'] ) ) ? ' hidden' : '';
90
  $hidden_auto = ( empty( $this->value['url'] ) ) ? ' hidden' : '';
91
+ $placeholder = ( empty( $this->field['placeholder'] ) ) ? ' placeholder="' . esc_html__( 'Not selected', 'wp-carousel-free' ) . '"' : '';
92
 
93
  echo wp_kses_post( $this->field_before() );
94
 
95
  if ( ! empty( $args['preview'] ) ) {
96
+
97
+ $preview_width = ( ! empty( $args['preview_width'] ) ) ? 'max-width:' . esc_attr( $args['preview_width'] ) . 'px;' : '';
98
+ $preview_height = ( ! empty( $args['preview_height'] ) ) ? 'max-height:' . esc_attr( $args['preview_height'] ) . 'px;' : '';
99
+ $preview_style = ( ! empty( $preview_width ) || ! empty( $preview_height ) ) ? ' style="' . esc_attr( $preview_width . $preview_height ) . '"' : '';
100
+
101
+ echo '<div class="wpcf--preview' . esc_attr( $hidden_auto ) . '">';
102
+ echo '<div class="wpcf-image-preview"' . $preview_style . '>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $preview_style is escaped before being passed in.
103
+ echo '<i href="#" class="wpcf--remove fa fa-times"></i><span><img src="' . esc_url( $preview_src ) . '" class="wpcf--src" /></span>';
104
  echo '</div>';
105
+ echo '</div>';
106
+
107
  }
108
 
109
+ echo '<div class="wpcf--placeholder">';
110
+ echo '<input type="text" name="' . esc_attr( $this->field_name( '[url]' ) ) . '" value="' . esc_attr( $this->value['url'] ) . '" class="wpcf--url' . esc_attr( $hidden_url ) . '" readonly="readonly"' . $this->field_attributes() . $placeholder . ' />'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $this->field_attributes(), $placeholder is escaped before being passed in.
111
+ echo '<a href="#" class="button button-primary wpcf--button" data-library="' . esc_attr( $library ) . '" data-preview-size="' . esc_attr( $args['preview_size'] ) . '">' . esc_html( $args['button_title'] ) . '</a>';
112
+ echo ( empty( $args['preview'] ) ) ? '<a href="#" class="button button-secondary wpcf-warning-primary wpcf--remove' . esc_attr( $hidden_auto ) . '">' . esc_html( $args['remove_title'] ) . '</a>' : '';
113
  echo '</div>';
114
 
115
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name( '[id]' ) ) . '" value="' . esc_attr( $this->value['id'] ) . '" class="wpcf--id"/>';
116
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name( '[width]' ) ) . '" value="' . esc_attr( $this->value['width'] ) . '" class="wpcf--width"/>';
117
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name( '[height]' ) ) . '" value="' . esc_attr( $this->value['height'] ) . '" class="wpcf--height"/>';
118
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name( '[thumbnail]' ) ) . '" value="' . esc_attr( $this->value['thumbnail'] ) . '" class="wpcf--thumbnail"/>';
119
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name( '[alt]' ) ) . '" value="' . esc_attr( $this->value['alt'] ) . '" class="wpcf--alt"/>';
120
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name( '[title]' ) ) . '" value="' . esc_attr( $this->value['title'] ) . '" class="wpcf--title"/>';
121
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name( '[description]' ) ) . '" value="' . esc_attr( $this->value['description'] ) . '" class="wpcf--description"/>';
122
 
123
  echo wp_kses_post( $this->field_after() );
124
 
admin/views/{wpcfree-metabox → sp-framework}/fields/notice/notice.php RENAMED
@@ -1,5 +1,4 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access directly.
3
  /**
4
  *
5
  * Field: notice
@@ -7,8 +6,20 @@
7
  * @since 1.0.0
8
  * @version 1.0.0
9
  */
 
 
 
 
10
  if ( ! class_exists( 'SP_WPCF_Field_notice' ) ) {
11
- class SP_WPCF_Field_notice extends SP_WPCF_Fields {
 
 
 
 
 
 
 
 
12
 
13
  /**
14
  * Notice field constructor.
@@ -24,15 +35,13 @@ if ( ! class_exists( 'SP_WPCF_Field_notice' ) ) {
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
 
1
+ <?php
 
2
  /**
3
  *
4
  * Field: notice
6
  * @since 1.0.0
7
  * @version 1.0.0
8
  */
9
+
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ die; } // Cannot access directly.
12
+
13
  if ( ! class_exists( 'SP_WPCF_Field_notice' ) ) {
14
+
15
+ /**
16
+ *
17
+ * Field: notice
18
+ *
19
+ * @since 1.0.0
20
+ * @version 1.0.0
21
+ */
22
+ class SP_WPCF_Field_notice extends SP_WPCF_Fields {
23
 
24
  /**
25
  * Notice field constructor.
35
  }
36
 
37
  /**
38
+ * Render
39
  *
40
  * @return void
41
  */
42
  public function render() {
 
43
  $style = ( ! empty( $this->field['style'] ) ) ? $this->field['style'] : 'normal';
44
+ echo ( ! empty( $this->field['content'] ) ) ? '<div class="wpcf-notice wpcf-notice-' . esc_attr( $style ) . '">' . wp_kses_post( $this->field['content'] ) . '</div>' : '';
 
45
 
46
  }
47
 
admin/views/sp-framework/fields/number/number.php ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Field: number
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ * @package WP Carousel
10
+ * @subpackage wp-carousel-free/sp-framework
11
+ */
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ die; } // Cannot access directly.
15
+
16
+ if ( ! class_exists( 'SP_WPCF_Field_number' ) ) {
17
+ /**
18
+ *
19
+ * Field: number
20
+ *
21
+ * @since 1.0.0
22
+ * @version 1.0.0
23
+ */
24
+ class SP_WPCF_Field_number extends SP_WPCF_Fields {
25
+
26
+ /**
27
+ * Create fields.
28
+ *
29
+ * @param mixed $field field.
30
+ * @param mixed $value value.
31
+ * @param mixed $unique unique id.
32
+ * @param mixed $where where to add.
33
+ * @param mixed $parent parent.
34
+ * @return void
35
+ */
36
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
37
+ parent::__construct( $field, $value, $unique, $where, $parent );
38
+ }
39
+
40
+
41
+ /**
42
+ * Render
43
+ *
44
+ * @return void
45
+ */
46
+ public function render() {
47
+
48
+ $args = wp_parse_args(
49
+ $this->field,
50
+ array(
51
+ 'unit' => '',
52
+ )
53
+ );
54
+
55
+ echo wp_kses_post( $this->field_before() );
56
+ echo '<div class="wpcf--wrap">';
57
+ echo '<input type="number" name="' . esc_attr( $this->field_name() ) . '" value="' . esc_attr( $this->value ) . '"' . $this->field_attributes( array( 'class' => 'wpcf-input-number' ) ) . ' step="any" />'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $this->field_attributes() is escaped before being passed in.
58
+ echo ( ! empty( $args['unit'] ) ) ? '<span class="wpcf--unit">' . esc_attr( $args['unit'] ) . '</span>' : '';
59
+ echo '</div>';
60
+ echo wp_kses_post( $this->field_after() );
61
+
62
+ }
63
+
64
+ /**
65
+ * Output
66
+ *
67
+ * @return CSS
68
+ */
69
+ public function output() {
70
+
71
+ $output = '';
72
+ $elements = ( is_array( $this->field['output'] ) ) ? $this->field['output'] : array_filter( (array) $this->field['output'] );
73
+ $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
74
+ $mode = ( ! empty( $this->field['output_mode'] ) ) ? $this->field['output_mode'] : 'width';
75
+ $unit = ( ! empty( $this->field['unit'] ) ) ? $this->field['unit'] : 'px';
76
+
77
+ if ( ! empty( $elements ) && isset( $this->value ) && $this->value !== '' ) {
78
+ foreach ( $elements as $key_property => $element ) {
79
+ if ( is_numeric( $key_property ) ) {
80
+ if ( $mode ) {
81
+ $output = implode( ',', $elements ) . '{' . $mode . ':' . $this->value . $unit . $important . ';}';
82
+ }
83
+ break;
84
+ } else {
85
+ $output .= $element . '{' . $key_property . ':' . $this->value . $unit . $important . '}';
86
+ }
87
+ }
88
+ }
89
+
90
+ $this->parent->output_css .= $output;
91
+
92
+ return $output;
93
+
94
+ }
95
+
96
+ }
97
+ }
admin/views/sp-framework/fields/radio/radio.php ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Field: radio
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ * @package WP Carousel
10
+ * @subpackage wp-carousel-free/sp-framework
11
+ */
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ die; } // Cannot access directly.
15
+
16
+ if ( ! class_exists( 'SP_WPCF_Field_radio' ) ) {
17
+
18
+ /**
19
+ *
20
+ * Field: radio
21
+ *
22
+ * @since 1.0.0
23
+ * @version 1.0.0
24
+ */
25
+ class SP_WPCF_Field_radio extends SP_WPCF_Fields {
26
+
27
+ /**
28
+ * Radio 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
+ /**
42
+ * Render
43
+ *
44
+ * @return void
45
+ */
46
+ public function render() {
47
+
48
+ $args = wp_parse_args(
49
+ $this->field,
50
+ array(
51
+ 'inline' => false,
52
+ 'query_args' => array(),
53
+ )
54
+ );
55
+
56
+ $inline_class = ( $args['inline'] ) ? ' class="wpcf--inline-list"' : '';
57
+
58
+ echo wp_kses_post( $this->field_before() );
59
+
60
+ if ( isset( $this->field['options'] ) ) {
61
+
62
+ $options = $this->field['options'];
63
+ $options = ( is_array( $options ) ) ? $options : '';
64
+
65
+ if ( is_array( $options ) && ! empty( $options ) ) {
66
+
67
+ echo '<ul' . $inline_class . '>';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $inline_class is escaped before being passed in.
68
+
69
+ foreach ( $options as $option_key => $option_value ) {
70
+
71
+ if ( is_array( $option_value ) && ! empty( $option_value ) ) {
72
+
73
+ echo '<li>';
74
+ echo '<ul>';
75
+ echo '<li><strong>' . esc_attr( $option_key ) . '</strong></li>';
76
+ foreach ( $option_value as $sub_key => $sub_value ) {
77
+ $checked = ( $sub_key == $this->value ) ? ' checked' : '';
78
+ echo '<li>';
79
+ echo '<label>';
80
+ echo '<input type="radio" name="' . esc_attr( $this->field_name() ) . '" value="' . esc_attr( $sub_key ) . '"' . $this->field_attributes() . esc_attr( $checked ) . '/>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $this->field_attributes() is escaped before being passed in.
81
+ echo '<span class="wpcf--text">' . esc_attr( $sub_value ) . '</span>';
82
+ echo '</label>';
83
+ echo '</li>';
84
+ }
85
+ echo '</ul>';
86
+ echo '</li>';
87
+
88
+ } else {
89
+
90
+ $checked = ( $option_key == $this->value ) ? ' checked' : '';
91
+
92
+ echo '<li>';
93
+ echo '<label>';
94
+ echo '<input type="radio" name="' . esc_attr( $this->field_name() ) . '" value="' . esc_attr( $option_key ) . '"' . $this->field_attributes() . esc_attr( $checked ) . '/>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $this->field_attributes() is escaped before being passed in.
95
+ echo '<span class="wpcf--text">' . esc_attr( $option_value ) . '</span>';
96
+ echo '</label>';
97
+ echo '</li>';
98
+
99
+ }
100
+ }
101
+
102
+ echo '</ul>';
103
+
104
+ } else {
105
+
106
+ echo ! empty( $this->field['empty_message'] ) ? esc_attr( $this->field['empty_message'] ) : esc_html__( 'No data available.', 'wp-carousel-free' );
107
+
108
+ }
109
+ } else {
110
+
111
+ $label = ( isset( $this->field['label'] ) ) ? $this->field['label'] : '';
112
+ echo '<label><input type="radio" name="' . esc_attr( $this->field_name() ) . '" value="1"' . $this->field_attributes() . esc_attr( checked( $this->value, 1, false ) ) . '/>';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $this->field_attributes() is escaped before being passed in.
113
+ echo ( ! empty( $this->field['label'] ) ) ? '<span class="wpcf--text">' . esc_attr( $this->field['label'] ) . '</span>' : '';
114
+ echo '</label>';
115
+
116
+ }
117
+
118
+ echo wp_kses_post( $this->field_after() );
119
+
120
+ }
121
+
122
+ }
123
+ }
admin/views/sp-framework/fields/select/select.php ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Field: select
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ * @package WP Carousel
10
+ * @subpackage wp-carousel-free/sp-framework
11
+ */
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ die; } // Cannot access directly.
15
+
16
+ if ( ! class_exists( 'SP_WPCF_Field_select' ) ) {
17
+ /**
18
+ *
19
+ * Field: select
20
+ *
21
+ * @since 1.0.0
22
+ * @version 1.0.0
23
+ */
24
+ class SP_WPCF_Field_select extends SP_WPCF_Fields {
25
+
26
+ /**
27
+ * Select 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
41
+ *
42
+ * @return void
43
+ */
44
+ public function render() {
45
+
46
+ $args = wp_parse_args(
47
+ $this->field,
48
+ array(
49
+ 'placeholder' => '',
50
+ 'chosen' => false,
51
+ 'multiple' => false,
52
+ 'sortable' => false,
53
+ 'ajax' => false,
54
+ 'settings' => array(),
55
+ 'query_args' => array(),
56
+ )
57
+ );
58
+
59
+ $this->value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
60
+
61
+ echo wp_kses_post( $this->field_before() );
62
+
63
+ if ( isset( $this->field['options'] ) ) {
64
+
65
+ if ( ! empty( $args['ajax'] ) ) {
66
+ $args['settings']['data']['type'] = $args['options'];
67
+ $args['settings']['data']['nonce'] = wp_create_nonce( 'wpcf_chosen_ajax_nonce' );
68
+ if ( ! empty( $args['query_args'] ) ) {
69
+ $args['settings']['data']['query_args'] = $args['query_args'];
70
+ }
71
+ }
72
+
73
+ $chosen_rtl = ( is_rtl() ) ? ' chosen-rtl' : '';
74
+ $multiple_name = ( $args['multiple'] ) ? '[]' : '';
75
+ $multiple_attr = ( $args['multiple'] ) ? ' multiple="multiple"' : '';
76
+ $chosen_sortable = ( $args['chosen'] && $args['sortable'] ) ? ' wpcf-chosen-sortable' : '';
77
+ $chosen_ajax = ( $args['chosen'] && $args['ajax'] ) ? ' wpcf-chosen-ajax' : '';
78
+ $placeholder_attr = ( $args['chosen'] && $args['placeholder'] ) ? ' data-placeholder="' . esc_attr( $args['placeholder'] ) . '"' : '';
79
+ $field_class = ( $args['chosen'] ) ? ' class="wpcf-chosen' . esc_attr( $chosen_rtl . $chosen_sortable . $chosen_ajax ) . '"' : '';
80
+ $field_name = $this->field_name( $multiple_name );
81
+ $field_attr = $this->field_attributes();
82
+ $maybe_options = $this->field['options'];
83
+ $chosen_data_attr = ( $args['chosen'] && ! empty( $args['settings'] ) ) ? ' data-chosen-settings="' . esc_attr( json_encode( $args['settings'] ) ) . '"' : '';
84
+
85
+ if ( is_string( $maybe_options ) && ! empty( $args['chosen'] ) && ! empty( $args['ajax'] ) ) {
86
+ $options = $this->field_wp_query_data_title( $maybe_options, $this->value );
87
+ } elseif ( is_string( $maybe_options ) ) {
88
+ $options = $this->field_data( $maybe_options, false, $args['query_args'] );
89
+ } else {
90
+ $options = $maybe_options;
91
+ }
92
+
93
+ if ( ( is_array( $options ) && ! empty( $options ) ) || ( ! empty( $args['chosen'] ) && ! empty( $args['ajax'] ) ) ) {
94
+
95
+ if ( ! empty( $args['chosen'] ) && ! empty( $args['multiple'] ) ) {
96
+
97
+ echo '<select name="' . esc_attr( $field_name ) . '" class="wpcf-hide-select hidden"' . $multiple_attr . $field_attr . '>';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $multiple_attr , $field_attr are escaped before being passed in
98
+ foreach ( $this->value as $option_key ) {
99
+ echo '<option value="' . esc_attr( $option_key ) . '" selected>' . esc_attr( $option_key ) . '</option>';
100
+ }
101
+ echo '</select>';
102
+
103
+ $field_name = '_pseudo';
104
+ $field_attr = '';
105
+
106
+ }
107
+
108
+ // These attributes has been serialized above.
109
+ echo '<select name="' . esc_attr( $field_name ) . '"' . $field_class . $multiple_attr . $placeholder_attr . $field_attr . $chosen_data_attr . '>';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $field_class , $multiple_attr , $placeholder_attr , $field_attr , $chosen_data_attr are escaped before being passed in
110
+
111
+ if ( $args['placeholder'] && empty( $args['multiple'] ) ) {
112
+ if ( ! empty( $args['chosen'] ) ) {
113
+ echo '<option value=""></option>';
114
+ } else {
115
+ echo '<option value="">' . esc_attr( $args['placeholder'] ) . '</option>';
116
+ }
117
+ }
118
+
119
+ foreach ( $options as $option_key => $option ) {
120
+
121
+ // if ( is_array( $option ) && ! empty( $option ) ) {
122
+
123
+ // echo '<optgroup label="' . esc_attr( $option_key ) . '">';
124
+
125
+ // foreach ( $option as $sub_key => $sub_value ) {
126
+ // $selected = ( in_array( $sub_key, $this->value ) ) ? ' selected' : '';
127
+ // echo '<option value="' . esc_attr( $sub_key ) . '" ' . esc_attr( $selected ) . '>' . esc_attr( $sub_value ) . '</option>';
128
+ // }
129
+
130
+ // echo '</optgroup>';
131
+
132
+ // } else {
133
+ $pro_only_value = isset( $option['pro_only'] ) ? $option['pro_only'] : '';
134
+ $pro_only = $pro_only_value ? ' disabled' : '';
135
+
136
+ $option_text = isset( $option['text'] ) ? $option['text'] : $option;
137
+
138
+ $selected = ( in_array( $option_key, $this->value ) ) ? ' selected' : '';
139
+ echo '<option' . esc_attr( $pro_only ) . ' value="' . esc_attr( $option_key ) . '" ' . esc_attr( $selected ) . '>' . esc_attr( $option_text ) . '</option>';
140
+ // }
141
+ }
142
+
143
+ echo '</select>';
144
+
145
+ } else {
146
+
147
+ echo ! empty( $this->field['empty_message'] ) ? esc_attr( $this->field['empty_message'] ) : esc_html__( 'No data available.', 'wp-carousel-free' );
148
+
149
+ }
150
+ }
151
+
152
+ echo wp_kses_post( $this->field_after() );
153
+
154
+ }
155
+
156
+ /**
157
+ * Enqueue
158
+ *
159
+ * @return void
160
+ */
161
+ public function enqueue() {
162
+
163
+ if ( ! wp_script_is( 'jquery-ui-sortable' ) ) {
164
+ wp_enqueue_script( 'jquery-ui-sortable' );
165
+ }
166
+
167
+ }
168
+
169
+ }
170
+ }
admin/views/sp-framework/fields/shortcode/shortcode.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Field: shortcode
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ * @package WP Carousel
9
+ * @subpackage wp-carousel-free/sp-framework
10
+ */
11
+
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ die; } // Cannot access directly.
14
+
15
+ if ( ! class_exists( 'SP_WPCF_Field_shortcode' ) ) {
16
+
17
+ /**
18
+ *
19
+ * Field: shortcode
20
+ *
21
+ * @since 1.0.0
22
+ * @version 1.0.0
23
+ */
24
+ class SP_WPCF_Field_shortcode extends SP_WPCF_Fields {
25
+
26
+
27
+
28
+ /**
29
+ * Render
30
+ *
31
+ * @return void
32
+ */
33
+ public function render() {
34
+
35
+ // Get the Post ID.
36
+ $post_id = get_the_ID();
37
+
38
+ echo ( ! empty( $post_id ) ) ? '<div class="wpcf-scode-wrap"><span class="wpcf-sc-title">Shortcode:</span><span class="wpcf-shortcode-selectable">[sp_wpcarousel id="' . esc_attr( $post_id ) . '"]</span></div><div class="wpcf-scode-wrap"><span class="wpcf-sc-title">Template Include:</span><span class="wpcf-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>' : '';
39
+ }
40
+
41
+ }
42
+ }
admin/views/{wpcfree-metabox → sp-framework}/fields/spacing/spacing.php RENAMED
@@ -1,23 +1,38 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access directly.
3
  /**
4
  *
5
  * Field: spacing
6
  *
7
  * @since 1.0.0
8
  * @version 1.0.0
 
 
 
9
  */
 
 
 
 
10
  if ( ! class_exists( 'SP_WPCF_Field_spacing' ) ) {
 
 
 
 
 
 
 
 
11
  class SP_WPCF_Field_spacing extends SP_WPCF_Fields {
12
 
13
  /**
14
- * Spacing 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 );
@@ -25,7 +40,7 @@ if ( ! class_exists( 'SP_WPCF_Field_spacing' ) ) {
25
 
26
 
27
  /**
28
- * Render field
29
  *
30
  * @return void
31
  */
@@ -49,7 +64,7 @@ if ( ! class_exists( 'SP_WPCF_Field_spacing' ) ) {
49
  'bottom' => true,
50
  'right' => true,
51
  'unit' => true,
52
- 'min' => '0',
53
  'all' => false,
54
  'units' => array( 'px', '%', 'em' ),
55
  )
@@ -62,22 +77,24 @@ if ( ! class_exists( 'SP_WPCF_Field_spacing' ) ) {
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'] ) ) {
74
 
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 {
@@ -96,34 +113,36 @@ if ( ! class_exists( 'SP_WPCF_Field_spacing' ) ) {
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
 
@@ -133,23 +152,45 @@ if ( ! class_exists( 'SP_WPCF_Field_spacing' ) ) {
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 . ';';
143
- $output .= $mode . 'right:' . $this->value['all'] . $unit . $important . ';';
144
- $output .= $mode . 'bottom:' . $this->value['all'] . $unit . $important . ';';
145
- $output .= $mode . 'left:' . $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 . '}';
1
+ <?php
 
2
  /**
3
  *
4
  * Field: spacing
5
  *
6
  * @since 1.0.0
7
  * @version 1.0.0
8
+ *
9
+ * @package WP Carousel
10
+ * @subpackage wp-carousel-free/sp-framework
11
  */
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ die; } // Cannot access directly.
15
+
16
  if ( ! class_exists( 'SP_WPCF_Field_spacing' ) ) {
17
+
18
+ /**
19
+ *
20
+ * Field: spacing
21
+ *
22
+ * @since 1.0.0
23
+ * @version 1.0.0
24
+ */
25
  class SP_WPCF_Field_spacing extends SP_WPCF_Fields {
26
 
27
  /**
28
+ * Create fields.
29
  *
30
+ * @param mixed $field field.
31
+ * @param mixed $value value.
32
+ * @param mixed $unique unique id.
33
+ * @param mixed $where where to add.
34
+ * @param mixed $parent parent.
35
+ * @return void
36
  */
37
  public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
38
  parent::__construct( $field, $value, $unique, $where, $parent );
40
 
41
 
42
  /**
43
+ * Render
44
  *
45
  * @return void
46
  */
64
  'bottom' => true,
65
  'right' => true,
66
  'unit' => true,
67
+ 'show_units' => true,
68
  'all' => false,
69
  'units' => array( 'px', '%', 'em' ),
70
  )
77
  'left' => '',
78
  'all' => '',
79
  'unit' => 'px',
 
80
  );
81
 
82
+ $value = wp_parse_args( $this->value, $default_values );
83
+ $unit = ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? $args['units'][0] : '';
84
+ $is_unit = ( ! empty( $unit ) ) ? ' wpcf--is-unit' : '';
85
 
86
  echo wp_kses_post( $this->field_before() );
87
 
88
+ echo '<div class="wpcf--inputs" data-depend-id="' . esc_attr( $this->field['id'] ) . '">';
89
+
90
  if ( ! empty( $args['all'] ) ) {
91
 
92
+ $placeholder = ( ! empty( $args['all_placeholder'] ) ) ? ' placeholder="' . esc_attr( $args['all_placeholder'] ) . '"' : '';
93
 
94
+ echo '<div class="wpcf--input">';
95
+ echo ( ! empty( $args['all_text'] ) ) ? '<span class="wpcf--label wpcf--icon">' . wp_kses_post( $args['all_text'] ) . '</span>' : '';
96
+ echo '<input type="number" name="' . esc_attr( $this->field_name( '[all]' ) ) . '" value="' . esc_attr( $value['all'] ) . '"' . $placeholder . ' class="wpcf-input-number' . esc_attr( $is_unit ) . '" step="any" />';
97
+ echo ( $unit ) ? '<span class="wpcf--label wpcf--unit">' . esc_attr( $args['units'][0] ) . '</span>' : '';
98
  echo '</div>';
99
 
100
  } else {
113
 
114
  $placeholder = ( ! empty( $args[ $property . '_placeholder' ] ) ) ? ' placeholder="' . esc_attr( $args[ $property . '_placeholder' ] ) . '"' : '';
115
 
116
+ echo '<div class="wpcf--input">';
117
+ echo ( ! empty( $args[ $property . '_icon' ] ) ) ? '<span class="wpcf--label wpcf--icon">' . wp_kses_post( $args[ $property . '_icon' ] ) . '</span>' : '';
118
+ echo '<input type="number" name="' . esc_attr( $this->field_name( '[' . $property . ']' ) ) . '" value="' . esc_attr( $value[ $property ] ) . '"' . $placeholder . ' class="wpcf-input-number' . esc_attr( $is_unit ) . '" step="any" />';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $placeholder is escaped before being passed in
119
+ echo ( $unit ) ? '<span class="wpcf--label wpcf--unit">' . esc_attr( $args['units'][0] ) . '</span>' : '';
120
  echo '</div>';
121
 
122
  }
123
  }
124
 
125
+ if ( ! empty( $args['unit'] ) && ! empty( $args['show_units'] ) && count( $args['units'] ) > 1 ) {
126
+ echo '<div class="wpcf--input">';
127
  echo '<select name="' . esc_attr( $this->field_name( '[unit]' ) ) . '">';
128
  foreach ( $args['units'] as $unit ) {
129
  $selected = ( $value['unit'] === $unit ) ? ' selected' : '';
130
+ echo '<option value="' . esc_attr( $unit ) . '"' . esc_attr( $selected ) . '>' . esc_attr( $unit ) . '</option>';
131
  }
132
  echo '</select>';
133
+ echo '</div>';
134
  }
135
 
136
+ echo '</div>';
137
 
138
  echo wp_kses_post( $this->field_after() );
139
 
140
  }
141
 
142
  /**
143
+ * Output
144
  *
145
+ * @return CSS
146
  */
147
  public function output() {
148
 
152
  $unit = ( ! empty( $this->value['unit'] ) ) ? $this->value['unit'] : 'px';
153
 
154
  $mode = ( ! empty( $this->field['output_mode'] ) ) ? $this->field['output_mode'] : 'padding';
155
+
156
+ if ( 'border-radius' === $mode || 'radius' === $mode ) {
157
+
158
+ $top = 'border-top-left-radius';
159
+ $right = 'border-top-right-radius';
160
+ $bottom = 'border-bottom-right-radius';
161
+ $left = 'border-bottom-left-radius';
162
+
163
+ } elseif ( 'relative' === $mode || 'absolute' === $mode || 'none' === $mode ) {
164
+
165
+ $top = 'top';
166
+ $right = 'right';
167
+ $bottom = 'bottom';
168
+ $left = 'left';
169
+
170
+ } else {
171
+
172
+ $top = $mode . '-top';
173
+ $right = $mode . '-right';
174
+ $bottom = $mode . '-bottom';
175
+ $left = $mode . '-left';
176
+
177
+ }
178
 
179
  if ( ! empty( $this->field['all'] ) && isset( $this->value['all'] ) && '' !== $this->value['all'] ) {
180
 
181
  $output = $element . '{';
182
+ $output .= $top . ':' . $this->value['all'] . $unit . $important . ';';
183
+ $output .= $right . ':' . $this->value['all'] . $unit . $important . ';';
184
+ $output .= $bottom . ':' . $this->value['all'] . $unit . $important . ';';
185
+ $output .= $left . ':' . $this->value['all'] . $unit . $important . ';';
186
  $output .= '}';
187
 
188
  } else {
189
+
190
+ $top = ( isset( $this->value['top'] ) && '' !== $this->value['top'] ) ? $top . ':' . $this->value['top'] . $unit . $important . ';' : '';
191
+ $right = ( isset( $this->value['right'] ) && '' !== $this->value['right'] ) ? $right . ':' . $this->value['right'] . $unit . $important . ';' : '';
192
+ $bottom = ( isset( $this->value['bottom'] ) && '' !== $this->value['bottom'] ) ? $bottom . ':' . $this->value['bottom'] . $unit . $important . ';' : '';
193
+ $left = ( isset( $this->value['left'] ) && '' !== $this->value['left'] ) ? $left . ':' . $this->value['left'] . $unit . $important . ';' : '';
194
 
195
  if ( '' !== $top || '' !== $right || '' !== $bottom || '' !== $left ) {
196
  $output = $element . '{' . $top . $right . $bottom . $left . '}';
admin/views/{wpcfree-metabox → sp-framework}/fields/spinner/spinner.php RENAMED
@@ -1,7 +1,18 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
 
 
 
 
 
 
 
 
 
 
2
  die; } // Cannot access directly.
3
 
4
  if ( ! class_exists( 'SP_WPCF_Field_spinner' ) ) {
 
5
  /**
6
  *
7
  * Field: spinner
@@ -24,8 +35,9 @@ if ( ! class_exists( 'SP_WPCF_Field_spinner' ) ) {
24
  parent::__construct( $field, $value, $unique, $where, $parent );
25
  }
26
 
 
27
  /**
28
- * Render field
29
  *
30
  * @return void
31
  */
@@ -42,17 +54,15 @@ if ( ! class_exists( 'SP_WPCF_Field_spinner' ) ) {
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
  */
@@ -65,9 +75,9 @@ if ( ! class_exists( 'SP_WPCF_Field_spinner' ) ) {
65
  }
66
 
67
  /**
68
- * Field output
69
  *
70
- * @return statement
71
  */
72
  public function output() {
73
 
@@ -77,7 +87,7 @@ if ( ! class_exists( 'SP_WPCF_Field_spinner' ) ) {
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 ) {
1
+ <?php
2
+ /**
3
+ *
4
+ * Field: spinner
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ * @package WP Carousel
9
+ * @subpackage wp-carousel-free/sp-framework
10
+ */
11
+ if ( ! defined( 'ABSPATH' ) ) {
12
  die; } // Cannot access directly.
13
 
14
  if ( ! class_exists( 'SP_WPCF_Field_spinner' ) ) {
15
+
16
  /**
17
  *
18
  * Field: spinner
35
  parent::__construct( $field, $value, $unique, $where, $parent );
36
  }
37
 
38
+
39
  /**
40
+ * Render
41
  *
42
  * @return void
43
  */
54
  );
55
 
56
  echo wp_kses_post( $this->field_before() );
57
+
58
+ echo '<div class="wpcf--spin"><input type="number" name="' . esc_attr( $this->field_name() ) . '" value="' . esc_attr( $this->value ) . '"' . $this->field_attributes( array( 'class' => 'wpcf-input-number' ) ) . ' data-min="' . esc_attr( $args['min'] ) . '" data-max="' . esc_attr( $args['max'] ) . '" data-step="' . esc_attr( $args['step'] ) . '" data-unit="' . esc_attr( $args['unit'] ) . '" step="any" /></div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $this->field_attributes() is escaped before being passed in
59
+
 
 
60
  echo wp_kses_post( $this->field_after() );
61
 
62
  }
63
 
64
  /**
65
+ * Enqueue
66
  *
67
  * @return void
68
  */
75
  }
76
 
77
  /**
78
+ * Output
79
  *
80
+ * @return CSS
81
  */
82
  public function output() {
83
 
87
  $mode = ( ! empty( $this->field['output_mode'] ) ) ? $this->field['output_mode'] : 'width';
88
  $unit = ( ! empty( $this->field['unit'] ) ) ? $this->field['unit'] : 'px';
89
 
90
+ if ( ! empty( $elements ) && isset( $this->value ) && '' !== $this->value ) {
91
  foreach ( $elements as $key_property => $element ) {
92
  if ( is_numeric( $key_property ) ) {
93
  if ( $mode ) {
admin/views/{wpcfree-metabox → sp-framework}/fields/subheading/subheading.php RENAMED
@@ -1,18 +1,31 @@
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.
@@ -24,13 +37,16 @@ if ( ! class_exists( 'SP_WPCF_Field_subheading' ) ) {
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
  }
1
+ <?php
 
2
  /**
3
  *
4
  * Field: subheading
5
  *
6
  * @since 1.0.0
7
  * @version 1.0.0
8
+ *
9
+ * @package WP Carousel
10
+ * @subpackage wp-carousel-free/sp-framework
11
  */
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ die; } // Cannot access directly.
15
+
16
  if ( ! class_exists( 'SP_WPCF_Field_subheading' ) ) {
 
17
 
18
+ /**
19
+ *
20
+ * Field: subheading
21
+ *
22
+ * @since 1.0.0
23
+ * @version 1.0.0
24
+ */
25
+ class SP_WPCF_Field_subheading extends SP_WPCF_Fields {
26
 
27
  /**
28
+ * The field constructor.
29
  *
30
  * @param array $field The field type.
31
  * @param string $value The values of the field.
37
  parent::__construct( $field, $value, $unique, $where, $parent );
38
  }
39
 
40
+
41
  /**
42
+ * Render
43
  *
44
  * @return void
45
  */
46
  public function render() {
47
+
48
  echo ( ! empty( $this->field['content'] ) ) ? wp_kses_post( $this->field['content'] ) : '';
49
+
50
  }
51
 
52
  }
admin/views/sp-framework/fields/switcher/switcher.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Field: switcher
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ * @package WP Carousel
9
+ * @subpackage wp-carousel-free/sp-framework
10
+ */
11
+ if ( ! defined( 'ABSPATH' ) ) {
12
+ die; } // Cannot access directly.
13
+
14
+ if ( ! class_exists( 'SP_WPCF_Field_switcher' ) ) {
15
+ /**
16
+ *
17
+ * Field: switcher
18
+ *
19
+ * @since 1.0.0
20
+ * @version 1.0.0
21
+ */
22
+ class SP_WPCF_Field_switcher extends SP_WPCF_Fields {
23
+
24
+ /**
25
+ * The field constructor.
26
+ *
27
+ * @param array $field The field type.
28
+ * @param string $value The values of the field.
29
+ * @param string $unique The unique ID for the field.
30
+ * @param string $where To where show the output CSS.
31
+ * @param string $parent The parent args.
32
+ */
33
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
34
+ parent::__construct( $field, $value, $unique, $where, $parent );
35
+ }
36
+
37
+
38
+ /**
39
+ * Render
40
+ *
41
+ * @return void
42
+ */
43
+ public function render() {
44
+
45
+ $active = ( ! empty( $this->value ) ) ? ' wpcf--active' : '';
46
+ $text_on = ( ! empty( $this->field['text_on'] ) ) ? $this->field['text_on'] : esc_html__( 'On', 'wp-carousel-free' );
47
+ $text_off = ( ! empty( $this->field['text_off'] ) ) ? $this->field['text_off'] : esc_html__( 'Off', 'wp-carousel-free' );
48
+ $text_width = ( ! empty( $this->field['text_width'] ) ) ? ' style="width: ' . esc_attr( $this->field['text_width'] ) . 'px;"' : '';
49
+
50
+ echo wp_kses_post( $this->field_before() );
51
+
52
+ echo '<div class="wpcf--switcher' . esc_attr( $active ) . '"' . $text_width . '>';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $text_width is escaped before being passed in.
53
+ echo '<span class="wpcf--on">' . esc_attr( $text_on ) . '</span>';
54
+ echo '<span class="wpcf--off">' . esc_attr( $text_off ) . '</span>';
55
+ echo '<span class="wpcf--ball"></span>';
56
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name() ) . '" value="' . esc_attr( $this->value ) . '"' . $this->field_attributes() . ' />';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $this->field_attributes() is escaped before being passed in.
57
+ echo '</div>';
58
+
59
+ echo ( ! empty( $this->field['label'] ) ) ? '<span class="wpcf--label">' . esc_attr( $this->field['label'] ) . '</span>' : '';
60
+
61
+ echo wp_kses_post( $this->field_after() );
62
+
63
+ }
64
+
65
+ }
66
+ }
admin/views/{wpcfree-metabox → sp-framework}/fields/text/text.php RENAMED
@@ -1,8 +1,19 @@
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
@@ -13,7 +24,7 @@ if ( ! class_exists( 'SP_WPCF_Field_text' ) ) {
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.
@@ -25,8 +36,9 @@ if ( ! class_exists( 'SP_WPCF_Field_text' ) ) {
25
  parent::__construct( $field, $value, $unique, $where, $parent );
26
  }
27
 
 
28
  /**
29
- * Render field
30
  *
31
  * @return void
32
  */
@@ -36,7 +48,7 @@ if ( ! class_exists( 'SP_WPCF_Field_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
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Field: text
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ * @package WP Carousel
10
+ * @subpackage wp-carousel-free/sp-framework
11
+ */
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
  die; } // Cannot access directly.
15
 
16
  if ( ! class_exists( 'SP_WPCF_Field_text' ) ) {
 
17
  /**
18
  *
19
  * Field: text
24
  class SP_WPCF_Field_text extends SP_WPCF_Fields {
25
 
26
  /**
27
+ * The field constructor.
28
  *
29
  * @param array $field The field type.
30
  * @param string $value The values of the field.
36
  parent::__construct( $field, $value, $unique, $where, $parent );
37
  }
38
 
39
+
40
  /**
41
+ * Render
42
  *
43
  * @return void
44
  */
48
 
49
  echo wp_kses_post( $this->field_before() );
50
 
51
+ 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 -- $this->field_attributes() is escaped before being passed in.
52
 
53
  echo wp_kses_post( $this->field_after() );
54
 
admin/views/sp-framework/fields/textarea/textarea.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Field: textarea
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ * @package WP Carousel
10
+ * @subpackage wp-carousel-free/sp-framework
11
+ */
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ die; } // Cannot access directly.
15
+
16
+ if ( ! class_exists( 'SP_WPCF_Field_textarea' ) ) {
17
+
18
+ /**
19
+ *
20
+ * Field: textarea
21
+ *
22
+ * @since 1.0.0
23
+ * @version 1.0.0
24
+ */
25
+ class SP_WPCF_Field_textarea extends SP_WPCF_Fields {
26
+
27
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
28
+ parent::__construct( $field, $value, $unique, $where, $parent );
29
+ }
30
+
31
+
32
+ /**
33
+ * Render
34
+ *
35
+ * @return void
36
+ */
37
+ public function render() {
38
+
39
+ echo wp_kses_post( $this->field_before() );
40
+ echo $this->shortcoder(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $this->shortcoder() is escaped before being passed in.
41
+ echo '<textarea name="' . esc_attr( $this->field_name() ) . '"' . $this->field_attributes() . '>' . $this->value . '</textarea>';// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $this->field_attributes() is escaped before being passed in.
42
+ echo wp_kses_post( $this->field_after() );
43
+
44
+ }
45
+
46
+ /**
47
+ * Short coder
48
+ *
49
+ * @return void
50
+ */
51
+ public function shortcoder() {
52
+
53
+ if ( ! empty( $this->field['shortcoder'] ) ) {
54
+
55
+ $instances = ( is_array( $this->field['shortcoder'] ) ) ? $this->field['shortcoder'] : array_filter( (array) $this->field['shortcoder'] );
56
+
57
+ foreach ( $instances as $instance_key ) {
58
+
59
+ if ( isset( SP_WPCF::$shortcode_instances[ $instance_key ] ) ) {
60
+
61
+ $button_title = SP_WPCF::$shortcode_instances[ $instance_key ]['button_title'];
62
+
63
+ echo '<a href="#" class="button button-primary wpcf-shortcode-button" data-modal-id="' . esc_attr( $instance_key ) . '">' . wp_kses_post( $button_title ) . '</a>';
64
+
65
+ }
66
+ }
67
+ }
68
+
69
+ }
70
+ }
71
+ }
admin/views/sp-framework/fields/typography/typography.php ADDED
@@ -0,0 +1,639 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Field: typography
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ * @package WP Carousel
9
+ * @subpackage wp-carousel-free/sp-framework
10
+ */
11
+
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ die; } // Cannot access directly.
14
+
15
+ if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
16
+
17
+ /**
18
+ *
19
+ * Field: typography
20
+ *
21
+ * @since 1.0.0
22
+ * @version 1.0.0
23
+ */
24
+ class SP_WPCF_Field_typography extends SP_WPCF_Fields {
25
+
26
+ /**
27
+ * Chosen
28
+ *
29
+ * @var bool
30
+ */
31
+ public $chosen = false;
32
+
33
+ /**
34
+ * Value
35
+ *
36
+ * @var array
37
+ */
38
+ public $value = array();
39
+
40
+ /**
41
+ * Create fields.
42
+ *
43
+ * @param mixed $field field.
44
+ * @param mixed $value value.
45
+ * @param mixed $unique unique id.
46
+ * @param mixed $where where to add.
47
+ * @param mixed $parent parent.
48
+ * @return void
49
+ */
50
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
51
+ parent::__construct( $field, $value, $unique, $where, $parent );
52
+ }
53
+
54
+
55
+ /**
56
+ * Render
57
+ *
58
+ * @return void
59
+ */
60
+ public function render() {
61
+
62
+ echo wp_kses_post( $this->field_before() );
63
+
64
+ $args = wp_parse_args(
65
+ $this->field,
66
+ array(
67
+ 'font_family' => true,
68
+ 'font_weight' => true,
69
+ 'font_style' => true,
70
+ 'font_size' => true,
71
+ 'line_height' => true,
72
+ 'letter_spacing' => true,
73
+ 'text_align' => true,
74
+ 'text_transform' => true,
75
+ 'color' => true,
76
+ 'hover_color' => false,
77
+ 'chosen' => true,
78
+ 'preview' => true,
79
+ 'subset' => false,
80
+ 'multi_subset' => false,
81
+ 'extra_styles' => false,
82
+ 'backup_font_family' => false,
83
+ 'font_variant' => false,
84
+ 'word_spacing' => false,
85
+ 'text_decoration' => false,
86
+ 'custom_style' => false,
87
+ 'compact' => false,
88
+ 'exclude' => '',
89
+ 'unit' => 'px',
90
+ 'line_height_unit' => '',
91
+ 'preview_text' => 'The quick brown fox jumps over the lazy dog',
92
+ )
93
+ );
94
+
95
+ if ( $args['compact'] ) {
96
+ $args['text_transform'] = false;
97
+ $args['text_align'] = false;
98
+ $args['font_size'] = false;
99
+ $args['line_height'] = false;
100
+ $args['letter_spacing'] = false;
101
+ $args['preview'] = false;
102
+ $args['color'] = false;
103
+ }
104
+
105
+ $default_value = array(
106
+ 'font-family' => '',
107
+ 'font-weight' => '',
108
+ 'font-style' => '',
109
+ 'font-variant' => '',
110
+ 'font-size' => '',
111
+ 'line-height' => '',
112
+ 'letter-spacing' => '',
113
+ 'word-spacing' => '',
114
+ 'text-align' => '',
115
+ 'text-transform' => '',
116
+ 'text-decoration' => '',
117
+ 'backup-font-family' => '',
118
+ 'color' => '',
119
+ 'hover_color' => '',
120
+ 'custom-style' => '',
121
+ 'type' => '',
122
+ 'subset' => '',
123
+ 'extra-styles' => array(),
124
+ );
125
+
126
+ $default_value = ( ! empty( $this->field['default'] ) ) ? wp_parse_args( $this->field['default'], $default_value ) : $default_value;
127
+ $this->value = wp_parse_args( $this->value, $default_value );
128
+ $this->chosen = $args['chosen'];
129
+ $chosen_class = ( $this->chosen ) ? ' wpcf--chosen' : '';
130
+ $line_height_unit = ( ! empty( $args['line_height_unit'] ) ) ? $args['line_height_unit'] : $args['unit'];
131
+
132
+ echo '<div class="wpcf--typography' . esc_attr( $chosen_class ) . '" data-depend-id="' . esc_attr( $this->field['id'] ) . '" data-unit="' . esc_attr( $args['unit'] ) . '" data-line-height-unit="' . esc_attr( $line_height_unit ) . '" data-exclude="' . esc_attr( $args['exclude'] ) . '">';
133
+
134
+ echo '<div class="wpcf--blocks wpcf--blocks-selects">';
135
+
136
+ //
137
+ // Font Family.
138
+ if ( ! empty( $args['font_family'] ) ) {
139
+ echo '<div class="wpcf--block">';
140
+ echo '<div class="wpcf--title">' . esc_html__( 'Font Family', 'wp-carousel-free' ) . '</div>';
141
+ echo '<select disabled name="sp_wpcp_shortcode_options[wpcp_section_title_typography][font-family]" class="wpcf--font-family" data-placeholder="Select a font" style="display: none;">
142
+ <option>Open Sans</option>
143
+ </select>';
144
+ echo '</div>';
145
+ }
146
+
147
+ //
148
+ // Backup Font Family
149
+ if ( ! empty( $args['backup_font_family'] ) ) {
150
+ echo '<div class="wpcf--block wpcf--block-backup-font-family hidden">';
151
+ echo '<div class="wpcf--title">' . esc_html__( 'Backup Font Family', 'wp-carousel-free' ) . '</div>';
152
+ echo $this->create_select( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $this->create_select() is escaped before being passed in.
153
+ apply_filters(
154
+ 'wpcf_field_typography_backup_font_family',
155
+ array(
156
+ 'Arial, Helvetica, sans-serif',
157
+ "'Arial Black', Gadget, sans-serif",
158
+ "'Comic Sans MS', cursive, sans-serif",
159
+ 'Impact, Charcoal, sans-serif',
160
+ "'Lucida Sans Unicode', 'Lucida Grande', sans-serif",
161
+ 'Tahoma, Geneva, sans-serif',
162
+ "'Trebuchet MS', Helvetica, sans-serif'",
163
+ 'Verdana, Geneva, sans-serif',
164
+ "'Courier New', Courier, monospace",
165
+ "'Lucida Console', Monaco, monospace",
166
+ 'Georgia, serif',
167
+ 'Palatino Linotype',
168
+ )
169
+ ),
170
+ 'backup-font-family',
171
+ esc_html__( 'Default', 'wp-carousel-free' )
172
+ );
173
+ echo '</div>';
174
+ }
175
+
176
+ //
177
+ // Font Style and Extra Style Select.
178
+ if ( ! empty( $args['font_weight'] ) || ! empty( $args['font_style'] ) ) {
179
+
180
+ //
181
+ // Font Style Select.
182
+ echo '<div class="wpcf--block wpcf--block-font-style hidden">';
183
+ echo '<div class="wpcf--title">' . esc_html__( 'Font Style', 'wp-carousel-free' ) . '</div>';
184
+ echo '<select disabled class="wpcf--font-style-select" data-placeholder="Default">';
185
+ echo '<option disabled value="">' . esc_html( ! $this->chosen ? __( 'Default', 'wp-carousel-free' ) : '' ) . '</option>';
186
+ if ( ! empty( $this->value['font-weight'] ) || ! empty( $this->value['font-style'] ) ) {
187
+ echo '<option disabled value="' . esc_attr( strtolower( $this->value['font-weight'] . $this->value['font-style'] ) ) . '" selected></option>';
188
+ }
189
+ echo '</select>';
190
+ echo '<input disabled type="hidden" name="' . esc_attr( $this->field_name( '[font-weight]' ) ) . '" class="wpcf--font-weight" value="' . esc_attr( $this->value['font-weight'] ) . '" />';
191
+ echo '<input disabled type="hidden" name="' . esc_attr( $this->field_name( '[font-style]' ) ) . '" class="wpcf--font-style" value="' . esc_attr( $this->value['font-style'] ) . '" />';
192
+
193
+ //
194
+ // Extra Font Style Select.
195
+ if ( ! empty( $args['extra_styles'] ) ) {
196
+ echo '<div class="wpcf--block-extra-styles hidden">';
197
+ echo ( ! $this->chosen ) ? '<div class="wpcf--title">' . esc_html__( 'Load Extra Styles', 'wp-carousel-free' ) . '</div>' : '';
198
+ $placeholder = ( $this->chosen ) ? esc_html__( 'Load Extra Styles', 'wp-carousel-free' ) : esc_html__( 'Default', 'wp-carousel-free' );
199
+ echo $this->create_select( $this->value['extra-styles'], 'extra-styles', $placeholder, true ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $this->create_select() is escaped before being passed in.
200
+ echo '</div>';
201
+ }
202
+
203
+ echo '</div>';
204
+
205
+ }
206
+
207
+ //
208
+ // Subset.
209
+ if ( ! empty( $args['subset'] ) ) {
210
+ echo '<div class="wpcf--block wpcf--block-subset hidden">';
211
+ echo '<div class="wpcf--title">' . esc_html__( 'Subset', 'wp-carousel-free' ) . '</div>';
212
+ $subset = ( is_array( $this->value['subset'] ) ) ? $this->value['subset'] : array_filter( (array) $this->value['subset'] );
213
+ echo '<select disabled name="sp_wpcp_shortcode_options[wpcp_section_title_typography][subset]" class="wpcf--subset" data-placeholder="Default" style="display: none;"><option value="default"></option></select>';
214
+ echo '</div>';
215
+ }
216
+
217
+ //
218
+ // Text Align.
219
+ if ( ! empty( $args['text_align'] ) ) {
220
+ echo '<div class="wpcf--block">';
221
+ echo '<div class="wpcf--title">' . esc_html__( 'Text Align', 'wp-carousel-free' ) . '</div>';
222
+ echo '<select disabled name="sp_wpcp_shortcode_options[wpcp_section_title_typography][text-align]" class="wpcf--text-align" data-placeholder="Center" style="display: none;"><option value="">Center</option></select>';
223
+ echo '</div>';
224
+ }
225
+
226
+ //
227
+ // Font Variant.
228
+ if ( ! empty( $args['font_variant'] ) ) {
229
+ echo '<div class="wpcf--block">';
230
+ echo '<div class="wpcf--title">' . esc_html__( 'Font Variant', 'wp-carousel-free' ) . '</div>';
231
+ echo $this->create_select( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $this->create_select() is escaped before being passed in.
232
+ array(
233
+ 'normal' => esc_html__( 'Normal', 'wp-carousel-free' ),
234
+ 'small-caps' => esc_html__( 'Small Caps', 'wp-carousel-free' ),
235
+ 'all-small-caps' => esc_html__( 'All Small Caps', 'wp-carousel-free' ),
236
+ ),
237
+ 'font-variant',
238
+ esc_html__( 'Default', 'wp-carousel-free' )
239
+ );
240
+ echo '</div>';
241
+ }
242
+
243
+ //
244
+ // Text Transform.
245
+ if ( ! empty( $args['text_transform'] ) ) {
246
+ echo '<div class="wpcf--block">';
247
+ echo '<div class="wpcf--title">' . esc_html__( 'Text Transform', 'wp-carousel-free' ) . '</div>';
248
+ echo '<select disabled name="sp_wpcp_shortcode_options[wpcp_title_typography][text-align]" class="wpcf--text-align" data-placeholder="Default" style="display: none;"><option value="none">None</option></select>';
249
+ echo '</div>';
250
+ }
251
+
252
+ //
253
+ // Text Decoration.
254
+ if ( ! empty( $args['text_decoration'] ) ) {
255
+ echo '<div class="wpcf--block">';
256
+ echo '<div class="wpcf--title">' . esc_html__( 'Text Decoration', 'wp-carousel-free' ) . '</div>';
257
+ echo $this->create_select( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $this->create_select() is escaped before being passed in.
258
+ array(
259
+ 'none' => esc_html__( 'None', 'wp-carousel-free' ),
260
+ 'underline' => esc_html__( 'Solid', 'wp-carousel-free' ),
261
+ 'underline double' => esc_html__( 'Double', 'wp-carousel-free' ),
262
+ 'underline dotted' => esc_html__( 'Dotted', 'wp-carousel-free' ),
263
+ 'underline dashed' => esc_html__( 'Dashed', 'wp-carousel-free' ),
264
+ 'underline wavy' => esc_html__( 'Wavy', 'wp-carousel-free' ),
265
+ 'underline overline' => esc_html__( 'Overline', 'wp-carousel-free' ),
266
+ 'line-through' => esc_html__( 'Line-through', 'wp-carousel-free' ),
267
+ ),
268
+ 'text-decoration',
269
+ esc_html__( 'Default', 'wp-carousel-free' )
270
+ );
271
+ echo '</div>';
272
+ }
273
+
274
+ echo '</div>';
275
+
276
+ echo '<div class="wpcf--blocks wpcf--blocks-inputs">';
277
+
278
+ //
279
+ // Font Size.
280
+ if ( ! empty( $args['font_size'] ) ) {
281
+ echo '<div class="wpcf--block">';
282
+ echo '<div class="wpcf--title">' . esc_html__( 'Font Size', 'wp-carousel-free' ) . '</div>';
283
+ echo '<div class="wpcf--input-wrap">';
284
+ echo '<input disabled type="text" name="' . esc_attr( $this->field_name( '[font-size]' ) ) . '" class="wpcf--font-size wpcf--input wpcf-number" value="' . esc_attr( $this->value['font-size'] ) . '" />';
285
+ echo '<span class="wpcf--unit">' . esc_attr( $args['unit'] ) . '</span>';
286
+ echo '</div>';
287
+ echo '</div>';
288
+ }
289
+
290
+ //
291
+ // Line Height.
292
+ if ( ! empty( $args['line_height'] ) ) {
293
+ echo '<div class="wpcf--block">';
294
+ echo '<div class="wpcf--title">' . esc_html__( 'Line Height', 'wp-carousel-free' ) . '</div>';
295
+ echo '<div class="wpcf--input-wrap">';
296
+ echo '<input type="number" name="' . esc_attr( $this->field_name( '[line-height]' ) ) . '" disabled class="wpcf--line-height wpcf--input wpcf-input-number" value="' . esc_attr( $this->value['line-height'] ) . '" step="any" />';
297
+ echo '<span class="wpcf--unit">' . esc_attr( $line_height_unit ) . '</span>';
298
+ echo '</div>';
299
+ echo '</div>';
300
+ }
301
+
302
+ //
303
+ // Letter Spacing.
304
+ if ( ! empty( $args['letter_spacing'] ) ) {
305
+ echo '<div class="wpcf--block">';
306
+ echo '<div class="wpcf--title">' . esc_html__( 'Letter Spacing', 'wp-carousel-free' ) . '</div>';
307
+ echo '<div class="wpcf--input-wrap">';
308
+ echo '<input type="number" name="' . esc_attr( $this->field_name( '[letter-spacing]' ) ) . '" class="wpcf--letter-spacing wpcf--input wpcf-input-number" disabled value="' . esc_attr( $this->value['letter-spacing'] ) . '" step="any" />';
309
+ echo '<span class="wpcf--unit">' . esc_attr( $args['unit'] ) . '</span>';
310
+ echo '</div>';
311
+ echo '</div>';
312
+ }
313
+
314
+ //
315
+ // Word Spacing.
316
+ if ( ! empty( $args['word_spacing'] ) ) {
317
+ echo '<div class="wpcf--block">';
318
+ echo '<div class="wpcf--title">' . esc_html__( 'Word Spacing', 'wp-carousel-free' ) . '</div>';
319
+ echo '<div class="wpcf--input-wrap">';
320
+ echo '<input type="number" name="' . esc_attr( $this->field_name( '[word-spacing]' ) ) . '" class="wpcf--word-spacing wpcf--input wpcf-input-number" disabled value="' . esc_attr( $this->value['word-spacing'] ) . '" step="any" />';
321
+ echo '<span class="wpcf--unit">' . esc_attr( $args['unit'] ) . '</span>';
322
+ echo '</div>';
323
+ echo '</div>';
324
+ }
325
+
326
+ echo '</div>';
327
+
328
+ //
329
+ // Font Color.
330
+ if ( ! empty( $args['color'] ) ) {
331
+ $default_color_attr = ( ! empty( $default_value['color'] ) ) ? ' data-default-color="' . esc_attr( $default_value['color'] ) . '"' : '';
332
+ echo '<div class="wpcf--block wpcf--block-font-color">';
333
+ echo '<div class="wpcf--title">' . esc_html__( 'Font Color', 'wp-carousel-free' ) . '</div>';
334
+ echo '<div class="wpcf-field-color">';
335
+ echo '<input type="text" name="' . esc_attr( $this->field_name( '[color]' ) ) . '" class="wpcf-color wpcf--color" value="' . esc_attr( $this->value['color'] ) . '"' . $default_color_attr . ' />';
336
+ echo '</div>';
337
+ echo '</div>';
338
+ }
339
+ if ( ! empty( $args['hover_color'] ) ) {
340
+ $default_color_attr = ( ! empty( $default_value['hover_color'] ) ) ? ' data-default-color="' . esc_attr( $default_value['hover_color'] ) . '"' : '';
341
+ echo '<div class="wpcf--block wpcf--block-font-color">';
342
+ echo '<div class="wpcf--title">' . esc_html__( 'Font Hover Color', 'wp-carousel-free' ) . '</div>';
343
+ echo '<div class="wpcf-field-color">';
344
+ echo '<input type="text" name="' . esc_attr( $this->field_name( '[hover_color]' ) ) . '" class="wpcf-color wpcf--color" value="' . esc_attr( $this->value['hover_color'] ) . '"' . $default_color_attr . ' />'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $this->create_select() is escaped before being passed in.
345
+ echo '</div>';
346
+ echo '</div>';
347
+ }
348
+ //
349
+ // Custom style.
350
+ if ( ! empty( $args['custom_style'] ) ) {
351
+ echo '<div class="wpcf--block wpcf--block-custom-style">';
352
+ echo '<div class="wpcf--title">' . esc_html__( 'Custom Style', 'wp-carousel-free' ) . '</div>';
353
+ echo '<textarea name="' . esc_attr( $this->field_name( '[custom-style]' ) ) . '" class="wpcf--custom-style">' . esc_attr( $this->value['custom-style'] ) . '</textarea>';
354
+ echo '</div>';
355
+ }
356
+
357
+ //
358
+ // Preview.
359
+ $always_preview = ( 'always' !== $args['preview'] ) ? ' hidden' : '';
360
+
361
+ if ( ! empty( $args['preview'] ) ) {
362
+ echo '<div class="wpcf--block wpcf--block-preview' . esc_attr( $always_preview ) . '">';
363
+ echo '<div class="wpcf--toggle fa fa-toggle-off"></div>';
364
+ echo '<div class="wpcf--preview">' . esc_attr( $args['preview_text'] ) . '</div>';
365
+ echo '</div>';
366
+ }
367
+
368
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name( '[type]' ) ) . '" class="wpcf--type" value="' . esc_attr( $this->value['type'] ) . '" />';
369
+ echo '<input type="hidden" name="' . esc_attr( $this->field_name( '[unit]' ) ) . '" class="wpcf--unit-save" value="' . esc_attr( $args['unit'] ) . '" />';
370
+
371
+ echo '</div>';
372
+
373
+ echo wp_kses_post( $this->field_after() );
374
+
375
+ }
376
+
377
+ /**
378
+ * Create_select
379
+ *
380
+ * @param array $options options.
381
+ * @param string $name name.
382
+ * @param string $placeholder placeholder.
383
+ * @param bool $is_multiple is multiple.
384
+ * @return statement
385
+ */
386
+ public function create_select( $options, $name, $placeholder = '', $is_multiple = false ) {
387
+
388
+ $multiple_name = ( $is_multiple ) ? '[]' : '';
389
+ $multiple_attr = ( $is_multiple ) ? ' multiple data-multiple="true"' : '';
390
+ $chosen_rtl = ( $this->chosen && is_rtl() ) ? ' chosen-rtl' : '';
391
+
392
+ $output = '<select name="' . esc_attr( $this->field_name( '[' . $name . ']' . $multiple_name ) ) . '" class="wpcf--' . esc_attr( $name ) . esc_attr( $chosen_rtl ) . '" data-placeholder="' . esc_attr( $placeholder ) . '"' . $multiple_attr . '>';
393
+ $output .= ( ! empty( $placeholder ) ) ? '<option value="">' . esc_attr( ( ! $this->chosen ) ? $placeholder : '' ) . '</option>' : '';
394
+
395
+ if ( ! empty( $options ) ) {
396
+ foreach ( $options as $option_key => $option_value ) {
397
+ if ( $is_multiple ) {
398
+ $selected = ( in_array( $option_value, $this->value[ $name ] ) ) ? ' selected' : '';
399
+ $output .= '<option value="' . esc_attr( $option_value ) . '"' . esc_attr( $selected ) . '>' . esc_attr( $option_value ) . '</option>';
400
+ } else {
401
+ $option_key = ( is_numeric( $option_key ) ) ? $option_value : $option_key;
402
+ $selected = ( $option_key === $this->value[ $name ] ) ? ' selected' : '';
403
+ $output .= '<option value="' . esc_attr( $option_key ) . '"' . esc_attr( $selected ) . '>' . esc_attr( $option_value ) . '</option>';
404
+ }
405
+ }
406
+ }
407
+
408
+ $output .= '</select>';
409
+
410
+ return $output;
411
+
412
+ }
413
+
414
+ /**
415
+ * Enqueue
416
+ *
417
+ * @return void
418
+ */
419
+ public function enqueue() {
420
+
421
+ if ( ! wp_script_is( 'wpcf-webfontloader' ) ) {
422
+
423
+ SP_WPCF::include_plugin_file( 'fields/typography/google-fonts.php' );
424
+
425
+ wp_enqueue_script( 'wpcf-webfontloader', 'https://cdn.jsdelivr.net/npm/webfontloader@1.6.28/webfontloader.min.js', array( 'wpcf' ), '1.6.28', true );
426
+
427
+ $webfonts = array();
428
+
429
+ $customwebfonts = apply_filters( 'wpcf_field_typography_customwebfonts', array() );
430
+
431
+ if ( ! empty( $customwebfonts ) ) {
432
+ $webfonts['custom'] = array(
433
+ 'label' => esc_html__( 'Custom Web Fonts', 'wp-carousel-free' ),
434
+ 'fonts' => $customwebfonts,
435
+ );
436
+ }
437
+
438
+ $webfonts['safe'] = array(
439
+ 'label' => esc_html__( 'Safe Web Fonts', 'wp-carousel-free' ),
440
+ 'fonts' => apply_filters(
441
+ 'wpcf_field_typography_safewebfonts',
442
+ array(
443
+ 'Arial',
444
+ 'Arial Black',
445
+ 'Helvetica',
446
+ 'Times New Roman',
447
+ 'Courier New',
448
+ 'Tahoma',
449
+ 'Verdana',
450
+ 'Impact',
451
+ 'Trebuchet MS',
452
+ 'Comic Sans MS',
453
+ 'Lucida Console',
454
+ 'Lucida Sans Unicode',
455
+ 'Georgia, serif',
456
+ 'Palatino Linotype',
457
+ )
458
+ ),
459
+ );
460
+
461
+ $webfonts['google'] = array(
462
+ 'label' => esc_html__( 'Google Web Fonts', 'wp-carousel-free' ),
463
+ 'fonts' => apply_filters(
464
+ 'wpcf_field_typography_googlewebfonts',
465
+ ''
466
+ ),
467
+ );
468
+
469
+ $defaultstyles = apply_filters( 'wpcf_field_typography_defaultstyles', array( 'normal', 'italic', '700', '700italic' ) );
470
+
471
+ $googlestyles = apply_filters(
472
+ 'wpcf_field_typography_googlestyles',
473
+ array(
474
+ '100' => 'Thin 100',
475
+ '100italic' => 'Thin 100 Italic',
476
+ '200' => 'Extra-Light 200',
477
+ '200italic' => 'Extra-Light 200 Italic',
478
+ '300' => 'Light 300',
479
+ '300italic' => 'Light 300 Italic',
480
+ 'normal' => 'Normal 400',
481
+ 'italic' => 'Normal 400 Italic',
482
+ '500' => 'Medium 500',
483
+ '500italic' => 'Medium 500 Italic',
484
+ '600' => 'Semi-Bold 600',
485
+ '600italic' => 'Semi-Bold 600 Italic',
486
+ '700' => 'Bold 700',
487
+ '700italic' => 'Bold 700 Italic',
488
+ '800' => 'Extra-Bold 800',
489
+ '800italic' => 'Extra-Bold 800 Italic',
490
+ '900' => 'Black 900',
491
+ '900italic' => 'Black 900 Italic',
492
+ )
493
+ );
494
+
495
+ $webfonts = apply_filters( 'wpcf_field_typography_webfonts', $webfonts );
496
+
497
+ wp_localize_script(
498
+ 'wpcf',
499
+ 'wpcf_typography_json',
500
+ array(
501
+ 'webfonts' => $webfonts,
502
+ 'defaultstyles' => $defaultstyles,
503
+ 'googlestyles' => $googlestyles,
504
+ )
505
+ );
506
+
507
+ }
508
+
509
+ }
510
+
511
+ /**
512
+ * Enqueue_google_fonts
513
+ *
514
+ * @param string $method enqueue.
515
+ * @return bool
516
+ */
517
+ // public function enqueue_google_fonts( $method = 'enqueue' ) {
518
+
519
+ // $is_google = false;
520
+
521
+ // if ( ! empty( $this->value['type'] ) ) {
522
+ // $is_google = ( 'google' === $this->value['type'] ) ? true : false;
523
+ // } else {
524
+ // SP_WPCF::include_plugin_file( 'fields/typography/google-fonts.php' );
525
+ // $is_google = false;
526
+ // }
527
+
528
+ // if ( $is_google ) {
529
+
530
+ // set style
531
+ // $font_family = ( ! empty( $this->value['font-family'] ) ) ? $this->value['font-family'] : '';
532
+ // $font_weight = ( ! empty( $this->value['font-weight'] ) ) ? $this->value['font-weight'] : '';
533
+ // $font_style = ( ! empty( $this->value['font-style'] ) ) ? $this->value['font-style'] : '';
534
+
535
+ // if ( $font_weight || $font_style ) {
536
+ // $style = $font_weight . $font_style;
537
+ // if ( ! empty( $style ) ) {
538
+ // $style = ( 'normal' === $style ) ? '400' : $style;
539
+ // SP_WPCF::$webfonts[ $method ][ $font_family ][ $style ] = $style;
540
+ // }
541
+ // } else {
542
+ // SP_WPCF::$webfonts[ $method ][ $font_family ] = array();
543
+ // }
544
+
545
+ // set extra styles.
546
+ // if ( ! empty( $this->value['extra-styles'] ) ) {
547
+ // foreach ( $this->value['extra-styles'] as $extra_style ) {
548
+ // if ( ! empty( $extra_style ) ) {
549
+ // $extra_style = ( 'normal' === $extra_style ) ? '400' : $extra_style;
550
+ // SP_WPCF::$webfonts[ $method ][ $font_family ][ $extra_style ] = $extra_style;
551
+ // }
552
+ // }
553
+ // }
554
+
555
+ // set subsets.
556
+ // if ( ! empty( $this->value['subset'] ) ) {
557
+ // $this->value['subset'] = ( is_array( $this->value['subset'] ) ) ? $this->value['subset'] : array_filter( (array) $this->value['subset'] );
558
+ // foreach ( $this->value['subset'] as $subset ) {
559
+ // if ( ! empty( $subset ) ) {
560
+ // SP_WPCF::$subsets[ $subset ] = $subset;
561
+ // }
562
+ // }
563
+ // }
564
+
565
+ // return true;
566
+
567
+ // }
568
+
569
+ // return false;
570
+
571
+ // }
572
+
573
+ /**
574
+ * Output
575
+ *
576
+ * @return CSS
577
+ */
578
+ public function output() {
579
+
580
+ $output = '';
581
+ $bg_image = array();
582
+ $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
583
+ $element = ( is_array( $this->field['output'] ) ) ? join( ',', $this->field['output'] ) : $this->field['output'];
584
+
585
+ $font_family = ( ! empty( $this->value['font-family'] ) ) ? $this->value['font-family'] : '';
586
+ $backup_family = ( ! empty( $this->value['backup-font-family'] ) ) ? ', ' . $this->value['backup-font-family'] : '';
587
+
588
+ if ( $font_family ) {
589
+ $output .= 'font-family:"' . $font_family . '"' . $backup_family . $important . ';';
590
+ }
591
+
592
+ // Common font properties.
593
+ $properties = array(
594
+ 'color',
595
+ 'font-weight',
596
+ 'font-style',
597
+ 'font-variant',
598
+ 'text-align',
599
+ 'text-transform',
600
+ 'text-decoration',
601
+ );
602
+
603
+ foreach ( $properties as $property ) {
604
+ if ( isset( $this->value[ $property ] ) && $this->value[ $property ] !== '' ) {
605
+ $output .= $property . ':' . $this->value[ $property ] . $important . ';';
606
+ }
607
+ }
608
+
609
+ $properties = array(
610
+ 'font-size',
611
+ 'line-height',
612
+ 'letter-spacing',
613
+ 'word-spacing',
614
+ );
615
+
616
+ $unit = ( ! empty( $this->value['unit'] ) ) ? $this->value['unit'] : 'px';
617
+ $line_height_unit = ( ! empty( $this->value['line_height_unit'] ) ) ? $this->value['line_height_unit'] : $unit;
618
+
619
+ foreach ( $properties as $property ) {
620
+ if ( isset( $this->value[ $property ] ) && '' !== $this->value[ $property ] ) {
621
+ $unit = ( 'line-height' === $property ) ? $line_height_unit : $unit;
622
+ $output .= $property . ':' . $this->value[ $property ] . $unit . $important . ';';
623
+ }
624
+ }
625
+
626
+ $custom_style = ( ! empty( $this->value['custom-style'] ) ) ? $this->value['custom-style'] : '';
627
+
628
+ if ( $output ) {
629
+ $output = $element . '{' . $output . $custom_style . '}';
630
+ }
631
+
632
+ $this->parent->output_css .= $output;
633
+
634
+ return $output;
635
+
636
+ }
637
+
638
+ }
639
+ }
admin/views/sp-framework/functions/actions.php ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Framework Actions
4
+ *
5
+ * @package WP Carousel
6
+ * @subpackage wp-carousel-free/sp-framework
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ die; } // Cannot access directly.
11
+
12
+
13
+
14
+ if ( ! function_exists( 'wpcf_reset_ajax' ) ) {
15
+ /**
16
+ *
17
+ * Reset Ajax
18
+ *
19
+ * @since 1.0.0
20
+ * @version 1.0.0
21
+ */
22
+ function wpcf_reset_ajax() {
23
+
24
+ $nonce = ( ! empty( $_POST['nonce'] ) ) ? sanitize_text_field( wp_unslash( $_POST['nonce'] ) ) : '';
25
+ $unique = ( ! empty( $_POST['unique'] ) ) ? sanitize_text_field( wp_unslash( $_POST['unique'] ) ) : '';
26
+
27
+ if ( ! wp_verify_nonce( $nonce, 'wpcf_backup_nonce' ) ) {
28
+ wp_send_json_error( array( 'error' => esc_html__( 'Error: Invalid nonce verification.', 'wp-carousel-free' ) ) );
29
+ }
30
+
31
+ // Success.
32
+ delete_option( $unique );
33
+
34
+ wp_send_json_success();
35
+
36
+ }
37
+ add_action( 'wp_ajax_wpcf-reset', 'wpcf_reset_ajax' );
38
+ }
39
+
40
+
41
+ if ( ! function_exists( 'wpcf_chosen_ajax' ) ) {
42
+ /**
43
+ *
44
+ * Chosen Ajax
45
+ *
46
+ * @since 1.0.0
47
+ * @version 1.0.0
48
+ */
49
+ function wpcf_chosen_ajax() {
50
+ $nonce = ( ! empty( $_POST['nonce'] ) ) ? sanitize_text_field( wp_unslash( $_POST['nonce'] ) ) : '';
51
+ $type = ( ! empty( $_POST['type'] ) ) ? sanitize_text_field( wp_unslash( $_POST['type'] ) ) : '';
52
+ $term = ( ! empty( $_POST['term'] ) ) ? sanitize_text_field( wp_unslash( $_POST['term'] ) ) : '';
53
+ $query = ( ! empty( $_POST['query_args'] ) ) ? wp_kses_post_deep( $_POST['query_args'] ) : array();
54
+
55
+ if ( ! wp_verify_nonce( $nonce, 'wpcf_chosen_ajax_nonce' ) ) {
56
+ wp_send_json_error( array( 'error' => esc_html__( 'Error: Invalid nonce verification.', 'wp-carousel-free' ) ) );
57
+ }
58
+
59
+ if ( empty( $type ) || empty( $term ) ) {
60
+ wp_send_json_error( array( 'error' => esc_html__( 'Error: Invalid term ID.', 'wp-carousel-free' ) ) );
61
+ }
62
+
63
+ $capability = apply_filters( 'wpcf_chosen_ajax_capability', 'manage_options' );
64
+
65
+ if ( ! current_user_can( $capability ) ) {
66
+ wp_send_json_error( array( 'error' => esc_html__( 'Error: You do not have permission to do that.', 'wp-carousel-free' ) ) );
67
+ }
68
+
69
+ // Success.
70
+ $options = SP_WPCF_Fields::field_data( $type, $term, $query );
71
+
72
+ wp_send_json_success( $options );
73
+
74
+ }
75
+ add_action( 'wp_ajax_wpcf-chosen', 'wpcf_chosen_ajax' );
76
+ }
77
+
78
+ if ( ! function_exists( 'wpcf_get_option' ) ) {
79
+
80
+ /**
81
+ * Get option
82
+ *
83
+ * @param mixed $option_name name.
84
+ * @param mixed $default default.
85
+ * @return mixed
86
+ */
87
+ function wpcf_get_option( $option_name = '', $default = '' ) {
88
+
89
+ $options = apply_filters( 'wpcf_get_option', get_option( 'sp_wpcp_settings' ), $option_name, $default );
90
+
91
+ if ( isset( $option_name ) && isset( $options[ $option_name ] ) ) {
92
+ return $options[ $option_name ];
93
+ } else {
94
+ return ( isset( $default ) ) ? $default : null;
95
+ }
96
+
97
+ }
98
+ }
99
+
100
+ if ( ! function_exists( 'wpcf_get_all_option' ) ) {
101
+ /**
102
+ *
103
+ * Get all option
104
+ *
105
+ * @since 1.0.0
106
+ * @version 1.0.0
107
+ */
108
+ function wpcf_get_all_option() {
109
+ return get_option( '_wpcf_options' );
110
+ }
111
+ }
112
+
113
+
114
+ /**
115
+ * Populate the taxonomy name list to he select option.
116
+ *
117
+ * @return void
118
+ */
119
+ // function wpcf_get_taxonomies() {
120
+ // extract( $_REQUEST );
121
+ // $taxonomy_names = get_object_taxonomies( array( 'post_type' => $wpcf_post_type ), 'names' );
122
+ // foreach ( $taxonomy_names as $key => $label ) {
123
+ // echo '<option value="' . $label . '">' . $label . '</option>';
124
+ // }
125
+ // die( 0 );
126
+ // }
127
+ // add_action( 'wp_ajax_wpcf_get_taxonomies', 'wpcf_get_taxonomies' );
128
+
129
+ /**
130
+ * Populate the taxonomy terms list to the select option.
131
+ *
132
+ * @return void
133
+ */
134
+ // function wpcf_get_terms() {
135
+ // extract( $_REQUEST );
136
+ // $terms = get_terms( $wpcf_post_taxonomy );
137
+ // foreach ( $terms as $key => $value ) {
138
+ // echo '<option value="' . $value->term_id . '">' . $value->name . '</option>';
139
+ // }
140
+ // die( 0 );
141
+ // }
142
+ // add_action( 'wp_ajax_wpcf_get_terms', 'wpcf_get_terms' );
143
+
144
+ /**
145
+ * Get specific post to the select box.
146
+ *
147
+ * @return void
148
+ */
149
+ // function wpcf_get_posts() {
150
+ // extract( $_REQUEST );
151
+ // $all_posts = get_posts(
152
+ // array(
153
+ // 'post_type' => $wpcf_post_type,
154
+ // 'posts_per_page' => -1,
155
+ // )
156
+ // );
157
+ // if ( ! is_wp_error( $all_posts ) && ! empty( $all_posts ) ) {
158
+ // foreach ( $all_posts as $key => $post_obj ) {
159
+ // echo '<option value="' . $post_obj->ID . '">' . $post_obj->post_title . '</option>';
160
+ // }
161
+ // }
162
+ // wp_reset_postdata();
163
+ // die( 0 );
164
+ // }
165
+ // add_action( 'wp_ajax_wpcf_get_posts', 'wpcf_get_posts' );
admin/views/sp-framework/functions/helpers.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Framework helper functions
4
+ *
5
+ * @package WP Carousel
6
+ * @subpackage wp-carousel-free/sp-framework
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ die; } // Cannot access directly.
11
+
12
+ if ( ! function_exists( 'wpcf_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 wpcf_array_search( $array, $key, $value ) {
22
+
23
+ $results = array();
24
+
25
+ if ( is_array( $array ) ) {
26
+ if ( isset( $array[ $key ] ) && $array[ $key ] == $value ) {
27
+ $results[] = $array;
28
+ }
29
+
30
+ foreach ( $array as $sub_array ) {
31
+ $results = array_merge( $results, wpcf_array_search( $sub_array, $key, $value ) );
32
+ }
33
+ }
34
+
35
+ return $results;
36
+
37
+ }
38
+ }
39
+
40
+
41
+ if ( ! function_exists( 'wpcf_timeout' ) ) {
42
+ /**
43
+ * Between Microtime
44
+ *
45
+ * @param int $timenow time now.
46
+ * @param int $starttime start time.
47
+ * @param int $timeout time out.
48
+ * @return bool
49
+ */
50
+ function wpcf_timeout( $timenow, $starttime, $timeout = 30 ) {
51
+ return ( ( $timenow - $starttime ) < $timeout ) ? true : false;
52
+ }
53
+ }
54
+
55
+ if ( ! function_exists( 'wpcf_wp_editor_api' ) ) {
56
+ /**
57
+ *
58
+ * Check for wp editor api
59
+ *
60
+ * @since 1.0.0
61
+ * @version 1.0.0
62
+ */
63
+ function wpcf_wp_editor_api() {
64
+ global $wp_version;
65
+ return version_compare( $wp_version, '4.8', '>=' );
66
+ }
67
+ }
admin/views/{wpcfree-metabox → sp-framework}/functions/sanitize.php RENAMED
@@ -9,7 +9,7 @@
9
  if ( ! defined( 'ABSPATH' ) ) {
10
  die; } // Cannot access directly.
11
 
12
- if ( ! function_exists( 'spf_sanitize_replace_a_to_b' ) ) {
13
  /**
14
  *
15
  * Sanitize
@@ -21,13 +21,13 @@ if ( ! function_exists( 'spf_sanitize_replace_a_to_b' ) ) {
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
@@ -38,7 +38,7 @@ if ( ! function_exists( 'spf_sanitize_title' ) ) {
38
  * @since 1.0.0
39
  * @version 1.0.0
40
  */
41
- function spf_sanitize_title( $value ) {
42
  return sanitize_title( $value );
43
  }
44
  }
9
  if ( ! defined( 'ABSPATH' ) ) {
10
  die; } // Cannot access directly.
11
 
12
+ if ( ! function_exists( 'wpcf_sanitize_replace_a_to_b' ) ) {
13
  /**
14
  *
15
  * Sanitize
21
  * @since 1.0.0
22
  * @version 1.0.0
23
  */
24
+ function wpcf_sanitize_replace_a_to_b( $value ) {
25
  return str_replace( 'a', 'b', $value );
26
  }
27
  }
28
 
29
 
30
+ if ( ! function_exists( 'wpcf_sanitize_title' ) ) {
31
  /**
32
  *
33
  * Sanitize title
38
  * @since 1.0.0
39
  * @version 1.0.0
40
  */
41
+ function wpcf_sanitize_title( $value ) {
42
  return sanitize_title( $value );
43
  }
44
  }
admin/views/{wpcfree-metabox → sp-framework}/functions/validate.php RENAMED
@@ -9,7 +9,7 @@
9
  if ( ! defined( 'ABSPATH' ) ) {
10
  die; } // Cannot access directly.
11
 
12
- if ( ! function_exists( 'spf_validate_email' ) ) {
13
  /**
14
  * Email validate
15
  *
@@ -18,32 +18,32 @@ if ( ! function_exists( 'spf_validate_email' ) ) {
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 ) ) {
24
- return esc_html__( 'Please write a valid email address!', 'wp-carousel-free' );
25
  }
26
 
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 ) ) {
40
- return esc_html__( 'Please write a numeric data!', 'wp-carousel-free' );
41
  }
42
-
43
  }
44
  }
45
 
46
- if ( ! function_exists( 'spf_validate_required' ) ) {
 
47
  /**
48
  * Required validate
49
  *
@@ -52,17 +52,16 @@ if ( ! function_exists( 'spf_validate_required' ) ) {
52
  * @since 1.0.0
53
  * @version 1.0.0
54
  */
55
- function spf_validate_required( $value ) {
56
 
57
  if ( empty( $value ) ) {
58
- return esc_html__( 'Error! This field is required!', 'wp-carousel-free' );
59
  }
60
 
61
  }
62
  }
63
 
64
-
65
- if ( ! function_exists( 'spf_validate_url' ) ) {
66
  /**
67
  * URL validate
68
  *
@@ -71,10 +70,10 @@ if ( ! function_exists( 'spf_validate_url' ) ) {
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 ) ) {
77
- return esc_html__( 'Please write a valid url!', 'wp-carousel-free' );
78
  }
79
 
80
  }
9
  if ( ! defined( 'ABSPATH' ) ) {
10
  die; } // Cannot access directly.
11
 
12
+ if ( ! function_exists( 'wpcf_validate_email' ) ) {
13
  /**
14
  * Email validate
15
  *
18
  * @since 1.0.0
19
  * @version 1.0.0
20
  */
21
+ function wpcf_validate_email( $value ) {
22
 
23
  if ( ! filter_var( $value, FILTER_VALIDATE_EMAIL ) ) {
24
+ return esc_html__( 'Please enter a valid email address.', 'wp-carousel-free' );
25
  }
26
 
27
  }
28
  }
29
 
30
+
31
+ if ( ! function_exists( 'wpcf_validate_numeric' ) ) {
32
  /**
33
  * Numeric validate
34
  *
35
  * @param int $value int.
36
  * @return int
37
  */
38
+ function wpcf_validate_numeric( $value ) {
 
39
  if ( ! is_numeric( $value ) ) {
40
+ return esc_html__( 'Please enter a valid number.', 'wp-carousel-free' );
41
  }
 
42
  }
43
  }
44
 
45
+
46
+ if ( ! function_exists( 'wpcf_validate_required' ) ) {
47
  /**
48
  * Required validate
49
  *
52
  * @since 1.0.0
53
  * @version 1.0.0
54
  */
55
+ function wpcf_validate_required( $value ) {
56
 
57
  if ( empty( $value ) ) {
58
+ return esc_html__( 'This field is required.', 'wp-carousel-free' );
59
  }
60
 
61
  }
62
  }
63
 
64
+ if ( ! function_exists( 'wpcf_validate_url' ) ) {
 
65
  /**
66
  * URL validate
67
  *
70
  * @since 1.0.0
71
  * @version 1.0.0
72
  */
73
+ function wpcf_validate_url( $value ) {
74
 
75
  if ( ! filter_var( $value, FILTER_VALIDATE_URL ) ) {
76
+ return esc_html__( 'Please enter a valid URL.', 'wp-carousel-free' );
77
  }
78
 
79
  }
admin/views/sp-framework/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden.
admin/views/wpcfree-metabox/assets/css/spf-rtl.css DELETED
@@ -1,537 +0,0 @@
1
- /**
2
- *
3
- * ---------------------------------------------------------
4
- * CSF RTL CSS MAP
5
- * ---------------------------------------------------------
6
- *
7
- * 01. Base
8
- * 01. 01. Header
9
- * 01. 02. Header Buttons
10
- * 01. 03. Navigation
11
- * 01. 04. Content
12
- * 01. 05. Section
13
- * 01. 06. Show All Options
14
- * 01. 07. Search Input
15
- * 01. 08. Copyright
16
- * 01. 09. Metabox
17
- * 02. Fields
18
- * 02. 01. Field: typography
19
- * 02. 02. Field: checkbox, radio
20
- * 02. 03. Field: switcher
21
- * 02. 04. Field: upload
22
- * 02. 05. Field: group
23
- * 02. 06. Field: repeater
24
- * 02. 07. Field: help
25
- * 02. 08. Field: icon
26
- * 02. 09. Field: gallery
27
- * 02. 10. Field: sorter
28
- * 02. 11. Field: tabbed
29
- * 02. 12. Field: media
30
- * 02. 13. Field: notice
31
- * 02. 14. Field: border, spacing, dimensions, column, dimensions_advanced
32
- * 02. 15. Field: background
33
- * 02. 16. Field: spinner
34
- * 02. 17. Field: slider
35
- * 02. 18. Field: button_set
36
- * 02. 19. Field: link_color
37
- * 02. 20. Field: color_group
38
- * 02. 21. Field: palette
39
- * 03. Taxonomy
40
- * 04. Modal
41
- * 05. Customizer
42
- * 06. Responsive
43
- * 07. Others
44
- *
45
- * ---------------------------------------------------------
46
- *
47
- */
48
-
49
- /**
50
- * 01. Base
51
- */
52
- .spf {
53
- margin-left: 20px;
54
- margin-right: 0;
55
- }
56
-
57
- /**
58
- * 01. 01. Header
59
- */
60
- .spf-header h1 {
61
- float: right;
62
- }
63
-
64
- .spf-header fieldset {
65
- float: left;
66
- }
67
-
68
- /**
69
- * 01. 02. Header Buttons
70
- */
71
- .spf-buttons {
72
- float: left;
73
- direction: ltr;
74
- }
75
-
76
- .spf-header-left {
77
- float: right;
78
- }
79
-
80
- .spf-header-right {
81
- float: left;
82
- }
83
-
84
- /**
85
- * 01. 03. Navigation
86
- */
87
- .spf-nav {
88
- float: right;
89
- }
90
-
91
- .spf-nav ul {
92
- clear: right;
93
- }
94
-
95
- .spf-nav ul li .spf-section-active:after {
96
- right: auto;
97
- left: 0;
98
- border-left-color: #fff;
99
- border-right-color: transparent;
100
- }
101
-
102
- .spf-nav ul li .spf-arrow:after {
103
- content: "\f053";
104
- right: auto;
105
- left: 10px;
106
- }
107
-
108
- .spf-nav ul li.spf-tab-active .spf-arrow:after {
109
- -moz-transform: rotate(-90deg);
110
- -ms-transform: rotate(-90deg);
111
- -webkit-transform: rotate(-90deg);
112
- transform: rotate(-90deg);
113
- }
114
-
115
- .spf-nav ul ul li a {
116
- padding-right: 25px;
117
- padding-left: 15px;
118
- }
119
-
120
- .spf-nav ul ul:before {
121
- left: auto;
122
- right: 15px;
123
- }
124
-
125
- .spf-nav .fa {
126
- margin-left: 5px;
127
- margin-right: 0;
128
- }
129
-
130
- .spf-nav-background {
131
- left: auto;
132
- right: 0;
133
- }
134
-
135
- /**
136
- * 01. 04. Content
137
- */
138
- .spf-content {
139
- margin-left: 0;
140
- margin-right: 225px;
141
- }
142
-
143
- /**
144
- * 01. 05. Section
145
- */
146
- .spf-sections {
147
- float: right;
148
- }
149
-
150
- /**
151
- * 01. 06. Show all options
152
- */
153
- .spf-show-all .spf-content {
154
- margin-right: 0;
155
- overflow: hidden;
156
- }
157
-
158
- .spf-expand-all {
159
- float: right;
160
- right: auto;
161
- left: 40px;
162
- margin-right: 0;
163
- margin-left: 4px;
164
- }
165
-
166
- /**
167
- * 01. 07. Search Input
168
- */
169
- .spf-search {
170
- float: right;
171
- }
172
-
173
- .spf-search input {
174
- margin: 0 0 0 5px;
175
- }
176
-
177
- /**
178
- * 01. 08. Copyright
179
- */
180
- .spf-copyright {
181
- float: right;
182
- }
183
-
184
- /**
185
- * 01. 09. Metabox
186
- */
187
- .spf-metabox {
188
- margin: -6px -12px -12px -12px;
189
- }
190
-
191
- .spf-metabox .spf-section-title {
192
- padding: 20px;
193
- }
194
-
195
- .spf-metabox .spf-section-title .fa {
196
- margin-left: 5px;
197
- margin-right: 0;
198
- }
199
-
200
- .spf-section-title .fa {
201
- margin-left: 5px;
202
- margin-right: 0;
203
- }
204
-
205
- /**
206
- * 02. Fields
207
- */
208
- .spf-field .spf-title {
209
- float: right;
210
- }
211
-
212
- .spf-field .spf-fieldset {
213
- margin-left: 0;
214
- margin-right: 30%;
215
- }
216
-
217
- .spf-pseudo-field {
218
- padding: 0 0 0 5px !important;
219
- }
220
-
221
- /**
222
- * 02. 01. Field: typography
223
- */
224
- .spf-field-typography select {
225
- margin: 0;
226
- width: 100%;
227
- }
228
-
229
- .spf-field-typography .spf--blocks-inputs .spf--blocks {
230
- flex-direction: row-reverse;
231
- }
232
-
233
- /**
234
- * 02. 02. Field: checkbox, radio
235
- */
236
- .spf-field-checkbox .spf--inline-list li,
237
- .spf-field-radio .spf--inline-list li {
238
- margin-right: 0;
239
- margin-left: 15px;
240
- }
241
-
242
- /**
243
- * 02. 03. Field: switcher
244
- */
245
- .spf-field-switcherf .spf--switcher,
246
- .spf-field-switcher .spf--switcher {
247
- float: right;
248
- }
249
-
250
- .spf-field-switcherf .spf--label,
251
- .spf-field-switcher .spf--label {
252
- float: right;
253
- margin-left: 0;
254
- margin-right: 5px;
255
- }
256
-
257
- /**
258
- * 02. 04. Field: upload
259
- */
260
- .spf-field-upload .spf--remove,
261
- .spf-field-upload .spf--buttons {
262
- margin-left: 0;
263
- margin-right: 5px;
264
- }
265
-
266
- /**
267
- * 02. 05. Field: group
268
- */
269
- .spf-field-group .spf-cloneable-title {
270
- padding: 15px 10px 15px 65px;
271
- }
272
-
273
- .spf-field-group .spf-cloneable-helper {
274
- right: auto;
275
- left: 10px;
276
- }
277
-
278
- /**
279
- * 02. 06. Field: repeater
280
- */
281
- .spf-field-repeater .spf-repeater-helper {
282
- border-left: 0;
283
- border-right: 1px solid #eee;
284
- }
285
-
286
- /**
287
- * 02. 07. Field: help
288
- */
289
- .spf-help {
290
- right: auto;
291
- left: 5px;
292
- }
293
-
294
- /**
295
- * 02. 08. Field: icon
296
- */
297
- .spf-field-icon .button {
298
- margin-right: 0;
299
- margin-left: 5px;
300
- }
301
-
302
- .spf-field-icon .spf-icon-preview i {
303
- margin-right: 0;
304
- margin-left: 5px;
305
- }
306
-
307
- /**
308
- * 02. 09. Field: gallery
309
- */
310
-
311
- .spf-field-gallery ul.sp-gallery-images li,
312
- .button:focus,
313
- .spf-field-gallery .button:hover,
314
- .spf-field-gallery .button {
315
- margin-right: 0;
316
- margin-left: 5px;
317
- }
318
-
319
- /*
320
- Custom Style
321
- */
322
- .spf-field-gallery a,
323
- .spf-field-gallery li {
324
- float: right;
325
- }
326
-
327
- /*
328
- * 02. 11. Field: tabbed
329
- */
330
- .spf-field-tabbed .spf-tabbed-nav .fa {
331
- padding-right: 0;
332
- padding-left: 5px;
333
- }
334
-
335
- .spf-field-tabbed .spf-tabbed-nav a {
336
- margin-right: 0;
337
- margin-left: 5px;
338
- }
339
-
340
- /**
341
- * 02. 12. Field: media
342
- */
343
- .spf-field-media .button {
344
- margin-left: 0;
345
- margin-right: 7px;
346
- }
347
-
348
- .spf-field-media .hidden+.button {
349
- margin-right: 0;
350
- }
351
-
352
- /**
353
- * 02. 13. Field: notice
354
- */
355
- .spf-notice {
356
- border-left: none;
357
- border-right-style: solid;
358
- border-right-width: 4px;
359
- }
360
-
361
- /**
362
- * 02. 14. Field: border, spacing, dimensions, column, dimensions_advanced
363
- */
364
- .spf-field-dimensions_advanced .spf--input,
365
- .spf-field-column .spf--input,
366
- .spf-field-dimensions .spf--input,
367
- .spf-field-spacing .spf--input,
368
- .spf-field-border .spf--input {
369
- float: right;
370
- margin-right: 0;
371
- margin-left: 15px;
372
- }
373
-
374
- .spf-field-dimensions_advanced .spf--left,
375
- .spf-field-column .spf--left,
376
- .spf-field-dimensions .spf--left,
377
- .spf-field-spacing .spf--left,
378
- .spf-field-border .spf--left {
379
- float: right;
380
- }
381
-
382
- /**
383
- * 02. 15. Field: background
384
- */
385
- .spf-field-background .spf--block {
386
- float: right;
387
- }
388
-
389
- .spf-field-background .spf--select,
390
- .spf-field-background .spf--media {
391
- padding-right: 0;
392
- }
393
-
394
- .spf-field-background .spf--title {
395
- margin-right: 0;
396
- margin-left: 5px;
397
- }
398
-
399
- /**
400
- * 02. 16. Field: spinner
401
- */
402
- .spf-field-spinner .spf--spin {
403
- float: right;
404
- }
405
-
406
- /**
407
- * 02. 17. Field: slider
408
- */
409
- .spf-field-slider .ui-slider {
410
- direction: ltr;
411
- }
412
-
413
- .spf-field-slider input[type="text"] {
414
- margin-left: 0;
415
- margin-right: 15px;
416
- }
417
-
418
- .spf-field-slider em {
419
- padding-left: 0;
420
- padding-right: 5px;
421
- }
422
-
423
- /**
424
- * 02. 18. Field: button_set
425
- */
426
- .spf-field-button_set .spf--button-group {
427
- float: right;
428
- }
429
-
430
- /**
431
- * 02. 19. Field: link_color
432
- */
433
- .spf-field-link_color .spf--left {
434
- float: right;
435
- margin-right: 0;
436
- margin-left: 10px;
437
- }
438
-
439
- /**
440
- * 02. 20. Field: color_group
441
- */
442
- .spf-field-color_group .spf--left {
443
- float: right;
444
- margin-right: 0;
445
- margin-left: 10px;
446
- }
447
-
448
- /**
449
- * 02. 21. Field: palette
450
- */
451
- .spf-field-palette .spf--palette {
452
- margin-right: 0;
453
- margin-left: 10px;
454
- }
455
-
456
- /**
457
- * 03. Taxonomy
458
- */
459
- .spf-taxonomy-add-fields .spf-fieldset {
460
- margin-right: 0;
461
- }
462
-
463
- .spf-taxonomy-add-fields .spf-field>.spf-fieldset>.spf-help {
464
- left: -5px;
465
- right: auto;
466
- }
467
-
468
- .spf-taxonomy-edit-fields .spf-fieldset {
469
- margin-left: 0;
470
- margin-right: 225px;
471
- }
472
-
473
- .spf-taxonomy-edit-fields .spf-field>.spf-fieldset>.spf-help {
474
- right: auto;
475
- left: -5px;
476
- }
477
-
478
- /**
479
- * 04. Modal
480
- */
481
- .spf-modal-content .spf-field {
482
- padding: 15px 15px 15px 30px;
483
- }
484
-
485
- .spf-modal-title {
486
- padding: 0 16px 0 36px;
487
- }
488
-
489
- .spf-modal-close {
490
- right: auto;
491
- left: 0;
492
- }
493
-
494
- /**
495
- * 05. Customizer
496
- */
497
- .control-section .spf-field .spf-fieldset {
498
- margin-right: 0;
499
- }
500
-
501
- /**
502
- * 06. Responsive
503
- */
504
- @media only screen and (max-width: 1200px) {
505
- .spf-metabox .spf-field .spf-fieldset {
506
- margin-left: 0;
507
- }
508
- }
509
-
510
- @media only screen and (max-width: 782px) {
511
-
512
- .spf .spf-fieldset,
513
- .spf .spf-content {
514
- margin-right: 0;
515
- }
516
- }
517
-
518
- /**
519
- * 07. Others
520
- */
521
- .spf-field .spf--transparent-slider {
522
- margin-left: 0;
523
- margin-right: 2px;
524
- }
525
-
526
- .spf-field .spf--transparent-slider .ui-slider-handle {
527
- margin: 0 -11px;
528
- }
529
-
530
- .spf-field .spf--transparent-offset {
531
- background-position: center right;
532
- }
533
-
534
- .spf-field .spf--transparent-text {
535
- right: auto;
536
- left: 10px;
537
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/wpcfree-metabox/assets/css/spf-rtl.min.css DELETED
@@ -1 +0,0 @@
1
- .spf{margin-left:20px;margin-right:0}.spf-header h1{float:right}.spf-header fieldset{float:left}.spf-buttons{float:left;direction:ltr}.spf-header-left{float:right}.spf-header-right{float:left}.spf-nav{float:right}.spf-nav ul{clear:right}.spf-nav ul li .spf-section-active:after{right:auto;left:0;border-left-color:#fff;border-right-color:transparent}.spf-nav ul li .spf-arrow:after{content:"\f053";right:auto;left:10px}.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 ul li a{padding-right:25px;padding-left:15px}.spf-nav ul ul:before{left:auto;right:15px}.spf-nav .fa{margin-left:5px;margin-right:0}.spf-nav-background{left:auto;right:0}.spf-content{margin-left:0;margin-right:225px}.spf-sections{float:right}.spf-show-all .spf-content{margin-right:0;overflow:hidden}.spf-expand-all{float:right;right:auto;left:40px;margin-right:0;margin-left:4px}.spf-search{float:right}.spf-search input{margin:0 0 0 5px}.spf-copyright{float:right}.spf-metabox{margin:-6px -12px -12px -12px}.spf-metabox .spf-section-title{padding:20px}.spf-metabox .spf-section-title .fa{margin-left:5px;margin-right:0}.spf-section-title .fa{margin-left:5px;margin-right:0}.spf-field .spf-title{float:right}.spf-field .spf-fieldset{margin-left:0;margin-right:30%}.spf-pseudo-field{padding:0 0 0 5px!important}.spf-field-typography select{margin:0;width:100%}.spf-field-typography .spf--blocks-inputs .spf--blocks{flex-direction:row-reverse}.spf-field-checkbox .spf--inline-list li,.spf-field-radio .spf--inline-list li{margin-right:0;margin-left:15px}.spf-field-switcher .spf--switcher,.spf-field-switcherf .spf--switcher{float:right}.spf-field-switcher .spf--label,.spf-field-switcherf .spf--label{float:right;margin-left:0;margin-right:5px}.spf-field-upload .spf--buttons,.spf-field-upload .spf--remove{margin-left:0;margin-right:5px}.spf-field-group .spf-cloneable-title{padding:15px 10px 15px 65px}.spf-field-group .spf-cloneable-helper{right:auto;left:10px}.spf-field-repeater .spf-repeater-helper{border-left:0;border-right:1px solid #eee}.spf-help{right:auto;left:5px}.spf-field-icon .button{margin-right:0;margin-left:5px}.spf-field-icon .spf-icon-preview i{margin-right:0;margin-left:5px}.button:focus,.spf-field-gallery .button,.spf-field-gallery .button:hover,.spf-field-gallery ul.sp-gallery-images li{margin-right:0;margin-left:5px}.spf-field-gallery a,.spf-field-gallery li{float:right}.spf-field-tabbed .spf-tabbed-nav .fa{padding-right:0;padding-left:5px}.spf-field-tabbed .spf-tabbed-nav a{margin-right:0;margin-left:5px}.spf-field-media .button{margin-left:0;margin-right:7px}.spf-field-media .hidden+.button{margin-right:0}.spf-notice{border-left:none;border-right-style:solid;border-right-width:4px}.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:right;margin-right:0;margin-left:15px}.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:right}.spf-field-background .spf--block{float:right}.spf-field-background .spf--media,.spf-field-background .spf--select{padding-right:0}.spf-field-background .spf--title{margin-right:0;margin-left:5px}.spf-field-spinner .spf--spin{float:right}.spf-field-slider .ui-slider{direction:ltr}.spf-field-slider input[type=text]{margin-left:0;margin-right:15px}.spf-field-slider em{padding-left:0;padding-right:5px}.spf-field-button_set .spf--button-group{float:right}.spf-field-link_color .spf--left{float:right;margin-right:0;margin-left:10px}.spf-field-color_group .spf--left{float:right;margin-right:0;margin-left:10px}.spf-field-palette .spf--palette{margin-right:0;margin-left:10px}.spf-taxonomy-add-fields .spf-fieldset{margin-right:0}.spf-taxonomy-add-fields .spf-field>.spf-fieldset>.spf-help{left:-5px;right:auto}.spf-taxonomy-edit-fields .spf-fieldset{margin-left:0;margin-right:225px}.spf-taxonomy-edit-fields .spf-field>.spf-fieldset>.spf-help{right:auto;left:-5px}.spf-modal-content .spf-field{padding:15px 15px 15px 30px}.spf-modal-title{padding:0 16px 0 36px}.spf-modal-close{right:auto;left:0}.control-section .spf-field .spf-fieldset{margin-right:0}@media only screen and (max-width:1200px){.spf-metabox .spf-field .spf-fieldset{margin-left:0}}@media only screen and (max-width:782px){.spf .spf-content,.spf .spf-fieldset{margin-right:0}}.spf-field .spf--transparent-slider{margin-left:0;margin-right:2px}.spf-field .spf--transparent-slider .ui-slider-handle{margin:0 -11px}.spf-field .spf--transparent-offset{background-position:center right}.spf-field .spf--transparent-text{right:auto;left:10px}
 
admin/views/wpcfree-metabox/assets/css/spf.css DELETED
@@ -1,5146 +0,0 @@
1
- /**
2
- *
3
- * ---------------------------------------------------------
4
- * SP FRAMEWORK CSS MAP
5
- * ---------------------------------------------------------
6
- *
7
- * 01. Base
8
- * 01. 01. Header
9
- * 01. 02. Sticky
10
- * 01. 03. Header Buttons
11
- * 01. 04. Navigation
12
- * 01. 05. Wrapper
13
- * 01. 06. Content
14
- * 01. 07. Section
15
- * 01. 08. Footer
16
- * 01. 09. Copyright
17
- * 01. 10. Show All Options
18
- * 01. 11. Search Input
19
- * 01. 12. Metabox
20
- * 01. 13. Help Tooltip
21
- * 02. Themes
22
- * 02. 01. Theme Dark
23
- * 02. 02. Theme Light
24
- * 03. Fields
25
- * 03. 01. Field
26
- * 03. 02. Field: accordion
27
- * 03. 03. Field: background
28
- * 03. 04. Field: backup
29
- * 03. 05. Field: border, spacing, dimensions, column, dimensions_advanced
30
- * 03. 06. Field: button_set
31
- * 03. 07. Field: checkbox, radio
32
- * 03. 08. Field: code_editor
33
- * 03. 09. Field: color
34
- * 03. 10. Field: color_group
35
- * 03. 11. Field: fieldset
36
- * 03. 12. Field: date
37
- * 03. 13. Field: gallery
38
- * 03. 14. Field: group
39
- * 03. 15. Field: icon
40
- * 03. 16. Field: image_select
41
- * 03. 17. Field: link_color
42
- * 03. 18. Field: media
43
- * 03. 19. Field: palette
44
- * 03. 20. Field: repeater
45
- * 03. 21. Field: select
46
- * 03. 22. Field: slider
47
- * 03. 23. Field: sortable
48
- * 03. 24. Field: sorter
49
- * 03. 25. Field: spinner
50
- * 03. 26. Field: switcher, switcherf
51
- * 03. 27. Field: tabbed
52
- * 03. 28. Field: text
53
- * 03. 29. Field: textarea
54
- * 03. 30. Field: typography
55
- * 03. 31. Field: upload
56
- * 03. 32. Field: wp_editor
57
- * 03. 33. Field: heading
58
- * 03. 34. Field: subheading
59
- * 03. 35. Field: submessage
60
- * 03. 36. Field: notice
61
- * 03. 37. Field: others
62
- * 04. Widget
63
- * 05. Customizer
64
- * 06. Taxonomy
65
- 07. Profile
66
- * 08. Modal
67
- * 08. 01. Shortcode Modal
68
- * 08. 02. Gutenberg Modal
69
- * 08. 03. Icon Modal
70
- * 09. Helper
71
- * 10. Welcome Page
72
- * 11. Responsive
73
- * 12. Others
74
- *
75
- * ---------------------------------------------------------
76
- *
77
- */
78
-
79
- /**
80
- * 01. Base
81
- */
82
-
83
- .spf {
84
- position: relative;
85
- }
86
-
87
- .spf label {
88
- padding: 0;
89
- margin: 0;
90
- display: inline-block;
91
- }
92
-
93
- .spf-ab-icon {
94
- top: 2px;
95
- }
96
-
97
- #screen-meta-links+.spf-options {
98
- margin-top: 40px;
99
- }
100
-
101
- .spf-options {
102
- margin-top: 20px;
103
- margin-right: 20px;
104
- }
105
-
106
- /**
107
- * 01. 01. Header
108
- */
109
-
110
- .spf-header {
111
- position: relative;
112
- }
113
-
114
- .spf-header-inner {
115
- padding: 25px;
116
- }
117
-
118
- .spf-header-inner h1 svg {
119
- float: left;
120
- height: 26px;
121
- width: 28px;
122
- margin-right: 8px;
123
- padding-top: 6px;
124
- }
125
- .spf-header-inner h1 {
126
- float: left;
127
- font-size: 18px;
128
- line-height: 38px;
129
- font-weight: 600;
130
- margin: 0;
131
- vertical-align: middle;
132
- }
133
-
134
- .spf-header-inner h1 small {
135
- font-size: 11px;
136
- font-weight: 500;
137
- }
138
-
139
- /**
140
- * 01. 02. Sticky
141
- */
142
-
143
- .spf-sticky .spf-header-inner {
144
- position: fixed;
145
- z-index: 20;
146
- top: 32px;
147
- -moz-box-shadow: 0 5px 25px rgba(0, 0, 0, 0.125);
148
- -webkit-box-shadow: 0 5px 25px rgba(0, 0, 0, 0.125);
149
- box-shadow: 0 5px 25px rgba(0, 0, 0, 0.125);
150
- }
151
-
152
- /**
153
- * 01. 03. Header Buttons
154
- */
155
-
156
-
157
- /**
158
- * 01. 03. Header Buttons
159
- */
160
-
161
- .spf-buttons {
162
- float: right;
163
- -moz-transition: opacity 0.2s;
164
- -o-transition: opacity 0.2s;
165
- -webkit-transition: opacity 0.2s;
166
- transition: opacity 0.2s;
167
- }
168
-
169
-
170
- .spf-buttons .button {
171
- margin: 0 4px;
172
- padding: 0px 16px;
173
- border-radius: 0;
174
- height: 38px;
175
- font-size: 13px;
176
- font-weight: 500;
177
- text-transform: uppercase;
178
- color: #ffffff;
179
- }
180
-
181
- .spf-buttons .button.spf-reset-all,
182
- .spf-buttons .button.spf-reset-section {
183
- background-color: #cd3c3c !important;
184
- border-color: transparent !important;
185
- -webkit-box-shadow: none !important;
186
- box-shadow: none !important;
187
- text-shadow: none !important;
188
- border-radius: 4px;
189
- height: 38px;
190
- -webkit-transition: background-color .2s;
191
- transition: background-color .2s;
192
- color: #fff !important;
193
- }
194
- .spf-buttons .button.spf-save-ajax {
195
- background-color: #02cc7b;
196
- border-color: transparent;
197
- color: #fff !important;
198
- -webkit-box-shadow: none;
199
- box-shadow: none;
200
- text-shadow: none;
201
- border-radius: 4px;
202
- height: 38px;
203
- width: 75px;
204
- -webkit-transition: background-color .2s;
205
- transition: background-color .2s;
206
- }
207
- .spf-buttons .button.spf-save-ajax:hover {
208
- background-color: #02bb71;
209
- }
210
-
211
- .spf-buttons .button.spf-reset-section {
212
- background-color: #77777c !important;
213
- }
214
- .spf-buttons .button.spf-reset-section:hover {
215
- background-color: #616169 !important;
216
- }
217
- .spf-buttons .button.spf-reset-all:hover{
218
- background-color: #b82f2f !important;
219
- }
220
- .spf-buttons .button:focus {
221
- outline: none !important;
222
- box-shadow: none !important;
223
- }
224
-
225
- .spf-header-left {
226
- float: left;
227
- }
228
-
229
- .spf-header-right {
230
- float: right;
231
- }
232
-
233
-
234
- /**
235
- * 01. 04. Navigation
236
- */
237
-
238
- .spf-nav {
239
- display: block;
240
- width: auto;
241
- }
242
-
243
- /* .spf-nav {
244
- display: block;
245
- position: relative;
246
- z-index: 10;
247
- float: left;
248
- width: 225px;
249
- } */
250
-
251
- .spf-nav ul {
252
- clear: left;
253
- margin: 0;
254
- list-style-type: none;
255
- }
256
-
257
- .spf-nav ul li {
258
- margin-bottom: 0;
259
- }
260
-
261
- .spf-nav ul li a {
262
- font-size: 13px;
263
- position: relative;
264
- display: block;
265
- padding: 14px 12px;
266
- text-decoration: none;
267
- -moz-transition: none;
268
- -o-transition: none;
269
- -webkit-transition: none;
270
- transition: none;
271
- }
272
-
273
- #spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header .support a,
274
- .spf-nav ul li a:focus {
275
- outline: none;
276
- -moz-box-shadow: none;
277
- -webkit-box-shadow: none;
278
- box-shadow: none;
279
- }
280
-
281
- .spf-nav ul li .spf-section-active:after {
282
- content: " ";
283
- position: absolute;
284
- right: 0;
285
- top: 50%;
286
- height: 0;
287
- width: 0;
288
- pointer-events: none;
289
- border: solid transparent;
290
- border-right-color: #fff;
291
- border-width: 4px;
292
- margin-top: -4px;
293
- }
294
-
295
- .spf-nav ul li .spf-arrow:after {
296
- content: "\f054";
297
- display: inline-block;
298
- font-family: "FontAwesome";
299
- font-size: 9px;
300
- line-height: 1;
301
- position: absolute;
302
- right: 10px;
303
- top: 50%;
304
- margin-top: -4px;
305
- -moz-transform: rotate(0);
306
- -ms-transform: rotate(0);
307
- -webkit-transform: rotate(0);
308
- transform: rotate(0);
309
- }
310
-
311
- .spf-nav ul li.spf-tab-active .spf-arrow:after {
312
- -moz-transform: rotate(90deg);
313
- -ms-transform: rotate(90deg);
314
- -webkit-transform: rotate(90deg);
315
- transform: rotate(90deg);
316
- }
317
-
318
- .spf-nav ul li.spf-tab-active ul {
319
- display: block;
320
- }
321
-
322
- .spf-nav ul ul {
323
- display: none;
324
- position: relative;
325
- }
326
-
327
- .spf-nav ul ul li a {
328
- font-size: 12px;
329
- padding: 12px 14px 12px 24px;
330
- }
331
-
332
- .spf-nav .fa {
333
- width: 20px;
334
- margin-right: 5px;
335
- font-size: 14px;
336
- text-align: center;
337
- }
338
-
339
- .spf-nav .spf-label-error {
340
- margin-left: 4px;
341
- vertical-align: top;
342
- }
343
-
344
- /**
345
- * 01. 05. Wrapper
346
- */
347
-
348
- .spf-wrapper {
349
- position: relative;
350
- }
351
-
352
- /**
353
- * 01. 06. Content
354
- */
355
-
356
- .spf-content {
357
- background-color: #fff;
358
- -moz-transition: opacity 0.2s;
359
- -o-transition: opacity 0.2s;
360
- -webkit-transition: opacity 0.2s;
361
- transition: opacity 0.2s;
362
- }
363
-
364
- /**
365
- * 01. 07. Section
366
- */
367
-
368
- .spf-sections {
369
- float: left;
370
- width: 100%;
371
- }
372
-
373
- .spf-section {
374
- display: none;
375
- }
376
-
377
- .spf-section-title {
378
- display: none;
379
- padding: 20px 30px;
380
- /* background-color: #f5f5f5; */
381
- background-color: #18AFB9;
382
- border-top: 1px solid #eee;
383
- border-bottom: 1px solid #eee;
384
- }
385
-
386
- .spf-section-title h3 {
387
- margin: 0;
388
- padding: 0;
389
- font-size: 13px;
390
- font-weight: bold;
391
- text-transform: uppercase;
392
- color: #fff;
393
- }
394
-
395
- .spf-section-title .fa {
396
- margin-right: 5px;
397
- }
398
-
399
- /*
400
- WP Carousel Pro Custom CSS.
401
- */
402
-
403
- .sp-wpcp-options .spf-nav {
404
- width: 225px;
405
- }
406
-
407
- .sp-wpcp-options .spf-nav {
408
- display: block;
409
- position: relative;
410
- z-index: 10;
411
- float: left;
412
- width: 225px;
413
- }
414
-
415
- #sp_wpcp_shortcode_options .spf-nav ul li {
416
- display: inline-block;
417
- /* custom style */
418
- }
419
-
420
- .sp-wpcp-options .spf-nav-background {
421
- position: absolute;
422
- top: 0;
423
- left: 0;
424
- bottom: 0;
425
- z-index: 9;
426
- width: 225px;
427
- }
428
-
429
- .sp-wpcp-options .spf-content {
430
- position: relative;
431
- margin-left: 225px;
432
- background-color: #fff;
433
- -moz-transition: opacity 0.2s;
434
- -o-transition: opacity 0.2s;
435
- -webkit-transition: opacity 0.2s;
436
- transition: opacity 0.2s;
437
- }
438
-
439
- /**
440
- * 01. 08. Footer
441
- */
442
-
443
- .spf-footer {
444
- padding: 20px;
445
- font-size: 11px;
446
- }
447
-
448
- /**
449
- * 01. 09. Copyright
450
- */
451
-
452
- .spf-copyright {
453
- float: left;
454
- margin-top: 5px;
455
- }
456
-
457
- /**
458
- * 01. 10. Show All Options
459
- */
460
-
461
- .spf-search-all .spf-nav-background,
462
- .spf-search-all .spf-nav,
463
- .spf-show-all .spf-nav-background,
464
- .spf-show-all .spf-nav {
465
- display: none;
466
- }
467
-
468
- .spf-search-all .spf-content,
469
- .spf-show-all .spf-content {
470
- margin-left: 0;
471
- }
472
-
473
- .spf-search-all .spf-section-title,
474
- .spf-search-all .spf-section,
475
- .spf-show-all .spf-section-title,
476
- .spf-show-all .spf-section {
477
- display: block !important;
478
- }
479
-
480
- .spf-search-all .spf-section-title {
481
- display: none !important;
482
- }
483
-
484
- .spf-expand-all {
485
- float: left;
486
- padding: 0 8px;
487
- margin-right: 4px;
488
- z-index: 1;
489
- font-size: 14px;
490
- line-height: 29px;
491
- cursor: pointer;
492
- -webkit-user-select: none;
493
- user-select: none;
494
- -moz-border-radius: 2px;
495
- -webkit-border-radius: 2px;
496
- border-radius: 2px;
497
- -moz-transition: all 0.2s;
498
- -o-transition: all 0.2s;
499
- -webkit-transition: all 0.2s;
500
- transition: all 0.2s;
501
- }
502
-
503
- .spf-expand-all span {
504
- font-size: 11px;
505
- vertical-align: middle;
506
- }
507
-
508
- /**
509
- * 01. 11. Search Input
510
- */
511
-
512
- .spf-search {
513
- float: left;
514
- }
515
-
516
- .spf-search input {
517
- margin: 0 2px 0 0;
518
- border: none;
519
- font-size: 12px;
520
- line-height: 29px;
521
- text-align: inherit;
522
- padding: 0 10px;
523
- -moz-border-radius: 2px;
524
- -webkit-border-radius: 2px;
525
- border-radius: 2px;
526
- -moz-box-shadow: none;
527
- -webkit-box-shadow: none;
528
- box-shadow: none;
529
- }
530
-
531
- .spf-search input:focus {
532
- -moz-box-shadow: none;
533
- -webkit-box-shadow: none;
534
- box-shadow: none;
535
- }
536
-
537
- .spf-saving .spf-buttons,
538
- .spf-saving .spf-content {
539
- cursor: default;
540
- pointer-events: none;
541
- opacity: 0.75;
542
- }
543
-
544
- /**
545
- * 01. 12. Metabox
546
- */
547
-
548
- .spf-metabox {
549
- margin: -6px -12px -12px -12px;
550
- }
551
-
552
- .spf-metabox .spf-section-title {
553
- padding: 20px;
554
- }
555
-
556
- .block-editor-page .spf-metabox {
557
- margin: -6px -14px -12px -14px;
558
- }
559
-
560
- .spf-metabox-restore {
561
- text-align: right;
562
- padding: 10px;
563
- border-top: 1px solid #eee;
564
- }
565
-
566
- .spf-metabox-restore .spf-button-cancel,
567
- .spf-metabox-restore input {
568
- display: none;
569
- }
570
-
571
- .spf-metabox-restore span {
572
- -webkit-user-select: none;
573
- user-select: none;
574
- }
575
-
576
- .spf-metabox-restore input:checked~.spf-button-restore {
577
- display: none;
578
- }
579
-
580
- .spf-metabox-restore input:checked~.spf-button-cancel {
581
- display: inline-block;
582
- }
583
-
584
- #side-sortables .spf-section-title {
585
- padding: 12px;
586
- }
587
-
588
- #side-sortables .spf-field {
589
- padding: 12px;
590
- }
591
-
592
- #side-sortables .spf-field .spf-title {
593
- float: none;
594
- width: 100%;
595
- margin-bottom: 10px;
596
- }
597
-
598
- #side-sortables .spf-field .spf-fieldset {
599
- margin-left: 0;
600
- }
601
-
602
- #side-sortables .spf-notice {
603
- padding: 12px;
604
- }
605
-
606
- /**
607
- * 01. 13. Help Tooltip
608
- */
609
-
610
- .spf-tooltip {
611
- position: absolute;
612
- z-index: 5000001;
613
- font-size: 12px;
614
- line-height: 1.4;
615
- text-align: center;
616
- text-decoration: none;
617
- padding: 6px 12px;
618
- max-width: 200px;
619
- color: #fff;
620
- background-color: #000;
621
- background-color: rgba(0, 0, 0, 0.85);
622
- -moz-border-radius: 4px;
623
- -webkit-border-radius: 4px;
624
- border-radius: 4px;
625
- }
626
-
627
- /**
628
- * 02. Themes
629
- */
630
-
631
- /**
632
- * 02. 01. Theme Dark
633
- */
634
-
635
- .spf-theme-dark .spf-header-inner {
636
- background-color: #050505;
637
- }
638
-
639
- .spf-theme-dark .spf-header-inner h1 {
640
- color: #fff;
641
- }
642
-
643
- .spf-theme-dark .spf-header-inner h1 small {
644
- color: #555;
645
- }
646
-
647
- .spf-theme-dark .spf-expand-all {
648
- color: #999;
649
- background-color: #222;
650
- }
651
-
652
- .spf-theme-dark .spf-expand-all:hover {
653
- color: #fff;
654
- background-color: #333;
655
- }
656
-
657
- .spf-theme-dark .spf-search input {
658
- color: #fff;
659
- background-color: #222;
660
- }
661
-
662
- .spf-theme-dark .spf-search:focus {
663
- background-color: #444;
664
- }
665
-
666
- .spf-theme-dark .spf-search::-webkit-input-placeholder {
667
- color: #666;
668
- }
669
-
670
- .spf-theme-dark .spf-nav ul li a {
671
- color: #999;
672
- background-color: #222;
673
- border-bottom: 1px solid #2f2f2f;
674
- }
675
-
676
- .spf-theme-dark .spf-nav ul li a:hover {
677
- color: #fff;
678
- }
679
-
680
- .spf-theme-dark .spf-nav ul li .spf-section-active {
681
- color: #fff;
682
- background-color: #111;
683
- }
684
-
685
- .spf-theme-dark .spf-nav ul ul li a {
686
- background-color: #191919;
687
- border-bottom: 1px solid #2f2f2f;
688
- }
689
-
690
- .spf-theme-dark .spf-nav ul ul li .spf-section-active {
691
- background-color: #101010;
692
- }
693
-
694
- .spf-theme-dark .spf-nav ul ul:before {
695
- background-color: rgba(34, 34, 34, 0.75);
696
- }
697
-
698
- .spf-theme-dark .spf-nav>ul>li:last-child>a {
699
- border-bottom: none;
700
- }
701
-
702
- .spf-theme-dark .spf-nav-background {
703
- background-color: #222;
704
- }
705
-
706
- .spf-theme-dark .spf-footer {
707
- color: #555;
708
- background-color: #050505;
709
- }
710
-
711
- /**
712
- * 02. 02. Theme Light
713
- */
714
-
715
- .spf-theme-light .spf-container {
716
- border: 1px solid #e5e5e5;
717
- -moz-box-shadow: 0 0 15px rgba(0, 0, 0, 0.04);
718
- -webkit-box-shadow: 0 0 15px rgba(0, 0, 0, 0.04);
719
- box-shadow: 0 0 15px rgba(0, 0, 0, 0.04);
720
- }
721
-
722
- .spf-theme-light .spf-header-inner {
723
- border-bottom: 1px solid #cecece;
724
- background-color: #f5f5f5;
725
- background: linear-gradient(#fefefe, #f5f5f5);
726
- }
727
-
728
- .spf-theme-light .spf-header-inner h1 small {
729
- color: #999;
730
- }
731
-
732
- .spf-theme-light .spf-expand-all {
733
- color: #999;
734
- background-color: #fff;
735
- -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
736
- -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
737
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
738
- }
739
-
740
- .spf-theme-light .spf-expand-all:hover {
741
- color: #555;
742
- }
743
-
744
- .spf-theme-light .spf-search input {
745
- color: #555;
746
- background-color: #fff;
747
- -moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
748
- -webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
749
- box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
750
- }
751
-
752
- .spf-theme-light .spf-search input::-webkit-input-placeholder {
753
- color: #bbb;
754
- }
755
-
756
- .spf-theme-light .spf-nav {
757
- background: #f1f1f1;
758
- }
759
-
760
- .spf-theme-light .spf-nav ul li a {
761
- background-color: #178087;
762
- border-top: 1px solid #178087;
763
- border-right: 0px solid #E2E2E1;
764
- border-bottom: 1px solid #ddd;
765
- color: #fff;
766
- font-size: 12px;
767
- font-weight: 600;
768
- line-height: 1.4;
769
- padding: 14px 15px;
770
- text-transform: uppercase;
771
- }
772
- .sp_wpcp_shortcode_generator .spf-nav ul li a {
773
- border-right: 1px solid #E2E2E1;
774
- }
775
- .spf-theme-light .spf-nav ul li .spf-section-active {
776
- background-color: #fff;
777
- color: #000;
778
- }
779
-
780
- #sp_wpcp_shortcode_options .spf-theme-light .spf-nav ul li .spf-section-active {
781
- border-bottom: 1px solid #fff;
782
- border-top: 1px solid #178087;
783
- box-shadow: 0 3px 0 0 #178087 inset;
784
- }
785
-
786
- .sp-wpcp-options.spf-theme-light .spf-nav ul li a {
787
- background: #efefef;
788
- color: #000;
789
- border-bottom: 1px solid #cecece;
790
- border-top: 1px solid #cecece;
791
- }
792
-
793
- .sp-wpcp-options.spf-theme-light .spf-nav ul li a:first-child {
794
- border-top: 0px solid transparent;
795
- }
796
-
797
- #sp_wpcp_shortcode_options .spf-theme-light .spf-nav ul li .spf-section-active i,
798
- .sp-wpcp-options.spf-theme-light .spf-nav ul li .spf-section-active i {
799
- color: #178087;
800
- }
801
-
802
- .sp-wpcp-options.spf-theme-light .spf-nav ul li .spf-section-active {
803
- background-color: #fff;
804
- border-right: 0px solid #fff;
805
- border-bottom: 1px solid #cecece;
806
- border-top: 1px solid #fff;
807
- box-shadow: 4px 0 0 0 #178087 inset;
808
- }
809
- .spf-field.spf-field-notice.pro_notice {
810
- padding-top: 0;
811
- }
812
- .spf-theme-light .spf-nav ul li .spf-section-active:after {
813
- display: none;
814
- }
815
-
816
- .spf-theme-light .spf-nav ul ul li a {
817
- background-color: #eee;
818
- border-bottom: 1px solid #e5e5e5;
819
- }
820
-
821
- .spf-theme-light .spf-nav-background {
822
- background-color: #ddd;
823
- border-right: 1px solid #cecece;
824
- }
825
-
826
- .spf-theme-light .spf-footer {
827
- color: #555;
828
- border-top: 1px solid #e5e5e5;
829
- background-color: #f5f5f5;
830
- background: linear-gradient(#fafafa, #f5f5f5);
831
- }
832
-
833
- /**
834
- * 03. Fields
835
- */
836
-
837
- .spf-field {
838
- position: relative;
839
- padding: 22px 30px;
840
- }
841
- .spf-field.spf-field-carousel_type {
842
- padding-bottom: 0;
843
- }
844
-
845
- .spf-field p:first-child {
846
- margin-top: 0;
847
- }
848
-
849
- .spf-field p:last-child {
850
- margin-bottom: 0;
851
- }
852
-
853
- .spf-field:after,
854
- .spf-field:before {
855
- content: " ";
856
- display: table;
857
- }
858
-
859
- .spf-field:after {
860
- clear: both;
861
- }
862
-
863
- .spf-field h4 {
864
- margin-top: 0;
865
- }
866
-
867
- .spf-field .spf-title {
868
- position: relative;
869
- width: 20%;
870
- float: left;
871
- }
872
-
873
- .spf-field .spf-title h4 {
874
- margin: 0;
875
- color: #23282d;
876
- }
877
-
878
- .spf-field .spf-fieldset {
879
- margin-left: 25%;
880
- }
881
-
882
- .spf-pseudo-field {
883
- padding: 0 5px 0 0 !important;
884
- display: inline-block;
885
- }
886
-
887
- .spf-pseudo-field+.spf-pseudo-field {
888
- border: 0;
889
- }
890
-
891
- .spf-pseudo-field pre {
892
- display: none;
893
- }
894
-
895
- /**
896
- * 03. 02. Field: accordion
897
- */
898
-
899
- .spf-field-accordion .spf-field {
900
- padding: 20px;
901
- }
902
-
903
- .spf-field-accordion .spf-accordion-item {
904
- position: relative;
905
- margin-bottom: 5px;
906
- }
907
-
908
- .spf-field-accordion .spf-accordion-item h4 {
909
- font-size: 1em;
910
- }
911
-
912
- .spf-field-accordion .spf-accordion-title {
913
- display: block;
914
- cursor: pointer;
915
- position: relative;
916
- margin: 0;
917
- padding: 15px;
918
- min-height: 0;
919
- font-size: 100%;
920
- -webkit-user-select: none;
921
- user-select: none;
922
- border: 1px solid #e5e5e5;
923
- background-color: #fafafa;
924
- -moz-transition: border-color 0.15s;
925
- -o-transition: border-color 0.15s;
926
- -webkit-transition: border-color 0.15s;
927
- transition: border-color 0.15s;
928
- }
929
-
930
- .spf-field-accordion .spf-accordion-title:active,
931
- .spf-field-accordion .spf-accordion-title:hover,
932
- .spf-field-accordion .spf-accordion-title:focus {
933
- border: 1px solid #bbb;
934
- background-color: #fafafa;
935
- outline: none;
936
- }
937
-
938
- .spf-field-accordion .spf-accordion-icon {
939
- color: #aaa;
940
- width: 14px;
941
- text-align: center;
942
- }
943
-
944
- .spf-field-accordion .spf--icon {
945
- width: 18px;
946
- text-shadow: center;
947
- }
948
-
949
- .spf-field-accordion .spf-accordion-content {
950
- display: none;
951
- padding: 0;
952
- border: 1px solid #e5e5e5;
953
- border-top: none;
954
- background-color: #fff;
955
- }
956
-
957
- .spf-field-accordion .spf-accordion-open {
958
- display: block;
959
- }
960
-
961
- /**
962
- * 03. 03. Field: background
963
- */
964
-
965
- .spf-field-background_adv select,
966
- .spf-field-background select {
967
- width: 100%;
968
- }
969
-
970
- .spf-field-group .spf-field-background_adv .spf-field,
971
- .spf-field-background_adv .spf-field,
972
- .spf-field-background .spf-field {
973
- float: left;
974
- padding: 0;
975
- border: 0;
976
- }
977
-
978
- .spf-field-background_adv .spf--block,
979
- .spf-field-background .spf--block {
980
- float: left;
981
- margin-bottom: 15px;
982
- box-sizing: border-box;
983
- }
984
-
985
- .spf-field-background_adv .spf--title,
986
- .spf-field-background .spf--title {
987
- float: left;
988
- color: #999;
989
- margin-top: 3px;
990
- margin-right: 5px;
991
- }
992
-
993
- .spf-field-background_adv .spf--select,
994
- .spf-field-background .spf--select {
995
- width: 25%;
996
- padding-right: 10px;
997
- box-sizing: border-box;
998
- }
999
-
1000
- .spf-field-background_adv .spf--select .spf-field,
1001
- .spf-field-background .spf--select .spf-field {
1002
- width: 100%;
1003
- }
1004
-
1005
- .spf-field-background_adv .spf--media,
1006
- .spf-field-background .spf--media {
1007
- width: 100%;
1008
- padding-right: 10px;
1009
- }
1010
-
1011
- .spf-field-background_adv .spf--media .spf-field,
1012
- .spf-field-background .spf--media .spf-field {
1013
- width: 100%;
1014
- }
1015
-
1016
- /**
1017
- * Custom CSS
1018
- */
1019
-
1020
- .spf-field.spf-field-wp_editor.wpcp_carousel_content_source .spf-fieldset,
1021
- .spf-field.spf-field-background_adv.wpcp_carousel_content_bg .spf-fieldset {
1022
- margin-left: 0;
1023
- margin-top: 35px;
1024
- }
1025
-
1026
- .spf-field.spf-field-wp_editor.wpcp_carousel_content_source .spf-title,
1027
- .spf-field.spf-field-background_adv.wpcp_carousel_content_bg .spf-title {
1028
- width: 100%;
1029
- }
1030
-
1031
- .spf-field.spf-field-background_adv .spf--preview {
1032
- font-size: 16px;
1033
- line-height: 20px;
1034
- padding: 20px;
1035
- color: #222;
1036
- border: 1px solid #eee;
1037
- background-color: #fff;
1038
- height: 150px;
1039
- border-radius: 2.5px;
1040
- user-select: none;
1041
- -webkit-user-select: none;
1042
- transition: background-color .2s, border-color .2s;
1043
- }
1044
-
1045
- .spf-field.spf-field-background_adv .spf--block-preview {
1046
- cursor: pointer;
1047
- position: relative;
1048
- overflow: hidden;
1049
- margin-top: 10px;
1050
- width: 100%;
1051
- }
1052
-
1053
- .spf-field.spf-field-background_adv .spf--black-background {
1054
- border-color: #000;
1055
- background-color: #000;
1056
- }
1057
-
1058
- .spf-field.spf-field-background_adv .spf--toggle {
1059
- position: absolute;
1060
- top: 5px;
1061
- right: 10px;
1062
- color: #999;
1063
- }
1064
-
1065
- /**
1066
- * 03. 04. Field: backup
1067
- */
1068
-
1069
- .spf-field-backup textarea {
1070
- width: 100%;
1071
- min-height: 200px;
1072
- margin-bottom: 5px;
1073
- }
1074
-
1075
- .spf-field-backup small {
1076
- display: inline-block;
1077
- margin: 5px;
1078
- }
1079
-
1080
- .spf-field-backup hr {
1081
- margin: 20px 0;
1082
- border: none;
1083
- border-bottom: 1px solid #e5e5e5;
1084
- }
1085
-
1086
- /**
1087
- * 03. 05. Field: border, spacing, dimensions, column, dimensions_advanced
1088
- */
1089
-
1090
- .spf-field-border .spf--left,
1091
- .spf-field-spacing .spf--left,
1092
- .spf-field-column .spf--left,
1093
- .spf-field-dimensions .spf--left,
1094
- .spf-field-dimensions_advanced .spf--left {
1095
- float: left;
1096
- }
1097
-
1098
- .spf-field-border .spf--input,
1099
- .spf-field-spacing .spf--input,
1100
- .spf-field-column .spf--input,
1101
- .spf-field-dimensions .spf--input,
1102
- .spf-field-dimensions_advanced .spf--input {
1103
- float: left;
1104
- margin-right: 10px;
1105
- margin-bottom: 7px;
1106
- }
1107
-
1108
- .spf-field-border .spf--input select,
1109
- .spf-field-spacing .spf--input select,
1110
- .spf-field-column .spf--input select,
1111
- .spf-field-dimensions .spf--input select,
1112
- .spf-field-dimensions_advanced .spf--input select {
1113
- margin: 0;
1114
- line-height: 22px;
1115
- }
1116
-
1117
- .spf-field-border .spf--input input,
1118
- .spf-field-spacing .spf--input input,
1119
- .spf-field-column .spf--input input,
1120
- .spf-field-dimensions .spf--input input,
1121
- .spf-field-dimensions_advanced .spf--input input {
1122
- line-height: 26px;
1123
- float: left;
1124
- margin: 0;
1125
- padding: 0;
1126
- width: 65px;
1127
- max-width: 100%;
1128
- text-align: center;
1129
- }
1130
- .spf-field-column .spf--input input{
1131
- border-radius: 0 4px 4px 0;
1132
- }
1133
- .spf-field-spacing .spf--input input{
1134
- border-radius: 4px 0 0 4px;
1135
- }
1136
- .spf-field-border .spf--input input{
1137
- border-radius: 0;
1138
- }
1139
-
1140
- .spf-field-border .spf--label,
1141
- .spf-field-spacing .spf--label,
1142
- .spf-field-column .spf--label,
1143
- .spf-field-dimensions .spf--label,
1144
- .spf-field-dimensions_advanced .spf--label {
1145
- float: left;
1146
- max-width: 100%;
1147
- font-size: 12px;
1148
- line-height: 26px;
1149
- vertical-align: top;
1150
- text-align: center;
1151
- color: #555;
1152
- border: 1px solid #ddd;
1153
- background-color: #eee;
1154
- padding: 0 6px;
1155
- }
1156
-
1157
- .spf-field-border .spf--label-icon,
1158
- .spf-field-spacing .spf--label-icon,
1159
- .spf-field-column .spf--label-icon,
1160
- .spf-field-dimensions .spf--label-icon,
1161
- .spf-field-dimensions_advanced .spf--label-icon {
1162
- min-width: 20px;
1163
- border-right: 0;
1164
- border-radius: 4px 0 0 4px;
1165
- min-height: 28px;
1166
- line-height: 28px;
1167
- }
1168
-
1169
- .spf-field-border .spf--label-unit,
1170
- .spf-field-spacing .spf--label-unit,
1171
- .spf-field-column .spf--label-unit,
1172
- .spf-field-dimensions .spf--label-unit,
1173
- .spf-field-dimensions_advanced .spf--label-unit {
1174
- color: #999;
1175
- border-left: 0;
1176
- border-radius: 0 4px 4px 0;
1177
- min-height: 28px;
1178
- }
1179
-
1180
- /**
1181
- * 03. 06. Field: button_set
1182
- */
1183
-
1184
- .spf-field-button_set .spf--buttons {
1185
- display: inline-block;
1186
- }
1187
-
1188
- .spf-field-button_set .spf--button {
1189
- position: relative;
1190
- z-index: 1;
1191
- float: left;
1192
- cursor: pointer;
1193
- padding: 7px 14px;
1194
- min-width: 40px;
1195
- text-align: center;
1196
- color: #555;
1197
- border: 1px solid #cccccc;
1198
- background-color: #f7f7f7;
1199
- user-select: none;
1200
- -webkit-user-select: none;
1201
- box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
1202
- }
1203
-
1204
- .spf-field-button_set .spf--button:first-child {
1205
- border-radius: 4px 0 0 4px;
1206
- }
1207
-
1208
- .spf-field-button_set .spf--button:last-child {
1209
- border-radius: 0 4px 4px 0;
1210
- }
1211
-
1212
- .spf-field-button_set .spf--button:not(:first-child) {
1213
- margin-left: -1px;
1214
- }
1215
-
1216
- .spf-field-button_set .spf--button:hover {
1217
- background-color: #eee;
1218
- }
1219
-
1220
- .spf-field-button_set .spf--active:hover,
1221
- .spf-field-button_set .spf--active {
1222
- z-index: 2;
1223
- color: #fff;
1224
- border-color: #006799;
1225
- background-color: #0085ba;
1226
- }
1227
-
1228
- .spf-field-button_set input {
1229
- display: none;
1230
- }
1231
-
1232
- /**
1233
- * 03. 07. Field: checkbox, radio
1234
- */
1235
-
1236
- .spf-field-checkbox ul,
1237
- .spf-field-radio ul {
1238
- margin: 0;
1239
- padding: 0;
1240
- list-style-type: none;
1241
- overflow-y: auto;
1242
- max-height: 305px;
1243
- }
1244
-
1245
- .spf-field-checkbox .spf--inline-list li,
1246
- .spf-field-radio .spf--inline-list li {
1247
- display: inline-block;
1248
- margin-right: 15px;
1249
- }
1250
-
1251
- .spf-field-checkbox input[type="radio"]:checked:before,
1252
- .spf-field-radio input[type="radio"]:checked:before {
1253
- line-height: 10px;
1254
- }
1255
-
1256
- .spf-field-checkbox .spf-checker,
1257
- .spf-field-radio .spf-checker {
1258
- cursor: pointer;
1259
- }
1260
-
1261
- /**
1262
- * 03. 08. Field: code_editor
1263
- */
1264
-
1265
- .spf-field-code_editor .CodeMirror {
1266
- width: 100%;
1267
- height: 400px;
1268
- border: 1px solid #eee;
1269
- }
1270
-
1271
- .spf-field-code_editor textarea {
1272
- width: 100%;
1273
- height: 400px;
1274
- }
1275
-
1276
- /**
1277
- * 03. 09. Field: color
1278
- */
1279
-
1280
- .spf-field-color>input {
1281
- opacity: 0.75;
1282
- width: 115px;
1283
- max-width: 100%;
1284
- }
1285
-
1286
- /**
1287
- * 03. 10. Field: color_group
1288
- */
1289
-
1290
- .spf-field-color_group .spf--left {
1291
- float: left;
1292
- margin-right: 10px;
1293
- margin-bottom: 5px;
1294
- }
1295
-
1296
- .spf-field-color_group .spf--title {
1297
- color: #999;
1298
- margin-bottom: 5px;
1299
- }
1300
-
1301
- /**
1302
- * 03. 11. Field: fieldset
1303
- */
1304
-
1305
- .spf-field-fieldset .spf-fieldset-content {
1306
- border: 1px solid #eee;
1307
- background-color: #fff;
1308
- }
1309
-
1310
- .spf-field-fieldset .spf-field {
1311
- padding: 20px;
1312
- }
1313
-
1314
- /**
1315
- * 03. 12. Field: date
1316
- */
1317
-
1318
- .spf-field-date .spf--to {
1319
- margin-left: 7px;
1320
- }
1321
-
1322
- .spf-datepicker-wrapper {
1323
- margin-top: 5px;
1324
- width: auto;
1325
- background-color: #fff;
1326
- z-index: 9999999 !important;
1327
- -moz-box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
1328
- -webkit-box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
1329
- box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
1330
- }
1331
-
1332
- .spf-datepicker-wrapper * {
1333
- float: none;
1334
- margin: 0;
1335
- padding: 0;
1336
- font-family: inherit;
1337
- font-weight: normal;
1338
- font-style: normal;
1339
- text-decoration: none;
1340
- border: none;
1341
- background: none;
1342
- -moz-box-shadow: none;
1343
- -webkit-box-shadow: none;
1344
- box-shadow: none;
1345
- -moz-border-radius: none;
1346
- -webkit-border-radius: none;
1347
- border-radius: none;
1348
- }
1349
-
1350
- .spf-datepicker-wrapper .ui-widget-header,
1351
- .spf-datepicker-wrapper .ui-datepicker-header {
1352
- color: #fff;
1353
- background: #00a0d2;
1354
- }
1355
-
1356
- .spf-datepicker-wrapper .ui-datepicker-header .ui-state-hover {
1357
- cursor: pointer;
1358
- }
1359
-
1360
- .spf-datepicker-wrapper .ui-datepicker-title {
1361
- font-size: 14px;
1362
- line-height: 40px;
1363
- text-align: center;
1364
- }
1365
-
1366
- .spf-datepicker-wrapper .ui-datepicker-prev,
1367
- .spf-datepicker-wrapper .ui-datepicker-next {
1368
- position: static;
1369
- top: auto;
1370
- left: auto;
1371
- right: auto;
1372
- font-family: "FontAwesome";
1373
- font-size: 12px;
1374
- text-align: center;
1375
- width: 41px;
1376
- height: 40px;
1377
- line-height: 40px;
1378
- color: #fff;
1379
- background-color: rgba(255, 255, 255, 0.1);
1380
- text-rendering: auto;
1381
- -webkit-font-smoothing: antialiased;
1382
- -moz-osx-font-smoothing: grayscale;
1383
- }
1384
-
1385
- .spf-datepicker-wrapper .ui-datepicker-next span,
1386
- .spf-datepicker-wrapper .ui-datepicker-prev span {
1387
- display: none;
1388
- }
1389
-
1390
- .spf-datepicker-wrapper .ui-datepicker-prev {
1391
- float: left;
1392
- }
1393
-
1394
- .spf-datepicker-wrapper .ui-datepicker-next {
1395
- float: right;
1396
- }
1397
-
1398
- .spf-datepicker-wrapper .ui-datepicker-prev:before {
1399
- content: '\f053';
1400
- }
1401
-
1402
- .spf-datepicker-wrapper .ui-datepicker-next:before {
1403
- content: '\f054';
1404
- }
1405
-
1406
- .spf-datepicker-wrapper .ui-datepicker-prev-hover,
1407
- .spf-datepicker-wrapper .ui-datepicker-next-hover {
1408
- opacity: 0.75;
1409
- }
1410
-
1411
- .spf-datepicker-wrapper tbody .ui-datepicker-week-col {
1412
- background-color: #f7f7f7;
1413
- }
1414
-
1415
- .spf-datepicker-wrapper .ui-datepicker-buttonpane {
1416
- padding: 10px;
1417
- text-align: center;
1418
- background-color: #f7f7f7;
1419
- }
1420
-
1421
- .spf-datepicker-wrapper .ui-datepicker-buttonpane button {
1422
- cursor: pointer;
1423
- margin: 0 5px;
1424
- padding: 7px 14px;
1425
- border: 1px solid #eee;
1426
- background-color: #fff;
1427
- }
1428
-
1429
- .spf-datepicker-wrapper select {
1430
- margin: 0 4px;
1431
- color: #fff;
1432
- border: 1px solid rgba(255, 255, 255, 0.5);
1433
- }
1434
-
1435
- .spf-datepicker-wrapper select option {
1436
- color: #555;
1437
- }
1438
-
1439
- .spf-datepicker-wrapper table {
1440
- font-size: 13px;
1441
- border-collapse: collapse;
1442
- width: 100%;
1443
- }
1444
-
1445
- .spf-datepicker-wrapper thead {
1446
- color: #fff;
1447
- background: #32373c;
1448
- }
1449
-
1450
- .spf-datepicker-wrapper th {
1451
- text-align: center;
1452
- padding: 7px;
1453
- border: 1px solid #444;
1454
- }
1455
-
1456
- .spf-datepicker-wrapper td {
1457
- text-align: center;
1458
- border: 1px solid #f4f4f4;
1459
- }
1460
-
1461
- .spf-datepicker-wrapper td.ui-datepicker-other-month {
1462
- border: transparent;
1463
- }
1464
-
1465
- .spf-datepicker-wrapper td .ui-state-default {
1466
- color: #555;
1467
- width: auto;
1468
- display: block;
1469
- padding: 6px 12px;
1470
- }
1471
-
1472
- .spf-datepicker-wrapper td .ui-state-active,
1473
- .spf-datepicker-wrapper td .ui-state-hover {
1474
- color: #fff;
1475
- background-color: #0073aa;
1476
- }
1477
-
1478
- .spf-datepicker-wrapper td.ui-state-disabled .ui-state-default {
1479
- opacity: 0.5;
1480
- }
1481
-
1482
- /**
1483
- * 03. 13. Field: gallery
1484
- */
1485
-
1486
- .spf-field-gallery input {
1487
- display: none;
1488
- }
1489
-
1490
- .spf-field-gallery ul {
1491
- margin: 0;
1492
- padding: 0;
1493
- list-style-type: none;
1494
- }
1495
-
1496
- .spf-field-gallery ul.sp-gallery-images li {
1497
- display: inline-block;
1498
- position: relative;
1499
- padding: 4px;
1500
- margin: 0 5px 10px 0;
1501
- border: 1px solid #ccc;
1502
- background-color: #f9f9f9;
1503
- -moz-border-radius: 2px;
1504
- -webkit-border-radius: 2px;
1505
- border-radius: 2px;
1506
- -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1507
- -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1508
- box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1509
- }
1510
-
1511
- .spf-field-gallery ul.sp-gallery-images li img {
1512
- max-height: 100px;
1513
- display: inline-block;
1514
- vertical-align: middle;
1515
- }
1516
-
1517
- .spf-field-gallery .button:focus,
1518
- .spf-field-gallery .button:hover,
1519
- .spf-field-gallery .button {
1520
- margin-right: 5px;
1521
- margin-bottom: 5px;
1522
- /* SP Style */
1523
- width: 110px;
1524
- height: 110px;
1525
- text-align: center;
1526
- line-height: 15px;
1527
- color: #fff;
1528
- border: none;
1529
- border-radius: 2px;
1530
- display: flex;
1531
- justify-content: center;
1532
- flex-direction: column;
1533
- font-weight: 600;
1534
- }
1535
-
1536
- .spf-field-gallery .button-primary.spf-button {
1537
- background: #4eb631;
1538
- box-shadow: none;
1539
- text-shadow: none;
1540
- }
1541
-
1542
- .spf-field-gallery .button.spf-edit-gallery {
1543
- background: #6a7885;
1544
- }
1545
-
1546
- .spf-field-gallery .button i {
1547
- font-size: 24px;
1548
- margin-bottom: 10px;
1549
- }
1550
-
1551
- .spf-field-gallery a,
1552
- .spf-field-gallery li {
1553
- float: left;
1554
- }
1555
-
1556
- /**
1557
- * 03. 14. Field: group
1558
- */
1559
-
1560
- .spf-field-group .spf-field {
1561
- padding: 20px;
1562
- }
1563
-
1564
- .spf-field-group .spf-cloneable-hidden {
1565
- display: none !important;
1566
- }
1567
-
1568
- .spf-field-group .spf-cloneable-wrapper {
1569
- position: relative;
1570
- }
1571
-
1572
- .spf-field-group .spf-cloneable-item {
1573
- display: none;
1574
- position: relative;
1575
- margin-bottom: 5px;
1576
- }
1577
-
1578
- .spf-field-group .spf-cloneable-item h4 {
1579
- font-size: 1em;
1580
- }
1581
-
1582
- .spf-field-group .ui-accordion .spf-cloneable-item {
1583
- display: block;
1584
- }
1585
-
1586
- .spf-field-group .spf-cloneable-content {
1587
- border: 1px solid #e5e5e5;
1588
- background: #fff;
1589
- }
1590
-
1591
- .spf-field-group .spf-cloneable-title {
1592
- display: block;
1593
- cursor: pointer;
1594
- position: relative;
1595
- margin: 0;
1596
- padding: 15px 65px 15px 10px;
1597
- min-height: 0;
1598
- font-size: 100%;
1599
- border: 1px solid #e5e5e5;
1600
- background: #fafafa;
1601
- -webkit-user-select: none;
1602
- user-select: none;
1603
- -moz-transition: border-color 0.15s;
1604
- -o-transition: border-color 0.15s;
1605
- -webkit-transition: border-color 0.15s;
1606
- transition: border-color 0.15s;
1607
- }
1608
-
1609
- .spf-field-group .spf-cloneable-title:active,
1610
- .spf-field-group .spf-cloneable-title:hover,
1611
- .spf-field-group .spf-cloneable-title:focus {
1612
- border: 1px solid #bbb;
1613
- background: #fafafa;
1614
- outline: none;
1615
- }
1616
-
1617
- .spf-field-group .spf-cloneable-helper {
1618
- position: absolute;
1619
- top: 12px;
1620
- right: 10px;
1621
- z-index: 1;
1622
- font-size: 14px;
1623
- line-height: 1em;
1624
- }
1625
-
1626
- .spf-field-group .spf-cloneable-helper i {
1627
- display: inline-block;
1628
- cursor: pointer;
1629
- padding: 5px;
1630
- color: #999;
1631
- }
1632
-
1633
- .spf-field-group .spf-cloneable-helper i:hover {
1634
- color: #555;
1635
- }
1636
-
1637
- .spf-field-group .spf-cloneable-content {
1638
- padding: 0;
1639
- border-top: 0;
1640
- }
1641
-
1642
- .spf-field-group .spf-cloneable-title-prefix,
1643
- .spf-field-group .spf-cloneable-title-number {
1644
- margin-right: 5px;
1645
- }
1646
-
1647
- .spf-field-group .spf-cloneable-alert {
1648
- display: none;
1649
- margin-bottom: 5px;
1650
- padding: 10px 20px;
1651
- color: #a94442;
1652
- border: 1px solid #ebccd1;
1653
- background-color: #f2dede;
1654
- }
1655
-
1656
- .spf-field-group .widget-placeholder {
1657
- margin-bottom: 10px;
1658
- border: 1px dashed #f1c40f;
1659
- background-color: #fffae4;
1660
- }
1661
-
1662
- .spf-field-group .spf-cloneable-header-icon {
1663
- display: inline-block;
1664
- text-align: center;
1665
- font-size: 14px;
1666
- width: 17px;
1667
- color: #aaa;
1668
- text-indent: 0;
1669
- vertical-align: text-top;
1670
- }
1671
-
1672
- .spf-field-group .spf-cloneable-placeholder {
1673
- background-color: #ddd;
1674
- margin-top: 4px;
1675
- width: 100px;
1676
- height: 10px;
1677
- font-size: 10px;
1678
- line-height: 10px;
1679
- display: inline-block;
1680
- vertical-align: top;
1681
- border-radius: 2px;
1682
- }
1683
-
1684
- /**
1685
- * 03. 15. Field: icon
1686
- */
1687
-
1688
- .spf-field-icon input {
1689
- display: none;
1690
- }
1691
-
1692
- .spf-field-icon .button {
1693
- margin-right: 5px;
1694
- }
1695
-
1696
- .spf-field-icon .spf-icon-preview i {
1697
- display: inline-block;
1698
- font-size: 14px;
1699
- width: 30px;
1700
- height: 26px;
1701
- line-height: 26px;
1702
- margin-right: 5px;
1703
- text-align: center;
1704
- vertical-align: top;
1705
- color: #555;
1706
- border: 1px solid #ccc;
1707
- background-color: #f7f7f7;
1708
- -moz-border-radius: 3px;
1709
- -webkit-border-radius: 3px;
1710
- border-radius: 3px;
1711
- -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1712
- -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1713
- box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1714
- -moz-box-sizing: content-box;
1715
- -webkit-box-sizing: content-box;
1716
- box-sizing: content-box;
1717
- }
1718
-
1719
- /**
1720
- * 03. 16. Field: image_select
1721
- */
1722
-
1723
-
1724
-
1725
- .spf-field-image_select .spf--image{
1726
- cursor: pointer;
1727
- position: relative;
1728
- display: inline-block;
1729
- max-width: 100%;
1730
- margin: 0 15px 5px 0;
1731
- vertical-align: bottom;
1732
- outline: 2px solid transparent;
1733
- background-color: #fff;
1734
- user-select: none;
1735
- -webkit-user-select: none;
1736
- -moz-transition: all 0.2s;
1737
- -o-transition: all 0.2s;
1738
- -webkit-transition: all 0.2s;
1739
- transition: all 0.2s;
1740
- outline-offset: -2px;
1741
- }
1742
-
1743
-
1744
- .spf-field-image_select .spf--image:before {
1745
- position: absolute;
1746
- top: 0;
1747
- left: 0;
1748
- text-align: center;
1749
- font-size: 11px;
1750
- font-family: FontAwesome;
1751
- content: "\f00c";
1752
- width: 15px;
1753
- height: 15px;
1754
- line-height: 15px;
1755
- opacity: 0;
1756
- color: #fff;
1757
- background-color:#1EA4B0;
1758
- transition: opacity .2s;
1759
- }
1760
-
1761
- .spf-field-image_select .spf--image.spf--active:before {
1762
- opacity: 1;
1763
- }
1764
-
1765
- .spf-field-image_select .spf--active img {
1766
- outline-color: #1EA4B0;
1767
-
1768
- }
1769
- .spf-field-image_select input {
1770
- display: none;
1771
- }
1772
-
1773
- .spf-field-image_select .spf--image img {
1774
- color: #7b8898;
1775
- outline: solid 3px transparent;
1776
- border-radius: 2px;
1777
- cursor: pointer;
1778
- text-align: center;
1779
- width: 80px;
1780
- outline-offset: -3px;
1781
- }
1782
-
1783
- .spf-field-image_select .spf--image img {
1784
- max-width: 100%;
1785
- }
1786
-
1787
- .spf-field-image_select span {
1788
- margin-top: 5px;
1789
- font-weight: 500;
1790
- text-align: center;
1791
- margin-right: 10px;
1792
- display: block;
1793
- font-size: 12px;
1794
- text-transform: capitalize;
1795
-
1796
- }
1797
-
1798
- .spf-field-image_select .spf--image.spf--active img {
1799
- outline-color: #1EA4B0;
1800
- }
1801
-
1802
- /* Carousel Type */
1803
-
1804
- .spf-field-carousel_type .spf--image {
1805
- cursor: pointer;
1806
- position: relative;
1807
- display: inline-block;
1808
- max-width: 100%;
1809
- margin: 0 5px 5px 0;
1810
- vertical-align: bottom;
1811
- border: 2px solid transparent;
1812
- background-color: #fff;
1813
- user-select: none;
1814
- -webkit-user-select: none;
1815
- -moz-transition: all 0.2s;
1816
- -o-transition: all 0.2s;
1817
- -webkit-transition: all 0.2s;
1818
- transition: all 0.2s;
1819
- }
1820
-
1821
-
1822
- .spf-field-carousel_type input {
1823
- display: none;
1824
- }
1825
-
1826
- .spf-field-carousel_type .spf--image {
1827
- background: #e8ecef;
1828
- color: #7b8898;
1829
- margin-right: 10px;
1830
- border: solid 3px #e8ecef;
1831
- border-radius: 2px;
1832
- cursor: pointer;
1833
- text-align: center;
1834
- width: 120px;
1835
- height: 80px;
1836
- box-shadow: inset 0 0 0px 3px #fff;
1837
- }
1838
-
1839
- .spf-field-carousel_type i {
1840
- font-size: 30px;
1841
- width: 32px;
1842
- height: 30px;
1843
- margin-top: 15px;
1844
- }
1845
-
1846
- .spf-field-carousel_type p {
1847
- margin-top: 5px;
1848
- font-weight: 500;
1849
- }
1850
-
1851
- .spf-field-carousel_type .spf--image.spf--active {
1852
- border-color: #1EA4B0;
1853
- }
1854
-
1855
- /**
1856
- * 03. 17. Field: link_color
1857
- */
1858
-
1859
- .spf-field-link_color .spf--left {
1860
- float: left;
1861
- margin-right: 10px;
1862
- margin-bottom: 5px;
1863
- }
1864
-
1865
- .spf-field-link_color .spf--title {
1866
- color: #999;
1867
- margin-bottom: 5px;
1868
- }
1869
-
1870
- /**
1871
- * 03. 18. Field: media
1872
- */
1873
-
1874
- .spf-field-media .spf--placeholder {
1875
- margin-bottom: 10px;
1876
- display: flex;
1877
- }
1878
-
1879
- .spf-field-media .spf--placeholder input {
1880
- width: 100%;
1881
- }
1882
-
1883
- .spf-field-media .button {
1884
- margin-left: 7px;
1885
- }
1886
-
1887
- .spf-field-media .hidden+.button {
1888
- margin-left: 0;
1889
- }
1890
-
1891
- .spf-field-media .spf--preview {
1892
- position: relative;
1893
- }
1894
-
1895
- .spf-field-media .spf--preview .fa-times {
1896
- position: absolute;
1897
- z-index: 1;
1898
- right: 4px;
1899
- top: 4px;
1900
- font-size: 14px;
1901
- width: 22px;
1902
- height: 22px;
1903
- line-height: 22px;
1904
- text-align: center;
1905
- text-decoration: none;
1906
- color: #fff;
1907
- background-color: #dd3333;
1908
- opacity: 0.8;
1909
- transition: all .2s;
1910
- }
1911
-
1912
- .spf-field-media .spf--preview .fa-times:hover {
1913
- opacity: 1;
1914
- }
1915
-
1916
- .spf-field-media .spf--preview .fa-times:focus {
1917
- box-shadow: none;
1918
- }
1919
-
1920
- /**
1921
- * 03. 19. Field: palette
1922
- */
1923
-
1924
- .spf-field-palette .spf--palette {
1925
- position: relative;
1926
- display: inline-block;
1927
- cursor: pointer;
1928
- border: 2px solid #ddd;
1929
- margin-right: 10px;
1930
- margin-bottom: 10px;
1931
- user-select: none;
1932
- -webkit-user-select: none;
1933
- transition: all .2s;
1934
- }
1935
-
1936
- .spf-field-palette .spf--palette span {
1937
- vertical-align: middle;
1938
- display: inline-block;
1939
- width: 22px;
1940
- height: 60px;
1941
- line-height: 60px;
1942
- overflow: hidden;
1943
- text-indent: -999px;
1944
- }
1945
-
1946
- .spf-field-palette .spf--palette:before {
1947
- position: absolute;
1948
- top: 0;
1949
- left: 0;
1950
- text-align: center;
1951
- font-size: 11px;
1952
- font-family: FontAwesome;
1953
- content: "\f00c";
1954
- width: 15px;
1955
- height: 15px;
1956
- line-height: 15px;
1957
- opacity: 0;
1958
- color: #fff;
1959
- background-color: #222;
1960
- transition: opacity .2s;
1961
- }
1962
-
1963
- .spf-field-palette .spf--active {
1964
- border-color: #222;
1965
- box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
1966
- }
1967
-
1968
- .spf-field-palette .spf--active:before {
1969
- opacity: 1;
1970
- }
1971
-
1972
- .spf-field-palette input {
1973
- display: none;
1974
- }
1975
-
1976
- /**
1977
- * 03. 20. Field: repeater
1978
- */
1979
-
1980
- .spf-field-repeater .spf-field {
1981
- padding: 10px;
1982
- }
1983
-
1984
- .spf-field-repeater .spf-field-text input {
1985
- width: 100%;
1986
- }
1987
-
1988
- .spf-field-repeater .spf-repeater-hidden {
1989
- display: none !important;
1990
- }
1991
-
1992
- .spf-field-repeater .spf-repeater-wrapper .spf-repeater-item {
1993
- display: table;
1994
- width: 100%;
1995
- margin-bottom: 5px;
1996
- border: 1px solid #eee;
1997
- }
1998
-
1999
- .spf-field-repeater .spf-repeater-wrapper .spf-repeater-item h4 {
2000
- font-size: 1em;
2001
- }
2002
-
2003
- .spf-field-repeater .spf-repeater-content {
2004
- width: 100%;
2005
- display: table-cell;
2006
- vertical-align: middle;
2007
- background-color: #fff;
2008
- }
2009
-
2010
- .spf-field-repeater .spf-repeater-helper {
2011
- width: 100%;
2012
- display: table-cell;
2013
- vertical-align: middle;
2014
- text-align: center;
2015
- font-size: 14px;
2016
- line-height: 1em;
2017
- border-left: 1px solid #eee;
2018
- background-color: #f7f7f7;
2019
- }
2020
-
2021
- .spf-field-repeater .spf-repeater-helper i {
2022
- display: inline-block;
2023
- cursor: pointer;
2024
- color: #999;
2025
- padding: 5px;
2026
- }
2027
-
2028
- .spf-field-repeater .spf-repeater-helper i:hover {
2029
- color: #555;
2030
- }
2031
-
2032
- .spf-field-repeater .spf-repeater-helper-inner {
2033
- width: 75px;
2034
- }
2035
-
2036
- .spf-field-repeater .spf-repeater-alert {
2037
- display: none;
2038
- margin-bottom: 5px;
2039
- padding: 10px 20px;
2040
- color: #a94442;
2041
- border: 1px solid #ebccd1;
2042
- background-color: #f2dede;
2043
- }
2044
-
2045
- .spf-field-repeater .widget-placeholder {
2046
- height: 50px;
2047
- margin-bottom: 3px;
2048
- border: 1px dashed #f1c40f;
2049
- background-color: #fffae4;
2050
- }
2051
-
2052
- .spf-field-repeater .ui-sortable-helper {
2053
- height: 50px !important;
2054
- overflow: hidden !important;
2055
- border-color: #ccc !important;
2056
- background-color: #eee !important;
2057
- opacity: 0.5;
2058
- }
2059
-
2060
- .spf-field-repeater .ui-sortable-helper .spf-repeater-helper,
2061
- .spf-field-repeater .ui-sortable-helper .spf-repeater-content {
2062
- display: none;
2063
- }
2064
-
2065
- /**
2066
- * 03. 21. Field: select
2067
- */
2068
-
2069
- .spf-field-select select {
2070
- max-width: 100%;
2071
- }
2072
-
2073
- /**
2074
- * 03. 22. Field: slider
2075
- */
2076
-
2077
- .spf-field-slider em {
2078
- padding-left: 5px;
2079
- color: #aaa;
2080
- }
2081
-
2082
- .spf-field-slider input[type="text"] {
2083
- width: 45px;
2084
- margin-left: 15px;
2085
- text-align: center;
2086
- }
2087
-
2088
- .spf-field-slider .ui-slider {
2089
- position: relative;
2090
- width: 100%;
2091
- height: 4px;
2092
- border: none;
2093
- background: #ddd;
2094
- border-radius: 2px;
2095
- }
2096
-
2097
- .spf-field-slider .ui-slider-range {
2098
- height: 4px;
2099
- border: none;
2100
- background: #222;
2101
- border-radius: 2px;
2102
- }
2103
-
2104
- .spf-field-slider .ui-slider-handle {
2105
- position: absolute;
2106
- width: 18px;
2107
- height: 18px;
2108
- top: -7px;
2109
- margin-left: -8px;
2110
- border: none;
2111
- background: #222;
2112
- border-radius: 2px;
2113
- }
2114
-
2115
- .spf-field-slider .ui-state-active,
2116
- .spf-field-slider .ui-slider-handle:hover {
2117
- cursor: pointer;
2118
- background: #444;
2119
- }
2120
-
2121
- /**
2122
- * 03. 23. Field: sortable
2123
- */
2124
-
2125
- .spf-field-sortable .spf-field {
2126
- padding: 10px;
2127
- }
2128
-
2129
- .spf-field-sortable .spf-field-text input {
2130
- width: 100%;
2131
- max-width: 100%;
2132
- }
2133
-
2134
- .spf-field-sortable .spf--sortable .spf--sortable-item {
2135
- display: table;
2136
- width: 100%;
2137
- margin-bottom: 5px;
2138
- border: 1px solid #eee;
2139
- }
2140
-
2141
- .spf-field-sortable .spf--sortable .spf--sortable-item h4 {
2142
- font-size: 1em;
2143
- }
2144
-
2145
- .spf-field-sortable .spf--sortable-content {
2146
- width: 100%;
2147
- display: table-cell;
2148
- vertical-align: middle;
2149
- background-color: #fff;
2150
- }
2151
-
2152
- .spf-field-sortable .spf--sortable-helper {
2153
- width: 100%;
2154
- display: table-cell;
2155
- vertical-align: middle;
2156
- text-align: center;
2157
- font-size: 14px;
2158
- line-height: 1em;
2159
- border-left: 1px solid #eee;
2160
- background-color: #f7f7f7;
2161
- }
2162
-
2163
- .spf-field-sortable .spf--sortable-helper .fa {
2164
- display: inline-block;
2165
- cursor: pointer;
2166
- width: 50px;
2167
- color: #555;
2168
- }
2169
-
2170
- .spf-field-sortable .spf--sortable-helper .fa:hover {
2171
- opacity: 0.5;
2172
- }
2173
-
2174
- .spf-field-sortable .widget-placeholder {
2175
- height: 50px;
2176
- margin-bottom: 3px;
2177
- border: 1px dashed #f1c40f;
2178
- background-color: #fffae4;
2179
- }
2180
-
2181
- .spf-field-sortable .ui-sortable-helper {
2182
- height: 50px !important;
2183
- overflow: hidden !important;
2184
- border-color: #ccc !important;
2185
- background-color: #eee !important;
2186
- opacity: 0.5;
2187
- }
2188
-
2189
- .spf-field-sortable .ui-sortable-helper .spf--sortable-helper,
2190
- .spf-field-sortable .ui-sortable-helper .spf--sortable-content {
2191
- display: none;
2192
- }
2193
-
2194
- /**
2195
- * 03. 24. Field: sorter
2196
- */
2197
-
2198
- .spf-field-sorter .ui-sortable-placeholder {
2199
- height: 20px;
2200
- border: 1px dashed #f1c40f;
2201
- background-color: #fffae4;
2202
- }
2203
-
2204
- .spf-field-sorter .spf-modules {
2205
- float: left;
2206
- width: 50%;
2207
- box-sizing: border-box;
2208
- }
2209
-
2210
- .spf-field-sorter .spf-modules:first-child {
2211
- padding-right: 15px;
2212
- }
2213
-
2214
- .spf-field-sorter .spf-modules:last-child {
2215
- padding-left: 15px;
2216
- }
2217
-
2218
- .spf-field-sorter .spf-disabled,
2219
- .spf-field-sorter .spf-enabled {
2220
- padding: 5px 15px;
2221
- border: 1px dashed #ddd;
2222
- background-color: #fff;
2223
- }
2224
-
2225
- .spf-field-sorter .spf-disabled li {
2226
- -moz-transition: opacity 0.15s;
2227
- -o-transition: opacity 0.15s;
2228
- -webkit-transition: opacity 0.15s;
2229
- transition: opacity 0.15s;
2230
- opacity: 0.5;
2231
- }
2232
-
2233
- .spf-field-sorter .spf-disabled .ui-sortable-helper {
2234
- opacity: 1;
2235
- }
2236
-
2237
- .spf-field-sorter .spf-sorter-title {
2238
- font-size: 13px;
2239
- font-weight: 600;
2240
- padding: 10px;
2241
- text-align: center;
2242
- border: 1px dashed #ddd;
2243
- border-bottom: none;
2244
- background-color: #f8f8f8;
2245
- text-transform: uppercase;
2246
- }
2247
-
2248
- .spf-field-sorter ul {
2249
- list-style-type: none;
2250
- margin: 0;
2251
- padding: 0;
2252
- min-height: 62px;
2253
- }
2254
-
2255
- .spf-field-sorter ul li {
2256
- margin: 10px 0;
2257
- padding: 10px 15px;
2258
- cursor: move;
2259
- font-weight: bold;
2260
- text-align: center;
2261
- border: 1px solid #e5e5e5;
2262
- background-color: #fafafa;
2263
- -moz-transition: border-color 0.15s;
2264
- -o-transition: border-color 0.15s;
2265
- -webkit-transition: border-color 0.15s;
2266
- transition: border-color 0.15s;
2267
- }
2268
-
2269
- .spf-field-sorter ul li:hover {
2270
- border-color: #bbb;
2271
- }
2272
-
2273
- /**
2274
- * 03. 25. Field: spinner
2275
- */
2276
-
2277
- .spf-field-spinner .spf--spin {
2278
- float: left;
2279
- }
2280
-
2281
- .spf-field-spinner .spf--unit {
2282
- float: right;
2283
- height: 30px;
2284
- line-height: 26px;
2285
- text-align: center;
2286
- border-left: none;
2287
- color: #999;
2288
- border: 1px solid #ddd;
2289
- border-left: 0;
2290
- background-color: #eee;
2291
- padding: 0 6px;
2292
- margin: 0;
2293
- box-sizing: border-box;
2294
- }
2295
-
2296
- .spf-field-spinner .ui-spinner-button {
2297
- cursor: pointer;
2298
- position: relative;
2299
- overflow: hidden;
2300
- margin: 0;
2301
- padding: 0;
2302
- width: 30px;
2303
- height: 30px;
2304
- line-height: 30px;
2305
- text-align: center;
2306
- border: 1px solid #ddd;
2307
- color: #555;
2308
- background-color: #eee;
2309
- box-sizing: border-box;
2310
- }
2311
-
2312
- .spf-field-spinner .ui-spinner-button:hover {
2313
- background-color: #e7e7e7;
2314
- }
2315
-
2316
- .spf-field-spinner .ui-spinner-button:active {
2317
- background-color: #ddd;
2318
- }
2319
-
2320
- .spf-field-spinner .ui-spinner-button:before {
2321
- font-family: FontAwesome;
2322
- font-size: 16px;
2323
- line-height: 16px;
2324
- }
2325
-
2326
- .spf-field-spinner .ui-spinner-down {
2327
- float: left;
2328
- border-right: 0;
2329
- border-radius: 2px 0 0 2px;
2330
- }
2331
-
2332
- .spf-field-spinner .ui-spinner-down:before {
2333
- content: "\f0d9";
2334
- }
2335
-
2336
- .spf-field-spinner .ui-spinner-up {
2337
- float: right;
2338
- border-left: 0;
2339
- border-radius: 0 2px 2px 0;
2340
- }
2341
-
2342
- .spf-field-spinner .ui-spinner-up:before {
2343
- content: "\f0da";
2344
- }
2345
-
2346
- .spf-field-spinner input {
2347
- width: 50px;
2348
- text-align: center;
2349
- margin: 0;
2350
- padding: 0 8px;
2351
- height: 30px;
2352
- line-height: 30px;
2353
- border: 1px solid #ddd;
2354
- }
2355
-
2356
- .spf-field-spinner input:focus {
2357
- outline: none;
2358
- }
2359
-
2360
- .spf-field-spinner .ui-button-text {
2361
- display: none;
2362
- }
2363
-
2364
- /**
2365
- * 03. 26. Field: switcher, switcherf
2366
- */
2367
-
2368
- .spf-field-switcher .spf--switcher,
2369
- .spf-field-switcherf .spf--switcher {
2370
- float: left;
2371
- cursor: pointer;
2372
- position: relative;
2373
- width: 60px;
2374
- height: 26px;
2375
- padding: 0;
2376
- margin: 0;
2377
- overflow: hidden;
2378
- border-radius: 4px;
2379
- background-color: #ed6f6f;
2380
- user-select: none;
2381
- -webkit-user-select: none;
2382
- }
2383
-
2384
- .spf-field-switcherf .spf--ball,
2385
- .spf-field-switcher .spf--ball {
2386
- position: absolute;
2387
- top: 4px;
2388
- left: 4px;
2389
- width: 24px;
2390
- height: 18px;
2391
- background-color: #fff;
2392
- border-radius: 4px;
2393
- transition: all .1s;
2394
- box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15);
2395
- }
2396
-
2397
- .spf-field-switcherf .spf--on,
2398
- .spf-field-switcherf .spf--off,
2399
- .spf-field-switcher .spf--on,
2400
- .spf-field-switcher .spf--off {
2401
- position: absolute;
2402
- top: 0;
2403
- left: 0;
2404
- right: 0;
2405
- font-size: 11px;
2406
- line-height: 26px;
2407
- font-weight: 500;
2408
- font-style: normal;
2409
- text-align: center;
2410
- text-transform: uppercase;
2411
- color: #fff;
2412
- padding-right: 28px;
2413
- opacity: 0;
2414
- transition: all .1s;
2415
- }
2416
-
2417
- .spf-field-switcherf .spf--off,
2418
- .spf-field-switcher .spf--off {
2419
- padding-right: 0;
2420
- padding-left: 28px;
2421
- opacity: 1;
2422
- }
2423
-
2424
- /* .spf-field-switcherf .spf--active, */
2425
- .spf-field-switcher .spf--active {
2426
- background: #4fb845;
2427
- }
2428
-
2429
- .spf-field-switcherf .spf--active .spf--on,
2430
- .spf-field-switcher .spf--active .spf--on {
2431
- opacity: 1;
2432
- }
2433
-
2434
- .spf-field-switcherf .spf--active .spf--off,
2435
- .spf-field-switcher .spf--active .spf--off {
2436
- opacity: 0;
2437
- }
2438
-
2439
- .spf-field-switcherf .spf--active .spf--ball,
2440
- .spf-field-switcher .spf--active .spf--ball {
2441
- left: 100%;
2442
- margin-left: -28px;
2443
- }
2444
-
2445
- .spf-field-switcherf .spf--label,
2446
- .spf-field-switcher .spf--label {
2447
- float: left;
2448
- margin-top: 4px;
2449
- margin-left: 8px;
2450
- font-weight: 400;
2451
- color: #999;
2452
- }
2453
-
2454
- .spf-field-switcherf input,
2455
- .spf-field-switcher input {
2456
- display: none;
2457
- }
2458
-
2459
- /**
2460
- * 03. 27. Field: tabbed
2461
- */
2462
-
2463
- .spf-field-tabbed .spf-tabbed-section {
2464
- border: 1px solid #eee;
2465
- background: #fff;
2466
- }
2467
-
2468
- .spf-field-tabbed .spf-tabbed-nav .spf--icon {
2469
- padding-right: 5px;
2470
- }
2471
-
2472
- .spf-field-tabbed .spf-tabbed-nav a {
2473
- display: inline-block;
2474
- padding: 12px 15px;
2475
- margin-top: 1px;
2476
- margin-right: 5px;
2477
- margin-bottom: -1px;
2478
- position: relative;
2479
- text-decoration: none;
2480
- color: #444;
2481
- font-weight: 600;
2482
- background-color: #f3f3f3;
2483
- border: 1px solid #eee;
2484
- -moz-transition: all 0.2s;
2485
- -o-transition: all 0.2s;
2486
- -webkit-transition: all 0.2s;
2487
- transition: all 0.2s;
2488
- }
2489
-
2490
- .spf-field-tabbed .spf-tabbed-nav a:hover {
2491
- background-color: #f9f9f9;
2492
- }
2493
-
2494
- .spf-field-tabbed .spf-tabbed-nav a.spf-tabbed-active {
2495
- background-color: #fff;
2496
- border-bottom-color: #fff;
2497
- }
2498
-
2499
- .spf-field-tabbed .spf-tabbed-nav a:focus {
2500
- -moz-box-shadow: none;
2501
- -webkit-box-shadow: none;
2502
- box-shadow: none;
2503
- }
2504
-
2505
- /**
2506
- * 03. 28. Field: text
2507
- */
2508
-
2509
- .spf-field-text input {
2510
- width: 340px;
2511
- max-width: 100%;
2512
- }
2513
-
2514
- /**
2515
- * 03. 29. Field: textarea
2516
- */
2517
-
2518
- .spf-field-textarea textarea {
2519
- width: 100%;
2520
- max-width: 100%;
2521
- min-height: 125px;
2522
- }
2523
-
2524
- .spf-field-textarea .spf-shortcode-button {
2525
- margin-bottom: 10px;
2526
- margin-right: 5px;
2527
- }
2528
-
2529
- /**
2530
- * 03. 30. Field: typography
2531
- */
2532
-
2533
- .spf-field-typography textarea,
2534
- .spf-field-typography select {
2535
- margin: 0;
2536
- width: 100%;
2537
- }
2538
-
2539
- .spf-field-typography .spf--title {
2540
- color: #999;
2541
- margin: 0 0 2px 0;
2542
- }
2543
-
2544
- .spf-field-typography .spf--title small {
2545
- vertical-align: top;
2546
- }
2547
-
2548
- .spf-field-typography .spf--blocks {
2549
- display: flex;
2550
- flex-wrap: wrap;
2551
- }
2552
-
2553
- .spf-field-typography .spf--block {
2554
- padding-right: 5px;
2555
- padding-bottom: 10px;
2556
- box-sizing: border-box;
2557
- }
2558
-
2559
- .spf-field-typography .spf--block .spf--block {
2560
- padding-right: 0;
2561
- padding-bottom: 0;
2562
- }
2563
-
2564
- .spf-field-typography .spf--blocks-selects .spf--block {
2565
- flex: 1 33.3%;
2566
- }
2567
-
2568
- .spf-field-typography .spf--blocks-inputs .spf--block {
2569
- flex: 1 25%;
2570
- }
2571
-
2572
- .spf-field-typography .spf--blocks-inputs .spf--block .spf--block {
2573
- flex: 1;
2574
- }
2575
-
2576
- .spf-field-typography .spf--input {
2577
- margin: 0;
2578
- width: 100%;
2579
- border-radius: 4px 0 0 4px;
2580
- }
2581
-
2582
- .spf-field-typography .spf--unit {
2583
- min-width: 40px;
2584
- max-width: 40px;
2585
- padding: 4px 0;
2586
- font-size: 12px;
2587
- font-weight: 400;
2588
- text-align: center;
2589
- color: #777;
2590
- border: 1px solid #ddd;
2591
- background-color: #eee;
2592
- border-radius: 0 2px 2px 0;
2593
- border-left: 0;
2594
- }
2595
-
2596
- .spf-field-typography .spf--preview {
2597
- font-size: 16px;
2598
- line-height: 20px;
2599
- padding: 20px;
2600
- color: #222;
2601
- border: 1px solid #eee;
2602
- background-color: #fff;
2603
- border-radius: 2.5px;
2604
- user-select: none;
2605
- -webkit-user-select: none;
2606
- transition: background-color .2s, border-color .2s;
2607
- }
2608
-
2609
- .spf-field-typography .spf--block-preview {
2610
- cursor: pointer;
2611
- position: relative;
2612
- overflow: hidden;
2613
- margin-top: 10px;
2614
- max-width: 100%;
2615
- }
2616
-
2617
- .spf-field-typography .spf--black-background {
2618
- border-color: #000;
2619
- background-color: #000;
2620
- }
2621
-
2622
- .spf-field-typography .spf--toggle {
2623
- position: absolute;
2624
- top: 5px;
2625
- right: 10px;
2626
- color: #999;
2627
- }
2628
-
2629
- .spf-field-typography .spf--block-extra-styles {
2630
- margin-top: 5px;
2631
- }
2632
-
2633
- /**
2634
- * 03. 31. Field: upload
2635
- */
2636
-
2637
- .spf-field-upload input {
2638
- width: 100%;
2639
- }
2640
-
2641
- .spf-field-upload .spf--wrap {
2642
- display: flex;
2643
- }
2644
-
2645
- .spf-field-upload .spf--buttons {
2646
- display: flex;
2647
- margin-left: 5px;
2648
- }
2649
-
2650
- .spf-field-upload .spf--remove {
2651
- margin-left: 5px;
2652
- }
2653
-
2654
- /**
2655
- * 03. 32. Field: wp_editor
2656
- */
2657
-
2658
- .spf-field-wp_editor .spf-wp-editor {
2659
- float: left;
2660
- width: 100%;
2661
- }
2662
-
2663
- .spf-field-wp_editor .mce-toolbar-grp {
2664
- border: none;
2665
- }
2666
-
2667
- .spf-field-wp_editor .mce-btn.mce-active button,
2668
- .spf-field-wp_editor .mce-btn.mce-active:hover button,
2669
- .spf-field-wp_editor .mce-btn.mce-active i,
2670
- .spf-field-wp_editor .mce-btn.mce-active:hover i {
2671
- color: #23282d;
2672
- }
2673
-
2674
- .spf-field-wp_editor .wp-media-buttons {
2675
- position: relative;
2676
- z-index: 2;
2677
- }
2678
-
2679
- .spf-field-wp_editor .wp-editor-tabs {
2680
- position: relative;
2681
- z-index: 1;
2682
- }
2683
-
2684
- .spf-field-wp_editor .spf-no-tinymce {
2685
- border: 1px solid #e5e5e5;
2686
- }
2687
-
2688
- .spf-field-wp_editor .spf-no-quicktags .wp-media-buttons {
2689
- float: none;
2690
- display: block;
2691
- }
2692
-
2693
- .spf-field-wp_editor .spf-no-quicktags .mce-tinymce {
2694
- box-shadow: none;
2695
- border: 1px solid #e5e5e5;
2696
- }
2697
-
2698
- .spf-field-wp_editor textarea {
2699
- width: 100%;
2700
- max-width: 100%;
2701
- margin: 0;
2702
- box-shadow: none;
2703
- }
2704
-
2705
- /**
2706
- * 03. 33. Field: heading
2707
- */
2708
-
2709
- .spf-field-heading {
2710
- font-size: 1.5em;
2711
- font-weight: bold;
2712
- color: #23282d;
2713
- background-color: #f5f5f5;
2714
- }
2715
-
2716
- /**
2717
- * 03. 34. Field: subheading
2718
- */
2719
-
2720
- .spf-field-subheading {
2721
- font-size: 14px;
2722
- font-weight: bold;
2723
- padding-top: 17px;
2724
- padding-bottom: 17px;
2725
- color: #23282d;
2726
- background-color: #f7f7f7;
2727
- }
2728
-
2729
- /**
2730
- * 03. 35. Field: submessage
2731
- */
2732
-
2733
- .spf-field-submessage {
2734
- padding: 0 !important;
2735
- border: 0 !important;
2736
- }
2737
-
2738
- .spf-field-submessage+.spf-field {
2739
- border-top: 0 !important;
2740
- }
2741
-
2742
- .spf-submessage {
2743
- font-size: 12px;
2744
- padding: 17px 30px;
2745
- border-top: 1px solid transparent;
2746
- border-bottom: 1px solid transparent;
2747
- }
2748
-
2749
- .spf-submessage-success {
2750
- color: #3c763d;
2751
- border-color: #d6e9c6;
2752
- background-color: #dff0d8;
2753
- }
2754
-
2755
- .spf-submessage-info {
2756
- color: #31708f;
2757
- border-color: #bce8f1;
2758
- background-color: #d9edf7;
2759
- }
2760
-
2761
- .spf-submessage-warning {
2762
- color: #8a6d3b;
2763
- border-color: #faebcc;
2764
- background-color: #fcf8e3;
2765
- }
2766
-
2767
- .spf-submessage-danger {
2768
- color: #a94442;
2769
- border-color: #ebccd1;
2770
- background-color: #f2dede;
2771
- }
2772
-
2773
- .spf-submessage-normal {
2774
- color: #23282d;
2775
- border-color: #eee;
2776
- background-color: #f7f7f7;
2777
- }
2778
-
2779
- /**
2780
- * 03. 36. Field: notice
2781
- */
2782
-
2783
- .spf-field-notice {
2784
- background-color: #f7f7f7;
2785
- }
2786
-
2787
- .spf-notice-success {
2788
- border-color: #46b450;
2789
- }
2790
-
2791
- .spf-notice-info {
2792
- border-color: #339fd4;
2793
- }
2794
-
2795
- .spf-notice-warning {
2796
- border-color: #ffbc00;
2797
- }
2798
-
2799
- .spf-notice-danger {
2800
- border-color: #dc3232;
2801
- }
2802
-
2803
- /**
2804
- * 03. 37. others
2805
- */
2806
-
2807
- .spf-help {
2808
- cursor: help;
2809
- position: absolute;
2810
- top: 0;
2811
- right: 0;
2812
- padding: 5px;
2813
- font-size: 14px;
2814
- color: #aaa;
2815
- }
2816
-
2817
- .spf-help .spf-help-text {
2818
- display: none;
2819
- }
2820
-
2821
- .spf-image-preview {
2822
- display: inline-block;
2823
- position: relative;
2824
- padding: 4px;
2825
- min-width: 44px;
2826
- min-height: 22px;
2827
- margin-bottom: 10px;
2828
- border: 1px solid #ccc;
2829
- background-color: #f9f9f9;
2830
- -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
2831
- -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
2832
- box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
2833
- }
2834
-
2835
- .spf-image-preview img {
2836
- max-height: 90px;
2837
- display: inline-block;
2838
- vertical-align: middle;
2839
- }
2840
-
2841
- .spf-field-custom .spf-field {
2842
- padding: 0;
2843
- }
2844
-
2845
- .spf-field .chosen-container-single .chosen-single {
2846
- height: 28px;
2847
- line-height: 26px;
2848
- }
2849
-
2850
- .spf-field .chosen-container-single .chosen-single abbr {
2851
- top: 0;
2852
- right: 20px;
2853
- font-family: FontAwesome;
2854
- font-size: 12px;
2855
- height: 100%;
2856
- width: 18px;
2857
- color: #aaa;
2858
- text-align: center;
2859
- background: none;
2860
- }
2861
-
2862
- .spf-field .chosen-container-single .chosen-single abbr:before {
2863
- content: "\f00d";
2864
- }
2865
-
2866
- .spf-field .chosen-container-single .chosen-single abbr:hover {
2867
- color: #555;
2868
- }
2869
-
2870
- .spf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
2871
- font-family: FontAwesome;
2872
- font-size: 12px;
2873
- height: 100%;
2874
- width: 18px;
2875
- color: #aaa;
2876
- text-align: center;
2877
- background: none;
2878
- }
2879
-
2880
- .spf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:before {
2881
- content: "\f00d";
2882
- }
2883
-
2884
- .spf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
2885
- color: #555;
2886
- }
2887
-
2888
- .spf-field .chosen-container-single .chosen-single div b {
2889
- font-family: FontAwesome;
2890
- font-size: 14px;
2891
- color: #aaa;
2892
- background: none;
2893
- }
2894
-
2895
- .spf-field .chosen-container-single .chosen-single div b:before {
2896
- content: "\f107";
2897
- }
2898
-
2899
- .spf-field .chosen-container-single .chosen-single div b:hover {
2900
- color: #555;
2901
- }
2902
-
2903
- .spf-field .chosen-container-active.chosen-with-drop .chosen-single div b:before {
2904
- content: "\f106";
2905
- }
2906
-
2907
- .spf-field .chosen-container-single .chosen-single-with-deselect span {
2908
- margin-right: 40px;
2909
- }
2910
-
2911
- .spf-field .chosen-container-single .chosen-search input[type="text"] {
2912
- background: none;
2913
- }
2914
-
2915
- .spf-field .chosen-container-single .chosen-search:before {
2916
- font-family: FontAwesome;
2917
- position: absolute;
2918
- content: "\f002";
2919
- font-size: 11px;
2920
- right: 10px;
2921
- top: 7px;
2922
- color: #aaa;
2923
- }
2924
-
2925
- .spf-field .wp-picker-container {
2926
- display: inline-block;
2927
- }
2928
-
2929
- .spf-field .spf--transparent-wrap {
2930
- display: none;
2931
- position: relative;
2932
- top: -1px;
2933
- width: 235px;
2934
- padding: 9px 10px;
2935
- border: 1px solid #dfdfdf;
2936
- border-top: none;
2937
- background-color: #fff;
2938
- }
2939
-
2940
- .spf-field .spf--transparent-slider {
2941
- position: absolute;
2942
- width: 190px;
2943
- margin-left: 2px;
2944
- height: 18px;
2945
- }
2946
-
2947
- .spf-field .spf--transparent-slider .ui-slider-handle {
2948
- position: absolute;
2949
- top: -3px;
2950
- bottom: -3px;
2951
- z-index: 5;
2952
- border-color: #aaa;
2953
- border-style: solid;
2954
- border-width: 4px 3px;
2955
- width: 10px;
2956
- height: 16px;
2957
- margin: 0 -5px;
2958
- background: none;
2959
- cursor: ew-resize;
2960
- opacity: 0.9;
2961
- -moz-border-radius: 4px;
2962
- -webkit-border-radius: 4px;
2963
- border-radius: 4px;
2964
- -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
2965
- -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
2966
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
2967
- }
2968
-
2969
- .spf-field .spf--transparent-slider .ui-slider-handle:before {
2970
- content: " ";
2971
- position: absolute;
2972
- left: -2px;
2973
- right: -2px;
2974
- top: -3px;
2975
- bottom: -3px;
2976
- border: 2px solid #fff;
2977
- -moz-border-radius: 3px;
2978
- -webkit-border-radius: 3px;
2979
- border-radius: 3px;
2980
- }
2981
-
2982
- .spf-field .spf--transparent-offset {
2983
- height: 18px;
2984
- width: 200px;
2985
- background: url(../images/checkerboard.png) repeat-y center left scroll #fff;
2986
- -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.4) inset;
2987
- -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.4) inset;
2988
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.4) inset;
2989
- -moz-border-radius: 2px;
2990
- -webkit-border-radius: 2px;
2991
- border-radius: 2px;
2992
- }
2993
-
2994
- .spf-field .spf--transparent-text {
2995
- position: absolute;
2996
- top: 12px;
2997
- right: 10px;
2998
- width: 30px;
2999
- font-size: 12px;
3000
- line-height: 12px;
3001
- text-align: center;
3002
- color: #999;
3003
- }
3004
-
3005
- .spf-field .spf--transparent-button {
3006
- display: inline-block;
3007
- text-align: center;
3008
- cursor: pointer;
3009
- margin-top: 10px;
3010
- user-select: none;
3011
- -webkit-user-select: none;
3012
- color: #999;
3013
- transition: background-color .2s, border-color .2s, color .2s;
3014
- }
3015
-
3016
- .spf-field .spf--transparent-active .wp-color-result {
3017
- background-image: url(../images/checkerboard.png);
3018
- background-size: 130%;
3019
- background-position: center left;
3020
- background-color: transparent !important;
3021
- }
3022
-
3023
- .spf-field .spf--transparent-active .spf--transparent-button {
3024
- color: #fff;
3025
- border-color: #4fb845;
3026
- background-color: #4fb845;
3027
- }
3028
-
3029
- /**
3030
- * 04. Widget
3031
- */
3032
-
3033
- .spf-widgets>.spf-field {
3034
- position: relative;
3035
- top: -1px;
3036
- margin-right: -15px;
3037
- margin-left: -15px;
3038
- padding: 12px 15px;
3039
- }
3040
-
3041
- .spf-widgets>.spf-field .spf-field {
3042
- margin-left: 0;
3043
- margin-right: 0;
3044
- }
3045
-
3046
- .spf-widgets>.spf-field .spf-title {
3047
- float: none;
3048
- width: 100%;
3049
- margin-bottom: 5px;
3050
- }
3051
-
3052
- .spf-widgets>.spf-field .spf-fieldset {
3053
- margin-left: 0;
3054
- }
3055
-
3056
- .spf-widgets .spf-field-text input {
3057
- width: 100%;
3058
- }
3059
-
3060
- .spf-widgets .spf-field-notice .spf-notice {
3061
- padding: 15px;
3062
- }
3063
-
3064
- .control-section .spf-widgets>.spf-field {
3065
- margin-right: -10px;
3066
- margin-left: -10px;
3067
- padding: 10px 12px;
3068
- }
3069
-
3070
- /**
3071
- * 05. Widget
3072
- */
3073
-
3074
- .control-section .spf-field {
3075
- padding: 0;
3076
- }
3077
-
3078
- .control-section .spf-field .spf-title {
3079
- float: none;
3080
- width: 100%;
3081
- margin-bottom: 10px;
3082
- }
3083
-
3084
- .control-section .spf-field .spf-title h4 {
3085
- font-size: 14px;
3086
- font-weight: 600;
3087
- color: inherit;
3088
- }
3089
-
3090
- .control-section .spf-field .spf-fieldset {
3091
- margin-left: 0;
3092
- }
3093
-
3094
- .control-section .spf-field-select select {
3095
- width: 100%;
3096
- }
3097
-
3098
- .control-section .spf-field-heading {
3099
- color: inherit;
3100
- font-size: 14px;
3101
- line-height: 1em;
3102
- margin-right: -15px;
3103
- margin-left: -15px;
3104
- padding: 15px;
3105
- }
3106
-
3107
- .control-section .spf-field-subheading {
3108
- color: inherit;
3109
- font-size: 11px;
3110
- margin-right: -15px;
3111
- margin-left: -15px;
3112
- padding: 10px 15px;
3113
- }
3114
-
3115
- .control-section .spf-text-subtitle {
3116
- margin-top: 4px;
3117
- font-size: 12px;
3118
- }
3119
-
3120
- .control-section .spf-field-content,
3121
- .control-section .spf-field-submessage .spf-submessage {
3122
- margin-right: -15px;
3123
- margin-left: -15px;
3124
- padding: 15px;
3125
- }
3126
-
3127
- .control-section .spf-fieldset .spf-field-submessage .spf-submessage,
3128
- .control-section .spf-fieldset .spf-field-heading,
3129
- .control-section .spf-fieldset .spf-field-subheading {
3130
- margin-left: 0;
3131
- margin-right: 0;
3132
- }
3133
-
3134
- .control-section .spf-field-date .spf--to {
3135
- margin-left: 0;
3136
- }
3137
-
3138
- .control-section .spf-field-sorter ul li {
3139
- padding: 5px;
3140
- }
3141
-
3142
- .control-section .spf-field-sorter .spf-modules {
3143
- float: none;
3144
- width: 100%;
3145
- }
3146
-
3147
- .control-section .spf-field-sorter .spf-modules:first-child {
3148
- padding-right: 0;
3149
- padding-bottom: 15px;
3150
- }
3151
-
3152
- .control-section .spf-field-background_adv .spf--select,
3153
- .control-section .spf-field-background .spf--select {
3154
- width: 100%;
3155
- }
3156
-
3157
- .control-section .spf-field-border select,
3158
- .control-section .spf-field-spacing select,
3159
- .control-section .spf-field-column select,
3160
- .control-section .spf-field-dimensions select,
3161
- .control-section .spf-field-dimensions_advanced select {
3162
- width: auto;
3163
- }
3164
-
3165
- .control-section .spf-field-spinner input {
3166
- width: 50px;
3167
- }
3168
-
3169
- .control-section .spf-field-backup .spf-export-data {
3170
- display: none;
3171
- }
3172
-
3173
- .control-section .spf-field-fieldset .spf-fieldset-content {
3174
- border-color: #e5e5e5;
3175
- }
3176
-
3177
- .control-section .spf-field-fieldset .spf-field {
3178
- padding: 10px;
3179
- }
3180
-
3181
- .control-section .spf-field-fieldset .spf-field .spf-title {
3182
- margin-bottom: 5px;
3183
- }
3184
-
3185
- .control-section .spf-field-fieldset .spf-field h4 {
3186
- font-size: 12px;
3187
- }
3188
-
3189
- .control-section .spf-field-group .spf-field,
3190
- .control-section .spf-field-tabbed .spf-field,
3191
- .control-section .spf-field-sortable .spf-field,
3192
- .control-section .spf-field-repeater .spf-field,
3193
- .control-section .spf-field-accordion .spf-field {
3194
- padding: 10px;
3195
- }
3196
-
3197
- .control-section .spf-field-group .spf-field .spf-title,
3198
- .control-section .spf-field-tabbed .spf-field .spf-title,
3199
- .control-section .spf-field-sortable .spf-field .spf-title,
3200
- .control-section .spf-field-repeater .spf-field .spf-title,
3201
- .control-section .spf-field-accordion .spf-field .spf-title {
3202
- margin-bottom: 5px;
3203
- }
3204
-
3205
- .control-section .spf-field-group .spf-field h4,
3206
- .control-section .spf-field-tabbed .spf-field h4,
3207
- .control-section .spf-field-sortable .spf-field h4,
3208
- .control-section .spf-field-repeater .spf-field h4,
3209
- .control-section .spf-field-accordion .spf-field h4 {
3210
- font-size: 12px;
3211
- }
3212
-
3213
- .control-section .spf-dependency-control.hidden {
3214
- display: none !important;
3215
- }
3216
-
3217
- /**
3218
- * 06. Taxonomy
3219
- */
3220
-
3221
- .spf-taxonomy>.spf-field {
3222
- border-top: none !important;
3223
- }
3224
-
3225
- .spf-taxonomy>.spf-field-heading {
3226
- font-size: 1.1em;
3227
- padding: 20px !important;
3228
- border: 1px solid #ddd;
3229
- }
3230
-
3231
- .spf-taxonomy>.spf-field-subheading {
3232
- font-size: 12px;
3233
- padding: 15px !important;
3234
- border: 1px solid #ddd;
3235
- }
3236
-
3237
- .spf-taxonomy>.spf-field-submessage .spf-submessage {
3238
- padding: 15px;
3239
- border-left-width: 1px;
3240
- border-left-style: solid;
3241
- border-right-width: 1px;
3242
- border-right-style: solid;
3243
- }
3244
-
3245
- .spf-taxonomy>.spf-field-notice {
3246
- background-color: transparent;
3247
- }
3248
-
3249
- .spf-taxonomy .spf-section-title {
3250
- display: block;
3251
- padding: 15px;
3252
- background-color: #f9f9f9;
3253
- border: 1px solid #e5e5e5;
3254
- -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
3255
- -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
3256
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
3257
- }
3258
-
3259
- .spf-taxonomy-add-fields>.spf-field {
3260
- padding: 8px 0;
3261
- }
3262
-
3263
- .spf-taxonomy-add-fields>.spf-field>.spf-title {
3264
- float: none;
3265
- width: 100%;
3266
- padding: 2px 2px 4px 0;
3267
- }
3268
-
3269
- .spf-taxonomy-add-fields>.spf-field>.spf-title h4 {
3270
- font-size: 12px;
3271
- font-weight: normal;
3272
- }
3273
-
3274
- .spf-taxonomy-add-fields>.spf-field>.spf-fieldset {
3275
- margin-left: 0;
3276
- }
3277
-
3278
- .spf-taxonomy-add-fields>.spf-field>.spf-fieldset>.spf-help {
3279
- right: -5px;
3280
- }
3281
-
3282
- .spf-taxonomy-add-fields+p.submit {
3283
- margin-top: 0;
3284
- }
3285
-
3286
- .spf-taxonomy-edit-fields>.spf-field {
3287
- padding: 20px 0;
3288
- }
3289
-
3290
- .spf-taxonomy-edit-fields>.spf-field>.spf-title {
3291
- width: 225px;
3292
- }
3293
-
3294
- .spf-taxonomy-edit-fields>.spf-field>.spf-title h4 {
3295
- font-size: 14px;
3296
- font-weight: 600;
3297
- line-height: 1.3;
3298
- display: inline-block;
3299
- vertical-align: middle;
3300
- }
3301
-
3302
- .spf-taxonomy-edit-fields>.spf-field>.spf-fieldset {
3303
- margin-left: 225px;
3304
- }
3305
-
3306
- .spf-taxonomy-edit-fields>.spf-field>.spf-fieldset>.spf-help {
3307
- top: -5px;
3308
- right: -5px;
3309
- }
3310
-
3311
- .spf-taxonomy-edit-fields>.spf-field-submessage {
3312
- margin: 20px 0;
3313
- }
3314
-
3315
- .spf-taxonomy-edit-fields>.spf-field-subheading,
3316
- .spf-taxonomy-edit-fields>.spf-field-heading {
3317
- margin: 20px 0;
3318
- border: 1px solid #ddd;
3319
- }
3320
-
3321
- /**
3322
- * 07. Profile
3323
- */
3324
-
3325
- .spf-profile>h2>.fa {
3326
- padding-right: 7px;
3327
- }
3328
-
3329
- .spf-profile>.spf-field {
3330
- padding: 15px 0;
3331
- border-top: none !important;
3332
- }
3333
-
3334
- .spf-profile>.spf-field>.spf-title {
3335
- width: 220px;
3336
- }
3337
-
3338
- .spf-profile>.spf-field>.spf-title h4 {
3339
- font-size: 14px;
3340
- font-weight: 600;
3341
- line-height: 1.3;
3342
- display: inline-block;
3343
- vertical-align: middle;
3344
- }
3345
-
3346
- .spf-profile>.spf-field>.spf-fieldset {
3347
- margin-left: 220px;
3348
- }
3349
-
3350
- .spf-profile>.spf-field>.spf-fieldset>.spf-help {
3351
- top: -15px;
3352
- right: -5px;
3353
- }
3354
-
3355
- .spf-profile>.spf-field-heading {
3356
- font-size: 1.1em;
3357
- }
3358
-
3359
- .spf-profile>.spf-field-subheading {
3360
- font-size: 12px;
3361
- }
3362
-
3363
- .spf-profile>.spf-field-subheading,
3364
- .spf-profile>.spf-field-heading {
3365
- margin: 10px 0;
3366
- padding: 15px !important;
3367
- border: 1px solid #ddd;
3368
- }
3369
-
3370
- .spf-profile>.spf-field-submessage {
3371
- margin: 20px 0;
3372
- }
3373
-
3374
- .spf-profile>.spf-field-submessage .spf-submessage {
3375
- padding: 10px;
3376
- border-left-width: 1px;
3377
- border-left-style: solid;
3378
- border-right-width: 1px;
3379
- border-right-style: solid;
3380
- }
3381
-
3382
- .spf-profile>.spf-field-notice {
3383
- background-color: transparent;
3384
- }
3385
-
3386
- /**
3387
- * 08. Modal
3388
- */
3389
-
3390
- .spf-modal {
3391
- display: none;
3392
- position: fixed;
3393
- z-index: 100101;
3394
- top: 0;
3395
- left: 0;
3396
- width: 100%;
3397
- height: 100%;
3398
- }
3399
-
3400
- .spf-modal-icon {
3401
- z-index: 100102;
3402
- }
3403
-
3404
- .spf-modal-table {
3405
- display: table;
3406
- width: 100%;
3407
- height: 100%;
3408
- }
3409
-
3410
- .spf-modal-table-cell {
3411
- display: table-cell;
3412
- vertical-align: middle;
3413
- margin: 100px 0;
3414
- }
3415
-
3416
- .spf-modal-inner {
3417
- position: relative;
3418
- z-index: 10;
3419
- width: 760px;
3420
- height: 750px;
3421
- margin: 0 auto;
3422
- background-color: #fff;
3423
- }
3424
-
3425
- .spf-modal-content {
3426
- position: relative;
3427
- overflow: hidden;
3428
- overflow-y: auto;
3429
- height: 592px;
3430
- }
3431
-
3432
- .spf-modal-content .spf-shortcode-button {
3433
- display: none;
3434
- }
3435
-
3436
- .spf-modal-content .spf-fieldset {
3437
- margin-left: 25%;
3438
- }
3439
-
3440
- .spf-modal-content .spf-title {
3441
- width: 20%;
3442
- }
3443
-
3444
- .spf-modal-content .spf-field {
3445
- padding: 15px 30px 15px 15px;
3446
- }
3447
-
3448
- .spf-modal-content a:active,
3449
- .spf-modal-content a:focus {
3450
- outline: none;
3451
- -moz-box-shadow: none;
3452
- -webkit-box-shadow: none;
3453
- box-shadow: none;
3454
- }
3455
-
3456
- .spf-modal-content h4 {
3457
- font-size: 13px;
3458
- }
3459
-
3460
- .spf-modal-content h4 small {
3461
- font-style: italic;
3462
- font-weight: 400;
3463
- color: #aaa;
3464
- }
3465
-
3466
- .spf-modal-title {
3467
- position: relative;
3468
- background-color: #fcfcfc;
3469
- border-bottom: 1px solid #ddd;
3470
- height: 36px;
3471
- font-size: 16px;
3472
- font-weight: 600;
3473
- line-height: 36px;
3474
- margin: 0;
3475
- padding: 0 36px 0 16px;
3476
- }
3477
-
3478
- .spf-modal-header {
3479
- width: 100%;
3480
- padding: 16px 0;
3481
- background-color: #f5f5f5;
3482
- border-bottom: 1px solid #eee;
3483
- }
3484
-
3485
- .spf-modal-header select {
3486
- display: block;
3487
- width: 250px;
3488
- margin: 0 auto;
3489
- background-color: #fff;
3490
- }
3491
-
3492
- .spf-modal-close {
3493
- color: #666;
3494
- padding: 0;
3495
- position: absolute;
3496
- top: 0;
3497
- right: 0;
3498
- width: 36px;
3499
- height: 36px;
3500
- text-align: center;
3501
- background: none;
3502
- border: none;
3503
- cursor: pointer;
3504
- }
3505
-
3506
- .spf-modal-close:before {
3507
- font: normal 20px/36px dashicons;
3508
- content: "\f158";
3509
- vertical-align: top;
3510
- width: 36px;
3511
- height: 36px;
3512
- }
3513
-
3514
- .spf-modal-close:hover {
3515
- opacity: 0.5;
3516
- }
3517
-
3518
- .spf-modal-insert-wrapper {
3519
- text-align: center;
3520
- width: 100%;
3521
- padding: 16px 0;
3522
- background-color: #f5f5f5;
3523
- border-top: 1px solid #eee;
3524
- }
3525
-
3526
- .spf-modal-overlay {
3527
- position: absolute;
3528
- top: 0;
3529
- left: 0;
3530
- width: 100%;
3531
- height: 100%;
3532
- background-color: #000;
3533
- opacity: 0.5;
3534
- }
3535
-
3536
- /**
3537
- * 08. 01. Shortcode Modal
3538
- */
3539
-
3540
- .spf--repeatable {
3541
- padding: 15px 15px 0 15px;
3542
- }
3543
-
3544
- .spf--repeat-button-block {
3545
- text-align: center;
3546
- padding-bottom: 15px;
3547
- }
3548
-
3549
- .spf--repeat-shortcode {
3550
- position: relative;
3551
- margin-bottom: 15px;
3552
- border: 1px dashed #ddd;
3553
- }
3554
-
3555
- .spf--repeat-shortcode:first-child .spf-repeat-remove {
3556
- display: none;
3557
- }
3558
-
3559
- .spf--repeat-shortcode .spf-repeat-remove {
3560
- position: absolute;
3561
- right: 10px;
3562
- top: 10px;
3563
- z-index: 10;
3564
- cursor: pointer;
3565
- display: inline-block;
3566
- font-size: 11px;
3567
- width: 18px;
3568
- height: 18px;
3569
- line-height: 18px;
3570
- text-align: center;
3571
- border-radius: 2px;
3572
- color: #fff;
3573
- background-color: #e14d43;
3574
- opacity: 0.5;
3575
- }
3576
-
3577
- .spf--repeat-shortcode .spf-repeat-remove:hover {
3578
- opacity: 1;
3579
- }
3580
-
3581
- .spf-shortcode-single .spf-modal-inner {
3582
- height: 750px;
3583
- }
3584
-
3585
- .spf-shortcode-single .spf-modal-content {
3586
- height: 652px;
3587
- }
3588
-
3589
- .elementor-editor-active .spf-shortcode-button {
3590
- margin-left: 5px;
3591
- }
3592
-
3593
- .elementor-editor-active .spf-modal .hidden {
3594
- display: none !important;
3595
- }
3596
-
3597
- /**
3598
- * 08. 03. Icon Modal
3599
- */
3600
-
3601
- .spf-modal-icon .spf-icon-title {
3602
- padding: 15px 0;
3603
- margin: 4px;
3604
- font-size: 14px;
3605
- font-weight: bold;
3606
- text-align: center;
3607
- border: 1px solid #eee;
3608
- background-color: #f7f7f7;
3609
- }
3610
-
3611
- .spf-modal-icon .spf-icon-search {
3612
- width: 250px;
3613
- height: 40px;
3614
- line-height: 40px;
3615
- }
3616
-
3617
- .spf-modal-icon a {
3618
- display: inline-block;
3619
- padding: 4px;
3620
- cursor: pointer;
3621
- }
3622
-
3623
- .spf-modal-icon a .spf-icon {
3624
- position: relative;
3625
- padding: 4px;
3626
- display: inline-block;
3627
- font-size: 14px;
3628
- width: 30px;
3629
- height: 26px;
3630
- line-height: 26px;
3631
- text-align: center;
3632
- vertical-align: top;
3633
- color: #555;
3634
- border: 1px solid #ccc;
3635
- background-color: #f7f7f7;
3636
- -moz-border-radius: 3px;
3637
- -webkit-border-radius: 3px;
3638
- border-radius: 3px;
3639
- -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
3640
- -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
3641
- box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
3642
- -moz-box-sizing: content-box;
3643
- -webkit-box-sizing: content-box;
3644
- box-sizing: content-box;
3645
- }
3646
-
3647
- .spf-modal-icon a:hover .spf-icon {
3648
- color: #fff;
3649
- border-color: #222;
3650
- background-color: #222;
3651
- }
3652
-
3653
- .spf-modal-icon .spf-modal-content {
3654
- padding: 10px;
3655
- height: 618px;
3656
- }
3657
-
3658
- .spf-modal-icon .spf-text-error {
3659
- padding: 10px;
3660
- }
3661
-
3662
- .spf-modal-loading {
3663
- display: none;
3664
- position: absolute;
3665
- left: 15px;
3666
- top: 15px;
3667
- }
3668
-
3669
- .spf-loading {
3670
- position: relative;
3671
- width: 20px;
3672
- height: 20px;
3673
- background: #ccc;
3674
- -moz-border-radius: 20px;
3675
- -webkit-border-radius: 20px;
3676
- border-radius: 20px;
3677
- -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.07);
3678
- -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.07);
3679
- box-shadow: 0 2px 5px rgba(0, 0, 0, 0.07);
3680
- }
3681
-
3682
- .spf-loading:after {
3683
- position: absolute;
3684
- top: 50%;
3685
- left: 50%;
3686
- width: 4px;
3687
- height: 4px;
3688
- content: "";
3689
- margin-top: -2px;
3690
- margin-left: -2px;
3691
- background-color: white;
3692
- -moz-animation-duration: 0.5s;
3693
- -webkit-animation-duration: 0.5s;
3694
- animation-duration: 0.5s;
3695
- -moz-animation-iteration-count: infinite;
3696
- -webkit-animation-iteration-count: infinite;
3697
- animation-iteration-count: infinite;
3698
- -moz-animation-timing-function: linear;
3699
- -webkit-animation-timing-function: linear;
3700
- animation-timing-function: linear;
3701
- -moz-animation-name: csfLoader;
3702
- -webkit-animation-name: csfLoader;
3703
- animation-name: csfLoader;
3704
- -moz-border-radius: 4px;
3705
- -webkit-border-radius: 4px;
3706
- border-radius: 4px;
3707
- }
3708
-
3709
- @-moz-keyframes csfLoader {
3710
- 0% {
3711
- -moz-transform: rotate(0deg) translateX(-6px) rotate(0deg);
3712
- transform: rotate(0deg) translateX(-6px) rotate(0deg);
3713
- }
3714
-
3715
- 100% {
3716
- -moz-transform: rotate(360deg) translateX(-6px) rotate(-360deg);
3717
- transform: rotate(360deg) translateX(-6px) rotate(-360deg);
3718
- }
3719
- }
3720
-
3721
- @-webkit-keyframes csfLoader {
3722
- 0% {
3723
- -webkit-transform: rotate(0deg) translateX(-6px) rotate(0deg);
3724
- transform: rotate(0deg) translateX(-6px) rotate(0deg);
3725
- }
3726
-
3727
- 100% {
3728
- -webkit-transform: rotate(360deg) translateX(-6px) rotate(-360deg);
3729
- transform: rotate(360deg) translateX(-6px) rotate(-360deg);
3730
- }
3731
- }
3732
-
3733
- @keyframes csfLoader {
3734
- 0% {
3735
- -moz-transform: rotate(0deg) translateX(-6px) rotate(0deg);
3736
- -ms-transform: rotate(0deg) translateX(-6px) rotate(0deg);
3737
- -webkit-transform: rotate(0deg) translateX(-6px) rotate(0deg);
3738
- transform: rotate(0deg) translateX(-6px) rotate(0deg);
3739
- }
3740
-
3741
- 100% {
3742
- -moz-transform: rotate(360deg) translateX(-6px) rotate(-360deg);
3743
- -ms-transform: rotate(360deg) translateX(-6px) rotate(-360deg);
3744
- -webkit-transform: rotate(360deg) translateX(-6px) rotate(-360deg);
3745
- transform: rotate(360deg) translateX(-6px) rotate(-360deg);
3746
- }
3747
- }
3748
-
3749
- /**
3750
- * 09. Helper
3751
- */
3752
-
3753
- .spf-text-desc,
3754
- .spf-text-subtitle {
3755
- font-weight: 400;
3756
- font-style: italic;
3757
- margin-top: 4px;
3758
- color: #999;
3759
- }
3760
-
3761
- .spf-text-success {
3762
- color: #2b542c;
3763
- }
3764
-
3765
- .spf-text-error {
3766
- color: #d02c21;
3767
- }
3768
-
3769
- .spf-text-info {
3770
- color: #31708f;
3771
- }
3772
-
3773
- .spf-text-warning {
3774
- color: #ffb900;
3775
- }
3776
-
3777
- .spf-text-muted {
3778
- color: #aaa;
3779
- }
3780
-
3781
- .spf-text-left {
3782
- text-align: left;
3783
- }
3784
-
3785
- .spf-text-center {
3786
- text-align: center;
3787
- }
3788
-
3789
- .spf-text-right {
3790
- text-align: right;
3791
- }
3792
-
3793
- .spf-block-left {
3794
- float: left;
3795
- }
3796
-
3797
- .spf-block-right {
3798
- float: right;
3799
- }
3800
-
3801
- .spf-full-width {
3802
- width: 100%;
3803
- }
3804
-
3805
- .spf-full-half {
3806
- width: 50%;
3807
- }
3808
-
3809
- .spf-table {
3810
- width: 100%;
3811
- display: table;
3812
- }
3813
-
3814
- .spf-table-cell {
3815
- display: table-cell;
3816
- vertical-align: middle;
3817
- }
3818
-
3819
- .spf-table-expanded {
3820
- width: 100%;
3821
- }
3822
-
3823
- .spf-nowrap {
3824
- white-space: nowrap;
3825
- }
3826
-
3827
- .spf-text-highlight {
3828
- padding: 2px 4px;
3829
- font-size: 90%;
3830
- color: #c7254e;
3831
- background-color: #f9f2f4;
3832
- -moz-border-radius: 2px;
3833
- -webkit-border-radius: 2px;
3834
- border-radius: 2px;
3835
- }
3836
-
3837
- .spf-text-highlight-gray {
3838
- padding: 2px 4px;
3839
- font-size: 90%;
3840
- background-color: #f0f0f0;
3841
- -moz-border-radius: 2px;
3842
- -webkit-border-radius: 2px;
3843
- border-radius: 2px;
3844
- }
3845
-
3846
- .spf-hidden {
3847
- display: none;
3848
- }
3849
-
3850
- .spf-hide {
3851
- display: none !important;
3852
- }
3853
-
3854
- .spf-show {
3855
- display: block !important;
3856
- }
3857
-
3858
- .spf-opacity {
3859
- opacity: 0.5;
3860
- }
3861
-
3862
- .spf-warning-primary {
3863
- color: #fff !important;
3864
- border-color: #d02c21 #ba281e #ba281e !important;
3865
- background: #e14d43 !important;
3866
- -moz-box-shadow: 0 1px 0 #ba281e !important;
3867
- -webkit-box-shadow: 0 1px 0 #ba281e !important;
3868
- box-shadow: 0 1px 0 #ba281e !important;
3869
- text-shadow: 0 -1px 1px #ba281e, 1px 0 1px #ba281e, 0 1px 1px #ba281e, -1px 0 1px !important;
3870
- text-shadow: 0 -1px 1px #ba281e, 1px 0 1px #ba281e, 0 1px 1px #ba281e, -1px 0 1px #ba281e !important;
3871
- }
3872
-
3873
- .spf-warning-primary:hover,
3874
- .spf-warning-primary:focus {
3875
- border-color: #ba281e !important;
3876
- background: #e35950 !important;
3877
- -moz-box-shadow: 0 1px 0 #ba281e !important;
3878
- -webkit-box-shadow: 0 1px 0 #ba281e !important;
3879
- box-shadow: 0 1px 0 #ba281e !important;
3880
- }
3881
-
3882
- .spf-warning-primary:active {
3883
- border-color: #ba281e !important;
3884
- background: #d02c21 !important;
3885
- -moz-box-shadow: inset 0 2px 0 #ba281e !important;
3886
- -webkit-box-shadow: inset 0 2px 0 #ba281e !important;
3887
- box-shadow: inset 0 2px 0 #ba281e !important;
3888
- }
3889
-
3890
- .spf-form-result {
3891
- display: none;
3892
- padding: 12px;
3893
- margin: 0 0 15px 0;
3894
- background-color: #fff;
3895
- border-left: 4px solid #555;
3896
- -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
3897
- -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
3898
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
3899
- }
3900
-
3901
- .spf-form-show {
3902
- display: block;
3903
- }
3904
-
3905
- .spf-form-error {
3906
- border-left-color: #dc3232;
3907
- }
3908
-
3909
- .spf-form-success {
3910
- border-left-color: #46b450;
3911
- }
3912
-
3913
- .spf-form-warning {
3914
- border-left-color: #ffb900;
3915
- }
3916
-
3917
- .spf-form-info {
3918
- border-left-color: #00a0d2;
3919
- }
3920
-
3921
- .spf-label-error {
3922
- position: relative;
3923
- top: -2px;
3924
- display: inline-block;
3925
- font-size: 10px;
3926
- line-height: 10px;
3927
- height: 10px;
3928
- width: 10px;
3929
- padding: 1px;
3930
- font-style: normal;
3931
- text-align: center;
3932
- color: #fff;
3933
- vertical-align: middle;
3934
- background-color: #e10000;
3935
- -moz-border-radius: 2px;
3936
- -webkit-border-radius: 2px;
3937
- border-radius: 2px;
3938
- }
3939
-
3940
- .spf-no-option {
3941
- padding: 30px;
3942
- }
3943
-
3944
- /**
3945
- * 10. Welcome Page
3946
- */
3947
-
3948
- .spf-welcome-wrap {
3949
- position: relative;
3950
- margin: 25px 40px 0 20px;
3951
- font-size: 15px;
3952
- max-width: 1200px;
3953
- }
3954
-
3955
- .spf-welcome-wrap p {
3956
- font-size: 14px;
3957
- line-height: 1.5;
3958
- }
3959
-
3960
- .spf-welcome-wrap h1 {
3961
- margin: 0.2em 200px 0 0;
3962
- padding: 0;
3963
- color: #32373c;
3964
- line-height: 1.2em;
3965
- font-size: 2.8em;
3966
- font-weight: 400;
3967
- }
3968
-
3969
- .spf-welcome-wrap .spf-logo {
3970
- position: absolute;
3971
- overflow: hidden;
3972
- top: 0;
3973
- right: 0;
3974
- height: 160px;
3975
- width: 140px;
3976
- background-image: linear-gradient(45deg, #2d67cb, #ad19f3);
3977
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25), inset 0 0 0 4px rgba(0, 0, 0, 0.25);
3978
- }
3979
-
3980
- .spf-welcome-wrap .spf-logo .spf--effects i {
3981
- position: absolute;
3982
- width: 200px;
3983
- height: 100px;
3984
- background-color: rgba(0, 0, 0, 0.15);
3985
- transform: rotate(-45deg);
3986
- }
3987
-
3988
- .spf-welcome-wrap .spf-logo .spf--effects i:nth-child(1) {
3989
- bottom: -20px;
3990
- right: -70px;
3991
- }
3992
-
3993
- .spf-welcome-wrap .spf-logo .spf--effects i:nth-child(2) {
3994
- bottom: -35px;
3995
- right: -80px;
3996
- }
3997
-
3998
- .spf-welcome-wrap .spf-logo .spf--effects i:nth-child(3) {
3999
- bottom: -50px;
4000
- right: -90px;
4001
- }
4002
-
4003
- .spf-welcome-wrap .spf-logo .spf--effects i:nth-child(4) {
4004
- bottom: -65px;
4005
- right: -100px;
4006
- }
4007
-
4008
- .spf-welcome-wrap .spf-logo .spf--wp-logos {
4009
- position: relative;
4010
- padding-top: 25px;
4011
- text-align: center;
4012
- }
4013
-
4014
- .spf-welcome-wrap .spf-logo .spf--wp-logo {
4015
- position: absolute;
4016
- left: 20px;
4017
- width: 20px;
4018
- height: 20px;
4019
- background-repeat: no-repeat;
4020
- background-position: center center;
4021
- background-image: url(../images/wp-logo.svg);
4022
- }
4023
-
4024
- .spf-welcome-wrap .spf-logo .spf--wp-plugin-logo {
4025
- display: inline-block;
4026
- width: 50px;
4027
- height: 50px;
4028
- border: 3px solid #fff;
4029
- background-size: 40px;
4030
- background-repeat: no-repeat;
4031
- background-position: center center;
4032
- background-image: url(../images/wp-plugin-logo.svg);
4033
- border-radius: 100%;
4034
- vertical-align: middle;
4035
- }
4036
-
4037
- .spf-welcome-wrap .spf-logo .spf--text {
4038
- position: absolute;
4039
- left: 0;
4040
- right: 0;
4041
- top: 90px;
4042
- color: #fff;
4043
- font-size: 13px;
4044
- line-height: 1.2em;
4045
- font-weight: 600;
4046
- text-align: center;
4047
- text-transform: uppercase;
4048
- text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.25);
4049
- }
4050
-
4051
- .spf-welcome-wrap .spf-logo .spf--version {
4052
- top: auto;
4053
- left: auto;
4054
- right: 8px;
4055
- bottom: 4px;
4056
- font-size: 11px;
4057
- text-transform: lowercase;
4058
- }
4059
-
4060
- .spf-welcome-wrap .spf-about-text {
4061
- font-weight: 400;
4062
- line-height: 1.6em;
4063
- font-size: 19px;
4064
- margin: 1em 200px 1em 0;
4065
- color: #555d66;
4066
- }
4067
-
4068
- .spf-welcome-wrap .spf-demo-button {
4069
- margin: 1em 200px 2em 0;
4070
- }
4071
-
4072
- .spf-welcome-wrap .nav-tab-wrapper {
4073
- margin-bottom: 20px;
4074
- }
4075
-
4076
- .spf-welcome-wrap ul {
4077
- list-style-type: disc;
4078
- padding-left: 15px;
4079
- }
4080
-
4081
- .spf-welcome-wrap .spf--col {
4082
- float: left;
4083
- padding-right: 20px;
4084
- box-sizing: border-box;
4085
- }
4086
-
4087
- .spf-welcome-wrap .spf--col-2 {
4088
- width: 50%;
4089
- }
4090
-
4091
- .spf-welcome-wrap .spf--col-3 {
4092
- width: 33.333%;
4093
- }
4094
-
4095
- .spf-welcome-wrap .spf--col-4 {
4096
- width: 25%;
4097
- }
4098
-
4099
- .spf-welcome-wrap .spf--col-5 {
4100
- width: 20%;
4101
- }
4102
-
4103
- .spf-welcome-wrap .spf--col-last {
4104
- padding-right: 0;
4105
- }
4106
-
4107
- .spf-welcome-wrap .spf--col-upgrade {
4108
- padding-top: 30px;
4109
- text-align: center;
4110
- }
4111
-
4112
- .spf--table-compare thead td,
4113
- .spf--table-compare tfoot td {
4114
- text-align: center;
4115
- }
4116
-
4117
- .spf--table-compare td {
4118
- font-size: 14px;
4119
- text-align: center;
4120
- vertical-align: middle;
4121
- padding: 10px;
4122
- }
4123
-
4124
- .spf--table-compare td:first-child {
4125
- text-align: left;
4126
- }
4127
-
4128
- .spf--table-compare tfoot td {
4129
- padding: 15px 0;
4130
- }
4131
-
4132
- .spf--table-compare .fa {
4133
- font-size: 12px;
4134
- width: 18px;
4135
- height: 18px;
4136
- line-height: 18px;
4137
- padding: 2px;
4138
- text-align: center;
4139
- color: #fff;
4140
- background-color: #46b450;
4141
- border-radius: 100%;
4142
- }
4143
-
4144
- .spf--table-compare .fa-check {
4145
- background-color: #46b450;
4146
- }
4147
-
4148
- .spf--table-compare .fa-times {
4149
- background-color: #dc3232;
4150
- }
4151
-
4152
- .spf-welcome-cols {
4153
- clear: both;
4154
- margin: 20px 0;
4155
- background-color: #fff;
4156
- padding: 30px 0;
4157
- border-radius: 2px;
4158
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
4159
- }
4160
-
4161
- .spf-welcome-cols .spf--col {
4162
- width: 20%;
4163
- float: left;
4164
- padding: 0 30px;
4165
- box-sizing: border-box;
4166
- text-align: center;
4167
- border-right: 1px solid #e5e5e5;
4168
- }
4169
-
4170
- .spf-welcome-cols .spf--left,
4171
- .spf-welcome-cols .spf--block {
4172
- float: left;
4173
- width: 20%;
4174
- padding: 0 30px;
4175
- text-align: center;
4176
- box-sizing: border-box;
4177
- }
4178
-
4179
- .spf-welcome-cols .spf--block {
4180
- width: 80%;
4181
- }
4182
-
4183
- .spf-welcome-cols .spf--last {
4184
- border-right: none;
4185
- }
4186
-
4187
- .spf-welcome-cols .spf--space {
4188
- height: 20px;
4189
- }
4190
-
4191
- .spf-welcome-cols .spf--icon {
4192
- display: inline-block;
4193
- font-size: 25px;
4194
- width: 50px;
4195
- height: 50px;
4196
- line-height: 50px;
4197
- text-align: center;
4198
- margin-bottom: 10px;
4199
- color: #fff;
4200
- background-color: #555;
4201
- border-radius: 50px;
4202
- }
4203
-
4204
- .spf-welcome-cols .spf--active {
4205
- background-color: #5cb85c;
4206
- }
4207
-
4208
- .spf-welcome-cols .spf--deactive {
4209
- background-color: #e14d43;
4210
- }
4211
-
4212
- .spf-welcome-cols .spf--title {
4213
- font-weight: bold;
4214
- display: block;
4215
- }
4216
-
4217
- .spf-welcome-cols p:last-child {
4218
- margin-bottom: 0;
4219
- }
4220
-
4221
- .spf-code-block {
4222
- margin: 20px 0;
4223
- padding: 5px 20px;
4224
- background-color: #fff;
4225
- border-radius: 2px;
4226
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
4227
- }
4228
-
4229
- .spf-code-block pre {
4230
- font-size: 13px;
4231
- color: #0073aa;
4232
- }
4233
-
4234
- .spf-code-block pre span {
4235
- color: #999;
4236
- }
4237
-
4238
- .spf--table-fields td {
4239
- font-size: 14px;
4240
- }
4241
-
4242
- .spf--upgrade a {
4243
- color: #5cb85c;
4244
- font-weight: bold;
4245
- }
4246
-
4247
- .spf--upgrade a:focus,
4248
- .spf--upgrade a:hover {
4249
- color: #4aa14a;
4250
- outline: none;
4251
- box-shadow: none;
4252
- }
4253
-
4254
- /**
4255
- * 11. Responsive
4256
- */
4257
-
4258
- @media only screen and (max-width: 1200px) {
4259
- .spf-metabox .spf-field .spf-title {
4260
- float: none;
4261
- width: 100%;
4262
- margin-bottom: 10px;
4263
- }
4264
-
4265
- .spf-metabox .spf-field .spf-fieldset {
4266
- margin-left: 0;
4267
- }
4268
- }
4269
-
4270
- @media only screen and (max-width: 782px) {
4271
- .spf-header-inner {
4272
- text-align: center;
4273
- }
4274
-
4275
- .spf-header-inner h1 {
4276
- width: 100%;
4277
- margin-bottom: 10px;
4278
- }
4279
-
4280
- .spf-search,
4281
- .spf-header-right,
4282
- .spf-header-left {
4283
- width: 100%;
4284
- }
4285
-
4286
- .spf-search {
4287
- text-align: center;
4288
- margin-bottom: 15px;
4289
- }
4290
-
4291
- .spf-footer {
4292
- text-align: center;
4293
- }
4294
-
4295
- .spf-buttons {
4296
- float: none;
4297
- }
4298
-
4299
- .spf-copyright {
4300
- float: none;
4301
- margin-top: 10px;
4302
- }
4303
-
4304
- .sp-wpcp-options .spf-nav,
4305
- .spf-nav,
4306
- .spf-expand-all,
4307
- .spf-reset-section,
4308
- .spf-nav-background {
4309
- display: none !important;
4310
- }
4311
-
4312
- .sp-wpcp-options .spf-content,
4313
- .spf-content {
4314
- margin-left: 0;
4315
- }
4316
-
4317
- .spf-section-title,
4318
- .sp-wpcp-options .spf-section,
4319
- .spf-section {
4320
- display: block !important;
4321
- }
4322
-
4323
- .spf-field .spf-title {
4324
- float: none;
4325
- width: 100%;
4326
- margin-bottom: 10px;
4327
- }
4328
-
4329
- .spf-field .spf-fieldset {
4330
- margin-left: 0;
4331
- }
4332
-
4333
- .spf-field-radio ul li {
4334
- margin-top: 4px;
4335
- }
4336
-
4337
- .spf-modal-inner {
4338
- width: 350px;
4339
- height: 380px;
4340
- }
4341
-
4342
- .spf-modal-content {
4343
- height: 282px;
4344
- }
4345
-
4346
- .spf-icon-dialog .spf-modal-inner {
4347
- width: 305px;
4348
- height: 380px;
4349
- }
4350
-
4351
- .spf-icon-dialog .spf-modal-content {
4352
- height: 267px;
4353
- }
4354
-
4355
- .spf-modal-icon .spf-modal-inner {
4356
- width: 330px;
4357
- height: 385px;
4358
- }
4359
-
4360
- .spf-modal-icon .spf-modal-content {
4361
- height: 252px;
4362
- }
4363
-
4364
- .spf-profile>.spf-field>.spf-title {
4365
- float: none;
4366
- width: 100%;
4367
- margin-bottom: 10px;
4368
- }
4369
-
4370
- .spf-profile>.spf-field>.spf-fieldset {
4371
- margin-left: 0;
4372
- }
4373
- }
4374
-
4375
- /**
4376
- * Chosen JS Styles
4377
- */
4378
-
4379
- .chosen-container {
4380
- position: relative;
4381
- display: inline-block;
4382
- vertical-align: middle;
4383
- font-size: 13px;
4384
- user-select: none;
4385
- }
4386
-
4387
- .chosen-container * {
4388
- box-sizing: border-box;
4389
- }
4390
-
4391
- .chosen-container .chosen-drop {
4392
- position: absolute;
4393
- top: 100%;
4394
- z-index: 1010;
4395
- max-width: 390px;
4396
- /* SP Style */
4397
- width: 100%;
4398
- border: 1px solid #aaa;
4399
- border-top: 0;
4400
- background: #fff;
4401
- box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
4402
- clip: rect(0, 0, 0, 0);
4403
- clip-path: inset(100% 100%);
4404
- }
4405
-
4406
- .chosen-container.chosen-with-drop .chosen-drop {
4407
- clip: auto;
4408
- clip-path: none;
4409
- }
4410
-
4411
- .chosen-container a {
4412
- cursor: pointer;
4413
- }
4414
-
4415
- .chosen-container .search-choice .group-name,
4416
- .chosen-container .chosen-single .group-name {
4417
- margin-right: 4px;
4418
- overflow: hidden;
4419
- white-space: nowrap;
4420
- text-overflow: ellipsis;
4421
- font-weight: normal;
4422
- color: #999999;
4423
- }
4424
-
4425
- .chosen-container .search-choice .group-name:after,
4426
- .chosen-container .chosen-single .group-name:after {
4427
- content: ":";
4428
- padding-left: 2px;
4429
- vertical-align: top;
4430
- }
4431
-
4432
- .chosen-container-single .chosen-single {
4433
- position: relative;
4434
- display: block;
4435
- overflow: hidden;
4436
- padding: 0 0 0 8px;
4437
- height: 25px;
4438
- border: 1px solid #aaa;
4439
- border-radius: 5px;
4440
- background-color: #fff;
4441
- background: linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
4442
- background-clip: padding-box;
4443
- box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(0, 0, 0, 0.1);
4444
- color: #444;
4445
- text-decoration: none;
4446
- white-space: nowrap;
4447
- line-height: 24px;
4448
- }
4449
-
4450
- .chosen-container-single .chosen-default {
4451
- color: #999;
4452
- }
4453
-
4454
- .chosen-container-single .chosen-single span {
4455
- display: block;
4456
- overflow: hidden;
4457
- margin-right: 26px;
4458
- text-overflow: ellipsis;
4459
- white-space: nowrap;
4460
- }
4461
-
4462
- .chosen-container-single .chosen-single-with-deselect span {
4463
- margin-right: 38px;
4464
- }
4465
-
4466
- .chosen-container-single .chosen-single abbr {
4467
- position: absolute;
4468
- top: 6px;
4469
- right: 26px;
4470
- display: block;
4471
- width: 12px;
4472
- height: 12px;
4473
- font-size: 1px;
4474
- }
4475
-
4476
- .chosen-container-single .chosen-single div {
4477
- position: absolute;
4478
- top: 0;
4479
- right: 0;
4480
- display: block;
4481
- width: 18px;
4482
- height: 100%;
4483
- }
4484
-
4485
- .chosen-container-single .chosen-single div b {
4486
- display: block;
4487
- width: 100%;
4488
- height: 100%;
4489
- }
4490
-
4491
- .chosen-container-single .chosen-search {
4492
- position: relative;
4493
- z-index: 1010;
4494
- margin: 0;
4495
- padding: 3px 4px;
4496
- white-space: nowrap;
4497
- }
4498
-
4499
- .chosen-container-single .chosen-search input[type="text"] {
4500
- margin: 1px 0;
4501
- padding: 4px 20px 4px 5px;
4502
- width: 100%;
4503
- height: auto;
4504
- outline: 0;
4505
- border: 1px solid #aaa;
4506
- font-size: 1em;
4507
- font-family: sans-serif;
4508
- line-height: normal;
4509
- border-radius: 0;
4510
- }
4511
-
4512
- .chosen-container-single .chosen-drop {
4513
- margin-top: -1px;
4514
- border-radius: 0 0 4px 4px;
4515
- background-clip: padding-box;
4516
- }
4517
-
4518
- .chosen-container-single.chosen-container-single-nosearch .chosen-search {
4519
- position: absolute;
4520
- clip: rect(0, 0, 0, 0);
4521
- clip-path: inset(100% 100%);
4522
- }
4523
-
4524
- .chosen-container .chosen-results {
4525
- color: #444;
4526
- position: relative;
4527
- overflow-x: hidden;
4528
- overflow-y: auto;
4529
- margin: 0 4px 4px 0;
4530
- padding: 0 0 0 4px;
4531
- max-height: 240px;
4532
- -webkit-overflow-scrolling: touch;
4533
- }
4534
-
4535
- .chosen-container .chosen-results li {
4536
- display: none;
4537
- margin: 0;
4538
- padding: 5px 6px;
4539
- list-style: none;
4540
- line-height: 15px;
4541
- word-wrap: break-word;
4542
- -webkit-touch-callout: none;
4543
- }
4544
-
4545
- .chosen-container .chosen-results li.active-result {
4546
- display: list-item;
4547
- cursor: pointer;
4548
- max-width: 390px;
4549
- /* SP Style */
4550
- }
4551
-
4552
- .chosen-container .chosen-results li.disabled-result {
4553
- display: list-item;
4554
- color: #ccc;
4555
- cursor: default;
4556
- }
4557
-
4558
- .chosen-container .chosen-results li.highlighted {
4559
- background-color: #3875d7;
4560
- background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
4561
- color: #fff;
4562
- }
4563
-
4564
- .chosen-container .chosen-results li.no-results {
4565
- color: #777;
4566
- display: list-item;
4567
- background: #f4f4f4;
4568
- }
4569
-
4570
- .chosen-container .chosen-results li.group-result {
4571
- display: list-item;
4572
- font-weight: bold;
4573
- cursor: default;
4574
- }
4575
-
4576
- .chosen-container .chosen-results li.group-option {
4577
- padding-left: 15px;
4578
- }
4579
-
4580
- .chosen-container .chosen-results li em {
4581
- font-style: normal;
4582
- text-decoration: underline;
4583
- }
4584
-
4585
- .chosen-container-multi .chosen-choices {
4586
- position: relative;
4587
- overflow: hidden;
4588
- margin: 0;
4589
- padding: 0 5px;
4590
- max-width: 390px;
4591
- /* SP Style */
4592
- height: auto;
4593
- border: 1px solid #aaa;
4594
- background-color: #fff;
4595
- background-image: linear-gradient(#eeeeee 1%, #ffffff 15%);
4596
- cursor: text;
4597
- }
4598
-
4599
- .chosen-container-multi .chosen-choices li {
4600
- float: left;
4601
- list-style: none;
4602
- }
4603
-
4604
- .chosen-container-multi .chosen-choices li.search-field {
4605
- margin: 0;
4606
- padding: 0;
4607
- white-space: nowrap;
4608
- }
4609
-
4610
- .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
4611
- margin: 1px 0;
4612
- padding: 0;
4613
- height: 25px;
4614
- outline: 0;
4615
- border: 0 !important;
4616
- background: transparent !important;
4617
- box-shadow: none;
4618
- color: #999;
4619
- font-size: 100%;
4620
- font-family: sans-serif;
4621
- line-height: normal;
4622
- border-radius: 0;
4623
- width: 25px;
4624
- }
4625
-
4626
- .chosen-container-multi .chosen-choices li.search-choice {
4627
- position: relative;
4628
- margin: 3px 5px 3px 0;
4629
- padding: 3px 20px 3px 5px;
4630
- border: 1px solid #aaa;
4631
- max-width: 100%;
4632
- border-radius: 3px;
4633
- background-color: #eeeeee;
4634
- background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
4635
- background-size: 100% 19px;
4636
- background-repeat: repeat-x;
4637
- background-clip: padding-box;
4638
- box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
4639
- color: #333;
4640
- line-height: 13px;
4641
- cursor: default;
4642
- }
4643
-
4644
- .chosen-container-multi .chosen-choices li.search-choice span {
4645
- word-wrap: break-word;
4646
- }
4647
-
4648
- .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
4649
- position: absolute;
4650
- top: 4px;
4651
- right: 3px;
4652
- display: block;
4653
- width: 12px;
4654
- height: 12px;
4655
- font-size: 1px;
4656
- }
4657
-
4658
- .chosen-container-multi .chosen-choices li.search-choice-disabled {
4659
- padding-right: 5px;
4660
- border: 1px solid #ccc;
4661
- background-color: #e4e4e4;
4662
- background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
4663
- color: #666;
4664
- }
4665
-
4666
- .chosen-container-multi .chosen-choices li.search-choice-focus {
4667
- background: #d4d4d4;
4668
- }
4669
-
4670
- .chosen-container-multi .chosen-results {
4671
- margin: 0;
4672
- padding: 0;
4673
- }
4674
-
4675
- .chosen-container-multi .chosen-drop .result-selected {
4676
- display: none;
4677
- /* SP Style */
4678
- color: #ccc;
4679
- cursor: default;
4680
- }
4681
-
4682
- .chosen-container-active .chosen-single {
4683
- border: 1px solid #5897fb;
4684
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
4685
- }
4686
-
4687
- .chosen-container-active.chosen-with-drop .chosen-single {
4688
- border: 1px solid #aaa;
4689
- border-bottom-right-radius: 0;
4690
- border-bottom-left-radius: 0;
4691
- background-image: linear-gradient(#eeeeee 20%, #ffffff 80%);
4692
- box-shadow: 0 1px 0 #fff inset;
4693
- }
4694
-
4695
- .chosen-container-active.chosen-with-drop .chosen-single div {
4696
- border-left: none;
4697
- background: transparent;
4698
- }
4699
-
4700
- .chosen-container-active .chosen-choices {
4701
- border: 1px solid #5897fb;
4702
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
4703
- }
4704
-
4705
- .chosen-container-active .chosen-choices li.search-field input[type="text"] {
4706
- color: #222 !important;
4707
- }
4708
-
4709
- .chosen-disabled {
4710
- opacity: 0.5 !important;
4711
- cursor: default;
4712
- }
4713
-
4714
- .chosen-disabled .chosen-single {
4715
- cursor: default;
4716
- }
4717
-
4718
- .chosen-disabled .chosen-choices .search-choice .search-choice-close {
4719
- cursor: default;
4720
- }
4721
-
4722
- .chosen-rtl {
4723
- text-align: right;
4724
- }
4725
-
4726
- .chosen-rtl .chosen-single {
4727
- overflow: visible;
4728
- padding: 0 8px 0 0;
4729
- }
4730
-
4731
- .chosen-rtl .chosen-single span {
4732
- margin-right: 0;
4733
- margin-left: 26px;
4734
- direction: rtl;
4735
- }
4736
-
4737
- .chosen-rtl .chosen-single-with-deselect span {
4738
- margin-left: 38px;
4739
- }
4740
-
4741
- .chosen-rtl .chosen-single div {
4742
- right: auto;
4743
- left: 3px;
4744
- }
4745
-
4746
- .chosen-rtl .chosen-single abbr {
4747
- right: auto;
4748
- left: 26px;
4749
- }
4750
-
4751
- .chosen-rtl .chosen-choices li {
4752
- float: right;
4753
- }
4754
-
4755
- .chosen-rtl .chosen-choices li.search-field input[type="text"] {
4756
- direction: rtl;
4757
- }
4758
-
4759
- .chosen-rtl .chosen-choices li.search-choice {
4760
- margin: 3px 5px 3px 0;
4761
- padding: 3px 5px 3px 19px;
4762
- }
4763
-
4764
- .chosen-rtl .chosen-choices li.search-choice .search-choice-close {
4765
- right: auto;
4766
- left: 4px;
4767
- }
4768
-
4769
- .chosen-rtl.chosen-container-single .chosen-results {
4770
- margin: 0 0 4px 4px;
4771
- padding: 0 4px 0 0;
4772
- }
4773
-
4774
- .chosen-rtl .chosen-results li.group-option {
4775
- padding-right: 15px;
4776
- padding-left: 0;
4777
- }
4778
-
4779
- .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
4780
- border-right: none;
4781
- }
4782
-
4783
- .chosen-rtl .chosen-search input[type="text"] {
4784
- padding: 4px 5px 4px 20px;
4785
- direction: rtl;
4786
- }
4787
-
4788
- /**
4789
- *
4790
- *Custom Style for the WPCP
4791
- *
4792
- **/
4793
-
4794
- #sp_wpcp_shortcode_options {
4795
- border-top-color: #f1f1f1;
4796
- }
4797
-
4798
- #sp_wpcp_shortcode_options .spf-nav ul li {
4799
- margin-bottom: -1px;
4800
- }
4801
-
4802
- #sp_wpcp_shortcode_options .spf-nav.spf-nav-metabox {
4803
- border-right-color: #f1f1f1;
4804
- border-right-color: #f1f1f1;
4805
- background: #f1f1f1;
4806
- margin-right: -2px;
4807
- }
4808
-
4809
- #sp_wpcp_shortcode_options .spf-content {
4810
- border-top: 1px solid #e5e5e5;
4811
- box-shadow: 0 -1px 1px rgba(0, 0, 0, .04);
4812
- }
4813
-
4814
- #spf-section-sp_wpcp_upload_options_1 .spf-field-carousel_type .spf-title,
4815
- #spf-section-sp_wpcp_upload_options_1 .spf-field-gallery .spf-title,
4816
- .wpcp_carousel_content_wrapper .spf-title,
4817
- .wpcp-video-description .spf-title,
4818
- .wpcp-video-field-wrapper>.spf-title {
4819
- width: 100%;
4820
- }
4821
-
4822
- #spf-section-sp_wpcp_upload_options_1 .spf-field-carousel_type .spf-fieldset,
4823
- #spf-section-sp_wpcp_upload_options_1 .spf-field-gallery .spf-fieldset,
4824
- .wpcp_carousel_content_wrapper .spf-fieldset,
4825
- .wpcp-video-description .spf-fieldset,
4826
- .wpcp-video-field-wrapper>.spf-fieldset {
4827
- margin-top: 30px;
4828
- margin-left: 0;
4829
- }
4830
-
4831
- #sp_wpcp_display_shortcode .hndle,
4832
- #sp_wpcp_display_shortcode .handlediv,
4833
- #sp_wpcp_display_shortcode .postbox-header,
4834
- #sp_wpcp_shortcode_options .hndle,
4835
- #sp_wpcp_shortcode_options .handlediv,
4836
- #sp_wpcp_shortcode_options .postbox-header,
4837
- #sp_wpcp_upload_options .handlediv,
4838
- #sp_wpcp_upload_options .postbox-header,
4839
- #sp_wpcp_upload_options .hndle {
4840
- display: none;
4841
- }
4842
-
4843
- #spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header {
4844
- background-color: #157592;
4845
- background: linear-gradient(-45deg, #22afba, #157592);
4846
- padding: 20px 26px;
4847
- overflow: hidden;
4848
- height: 33px;
4849
- }
4850
-
4851
- #spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header .support {
4852
- margin-left: 16px;
4853
- float: right;
4854
- }
4855
-
4856
- #spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header .support a {
4857
- color: #ffffff;
4858
- text-decoration: none;
4859
- line-height: 35px;
4860
- font-size: 15px;
4861
- font-weight: 500;
4862
- }
4863
-
4864
- /**
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 {
4873
- position: relative;
4874
- }
4875
- .spf-field-carousel_type .spf--image label strong {
4876
- position: absolute;
4877
- top: 3px;
4878
- right: 3px;
4879
- background: #cbd6df;
4880
- padding: 0px 5px;
4881
- font-size: 10px;
4882
- }
4883
- #sp_wpcp_shortcode_options .hidden{
4884
- display: none;
4885
- }
4886
-
4887
- /*
4888
- * Shortcode footer.
4889
- */
4890
- .spf-field-shortcode.wpcp-admin-footer .wpcp-shortcode-selectable {
4891
- background-color: rgba(82, 179, 217, 0.11);
4892
- padding: 10px 15px 10px 28px;
4893
- display: inline-block;
4894
- -webkit-touch-callout: all;
4895
- -webkit-user-select: all;
4896
- -khtml-user-select: all;
4897
- -moz-user-select: all;
4898
- -ms-user-select: all;
4899
- user-select: all;
4900
- border: 1px solid rgba(82, 179, 217, 0.2);
4901
- border-radius: 2px;
4902
- cursor: pointer;
4903
- position: relative;
4904
- }
4905
- .spf-field-shortcode.wpcp-admin-footer .wpcp-shortcode-selectable::after {
4906
- content: url(../images/copy.svg);
4907
- width: 16px;
4908
- left: 10px;
4909
- top: 50%;
4910
- position: absolute;
4911
- margin-top: -7px;
4912
- }
4913
- .spf-field-shortcode.wpcp-admin-footer .sptp-copy-btn {
4914
- width: 16px;
4915
- margin-left: 13px;
4916
- position: absolute;
4917
- top: 50%;
4918
- margin-top: -8px;
4919
- }
4920
- #spf-section-sp_wpcp_display_shortcode_1 .spf-field {
4921
- display: flex;
4922
- padding: 0;
4923
- flex-wrap: wrap;
4924
- }
4925
- .spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap:first-of-type {
4926
- border-right: 1px solid #ddd;
4927
- }
4928
- .spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap {
4929
- padding-top: 22px;
4930
- padding-bottom: 22px;
4931
- text-align: center;
4932
- width: 49%;
4933
- }
4934
- .spf-field-shortcode.wpcp-admin-footer .wpcp-sc-title {
4935
- font-weight: 500;
4936
- font-size: 14px !important;
4937
- padding-top: 0 !important;
4938
- color: #4c5158;
4939
- margin-right: 5px;
4940
- }
4941
-
4942
- @media only screen and (max-width: 990px) {
4943
- .spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap:first-of-type {
4944
- border-right: none;
4945
- border-bottom: 1px solid #ddd;
4946
- }
4947
-
4948
- .spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap {
4949
- width: 100%;
4950
- }
4951
- }
4952
-
4953
- /* Pro only field css */
4954
- .spf-field-image_select .spf--image.spf-pro-only,
4955
- .spf-field-button_set .spf--button.spf-pro-only {
4956
- color: rgba(85, 85, 85, 0.6) !important;
4957
- pointer-events: none;
4958
- }
4959
- .spf-field-button_set .spf--button.spf-pro-only {
4960
- background-color: rgba(247, 247, 247, 0.4) !important;
4961
- }
4962
-
4963
- .spf-field.spf-field-switcher.only_pro_switcher .spf--ball::after{
4964
- content: "PRO";
4965
- position: relative;
4966
- text-align: center;
4967
- width: 24px;
4968
- float: right;
4969
- font-weight: 600;
4970
- font-size: 8px;
4971
- color: #a5a5a5;
4972
- opacity: 1;
4973
- line-height: 18px;
4974
- }
4975
- .spf-field-button_set .spf--button.spf-pro-only:after,
4976
- .spf-field-image_select .spf--image.spf-pro-only:after {
4977
- position: absolute;
4978
- top: 0;
4979
- right: 0;
4980
- color: #a5a5a5;
4981
- background-color: #e0e0e0;
4982
- font-weight: 500;
4983
- padding: 0 4px;
4984
- content: "PRO";
4985
- text-align: center;
4986
- font-size: 8px;
4987
- line-height: 11px;
4988
- opacity: 1;
4989
- }
4990
- .spf-field.spf-field-switcher.only_pro_switcher .spf--switcher{
4991
- background: #cbcfd0;
4992
- pointer-events: none;
4993
- }
4994
- #spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header img {
4995
- max-width: 200px;
4996
- }
4997
- /* hide setting page wraper title */
4998
- .sp_wp_carousel_page_wpcp_settings .wrap h1 {
4999
- display: none;
5000
- }
5001
- .spf-notice {
5002
- color: #999;
5003
- font-style: italic;
5004
- font-size: 13px;
5005
- padding: 12px 12px 12px 0!important;
5006
- border: none!important;
5007
- }
5008
- .spf-field-notice{
5009
- background-color: transparent!important;
5010
- }
5011
-
5012
-
5013
- /* Import export css */
5014
- .spf-field.spf-field-button_set.wpcp_export {
5015
- margin-top: 0;
5016
- padding-top: 0;
5017
- }
5018
-
5019
- .spf-field-button_set.wpcp_export .spf--button:hover,
5020
- .spf-field.spf-field-custom_import.wpcp_import button:hover {
5021
- background: #135e96;
5022
- border-color: #135e96;
5023
- color: #fff;
5024
- }
5025
-
5026
- .spf-field.spf-field-custom_import.wpcp_import button,
5027
- .spf-field-button_set.wpcp_export .spf--button {
5028
- background: #2271b1;
5029
- border-color: #2271b1;
5030
- color: #fff;
5031
- text-decoration: none;
5032
- text-shadow: none;
5033
- display: inline-block;
5034
- text-decoration: none;
5035
- font-size: 13px;
5036
- line-height: 2.15384615;
5037
- min-height: 30px;
5038
- margin: 0;
5039
- padding: 0 10px;
5040
- cursor: pointer;
5041
- border-width: 1px;
5042
- border-style: solid;
5043
- -webkit-appearance: none;
5044
- border-radius: 3px;
5045
- white-space: nowrap;
5046
- box-sizing: border-box;
5047
- }
5048
-
5049
- .sp-lcp-options .spf-field-select .spf-fieldset {
5050
- position: relative;
5051
- }
5052
-
5053
- .spf-field.spf-field-custom_import.wpcp_import .spf-fieldset {
5054
- position: relative;
5055
- }
5056
-
5057
- .spf-field.spf-field-custom_import.wpcp_import p {
5058
- padding-bottom: 0;
5059
- margin-bottom: 1px;
5060
- }
5061
-
5062
- .spf-field.spf-field-custom_import.wpcp_import button {
5063
- margin-top: 10px;
5064
- padding-bottom: 0px;
5065
- }
5066
-
5067
- .spf-field.spf-field-custom_import.wpcp_import .spf-help {
5068
- cursor: help;
5069
- position: absolute;
5070
- top: 80%;
5071
- transform: translateY(-50%);
5072
- padding: 5px;
5073
- font-size: 14px;
5074
- color: #aaa;
5075
- width: 15px;
5076
- left: 64px;
5077
- }
5078
-
5079
- .spf-field.spf-field-select.wpcp_post_ids .chosen-container .chosen-drop {
5080
- max-width: 400px;
5081
- }
5082
-
5083
- .spf-field.spf-field-select.wpcp_post_ids .chosen-container {
5084
- max-width: 400px;
5085
- }
5086
-
5087
- .spf-field.spf-field-select.wpcp_post_ids {
5088
- padding-top: 0;
5089
- }
5090
-
5091
- .sp-wpcp-options .spf-header-inner h1.export-import img {
5092
- height: 24px;
5093
- height: 24px;
5094
- float: left;
5095
- width: 28px;
5096
- margin-right: 8px;
5097
- padding-top: 6px;
5098
- }
5099
-
5100
- .sp-wpcp-options.wpcp_tools .spf-nav-options li:nth-child(1) a {
5101
- background-image: url(../images/export-icon.svg);
5102
- }
5103
-
5104
- .sp-wpcp-options.wpcp_tools .spf-nav-options li:nth-child(2) a {
5105
- background-image: url(../images/import.svg);
5106
- }
5107
-
5108
- .sp-wpcp-options.wpcp_tools .spf-nav-options li:nth-child(1) a.spf-section-active {
5109
- background-image: url(../images/file-export-icon1.svg);
5110
- }
5111
-
5112
- .sp-wpcp-options.wpcp_tools .spf-nav-options li:nth-child(2) a.spf-section-active {
5113
- background-image: url(../images/file-import-icon1.svg);
5114
- }
5115
-
5116
- .sp-wpcp-options.wpcp_tools .spf-nav-options ul li a {
5117
- padding: 15px 30px;
5118
- background-size: 14px;
5119
- background-position: 10px center;
5120
- background-repeat: no-repeat;
5121
- }
5122
- /* help text style */
5123
- .spf-field.spf-field-column .clear{
5124
- clear: inherit;
5125
- }
5126
- .spf-field-checkbox .spf-help, .spf-field-column .spf-help {
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 DELETED
@@ -1 +0,0 @@
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-gutenberg-block.js DELETED
@@ -1,79 +0,0 @@
1
- /**
2
- *
3
- * -----------------------------------------------------------
4
- *
5
- * SP Framework Gutenberg Block
6
- * A Simple and Lightweight WordPress Option Framework
7
- *
8
- * -----------------------------------------------------------
9
- *
10
- */
11
- ( function( blocks, editor, element, components ) {
12
-
13
- if( !window.spf_gutenberg_blocks ) { return; }
14
-
15
- window.spf_gutenberg_blocks.forEach( function( block ) {
16
-
17
- var registerBlockType = blocks.registerBlockType;
18
- var PlainText = editor.PlainText;
19
- var createElement = element.createElement;
20
- var RawHTML = element.RawHTML;
21
- var Button = components.Button;
22
-
23
- registerBlockType('spf-gutenberg-block/block-'+block.hash, {
24
- title: block.gutenberg.title,
25
- icon: block.gutenberg.icon,
26
- category: block.gutenberg.category,
27
- description: block.gutenberg.description,
28
- keywords: block.gutenberg.keywords,
29
- supports: {
30
- html: false,
31
- className: false,
32
- customClassName: false,
33
- },
34
- attributes: {
35
- shortcode: {
36
- string: 'string',
37
- source: 'text',
38
- }
39
- },
40
- edit: function (props) {
41
- return (
42
- createElement('div', {className: 'spf-shortcode-block'},
43
-
44
- createElement(Button, {
45
- 'data-modal-id': block.modal_id,
46
- 'data-gutenberg-id': block.hash,
47
- className: 'button is-button is-default is-large spf-shortcode-button',
48
- onClick: function () {
49
- window.spf_gutenberg_props = props;
50
- },
51
- }, block.button_title ),
52
-
53
- createElement(PlainText, {
54
- placeholder: block.gutenberg.placeholder,
55
- className: 'input-control',
56
- onChange: function (value) {
57
- props.setAttributes({
58
- shortcode: value
59
- })
60
- },
61
- value: props.attributes.shortcode
62
- })
63
-
64
- )
65
- );
66
- },
67
- save: function (props) {
68
- return createElement(RawHTML, {}, props.attributes.shortcode);
69
- }
70
- });
71
-
72
- });
73
-
74
- })(
75
- window.wp.blocks,
76
- window.wp.editor,
77
- window.wp.element,
78
- window.wp.components
79
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/wpcfree-metabox/assets/js/spf-gutenberg-block.min.js DELETED
@@ -1 +0,0 @@
1
- !function(blocks,editor,element,components){window.spf_gutenberg_blocks&&window.spf_gutenberg_blocks.forEach(function(block){var registerBlockType=blocks.registerBlockType,PlainText=editor.PlainText,createElement=element.createElement,RawHTML=element.RawHTML,Button=components.Button;registerBlockType("spf-gutenberg-block/block-"+block.hash,{title:block.gutenberg.title,icon:block.gutenberg.icon,category:block.gutenberg.category,description:block.gutenberg.description,keywords:block.gutenberg.keywords,supports:{html:!1,className:!1,customClassName:!1},attributes:{shortcode:{string:"string",source:"text"}},edit:function(props){return createElement("div",{className:"spf-shortcode-block"},createElement(Button,{"data-modal-id":block.modal_id,"data-gutenberg-id":block.hash,className:"button is-button is-default is-large spf-shortcode-button",onClick:function(){window.spf_gutenberg_props=props}},block.button_title),createElement(PlainText,{placeholder:block.gutenberg.placeholder,className:"input-control",onChange:function(value){props.setAttributes({shortcode:value})},value:props.attributes.shortcode}))},save:function(props){return createElement(RawHTML,{},props.attributes.shortcode)}})})}(window.wp.blocks,window.wp.editor,window.wp.element,window.wp.components);
 
admin/views/wpcfree-metabox/assets/js/spf-plugins.min.js DELETED
@@ -1 +0,0 @@
1
- (function(){var $,AbstractChosen,Chosen,SelectParser,bind=function(fn,me){return function(){return fn.apply(me,arguments)}},extend=function(child,parent){for(var key in parent)hasProp.call(parent,key)&&(child[key]=parent[key]);function ctor(){this.constructor=child}return ctor.prototype=parent.prototype,child.prototype=new ctor,child.__super__=parent.prototype,child},hasProp={}.hasOwnProperty;(SelectParser=function(){function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(child){return"OPTGROUP"===child.nodeName.toUpperCase()?this.add_group(child):this.add_option(child)},SelectParser.prototype.add_group=function(group){var group_position,i,len,option,ref,results1;for(group_position=this.parsed.length,this.parsed.push({array_index:group_position,group:!0,label:group.label,title:group.title?group.title:void 0,children:0,disabled:group.disabled,classes:group.className}),results1=[],i=0,len=(ref=group.childNodes).length;i<len;i++)option=ref[i],results1.push(this.add_option(option,group_position,group.disabled));return results1},SelectParser.prototype.add_option=function(option,group_position,group_disabled){if("OPTION"===option.nodeName.toUpperCase())return""!==option.text?(null!=group_position&&(this.parsed[group_position].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:option.value,text:option.text,html:option.innerHTML,title:option.title?option.title:void 0,selected:option.selected,disabled:!0===group_disabled?group_disabled:option.disabled,group_array_index:group_position,group_label:null!=group_position?this.parsed[group_position].label:null,classes:option.className,style:option.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},SelectParser}()).select_to_array=function(select){var child,i,len,parser,ref;for(parser=new SelectParser,i=0,len=(ref=select.childNodes).length;i<len;i++)child=ref[i],parser.add_node(child);return parser.parsed},AbstractChosen=function(){function AbstractChosen(form_field,options1){this.form_field=form_field,this.options=null!=options1?options1:{},this.label_click_handler=bind(this.label_click_handler,this),AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return AbstractChosen.prototype.set_default_values=function(){var _this;return this.click_test_action=(_this=this,function(evt){return _this.test_active_click(evt)}),this.activate_action=function(_this){return function(evt){return _this.activate_field(evt)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},AbstractChosen.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.choice_label=function(item){return this.include_group_label_in_selected&&null!=item.group_label?"<b class='group-name'>"+this.escape_html(item.group_label)+"</b>"+item.html:item.html},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(evt){if(this.is_multiple){if(!this.active_field)return setTimeout((_this=this,function(){return _this.container_mousedown()}),50)}else if(!this.active_field)return this.activate_field();var _this},AbstractChosen.prototype.input_blur=function(evt){if(!this.mouse_on_container)return this.active_field=!1,setTimeout((_this=this,function(){return _this.blur_test()}),100);var _this},AbstractChosen.prototype.label_click_handler=function(evt){return this.is_multiple?this.container_mousedown(evt):this.activate_field()},AbstractChosen.prototype.results_option_build=function(options){var content,data,data_content,i,len,ref,shown_results;for(content="",shown_results=0,i=0,len=(ref=this.results_data).length;i<len&&(data_content="",""!==(data_content=(data=ref[i]).group?this.result_add_group(data):this.result_add_option(data))&&(shown_results++,content+=data_content),(null!=options?options.first:void 0)&&(data.selected&&this.is_multiple?this.choice_build(data):data.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(data))),!(shown_results>=this.max_shown_results));i++);return content},AbstractChosen.prototype.result_add_option=function(option){var classes,option_el;return option.search_match&&this.include_option_in_results(option)?(classes=[],option.disabled||option.selected&&this.is_multiple||classes.push("active-result"),!option.disabled||option.selected&&this.is_multiple||classes.push("disabled-result"),option.selected&&classes.push("result-selected"),null!=option.group_array_index&&classes.push("group-option"),""!==option.classes&&classes.push(option.classes),(option_el=document.createElement("li")).className=classes.join(" "),option.style&&(option_el.style.cssText=option.style),option_el.setAttribute("data-option-array-index",option.array_index),option_el.innerHTML=option.highlighted_html||option.html,option.title&&(option_el.title=option.title),this.outerHTML(option_el)):""},AbstractChosen.prototype.result_add_group=function(group){var classes,group_el;return(group.search_match||group.group_match)&&group.active_options>0?((classes=[]).push("group-result"),group.classes&&classes.push(group.classes),(group_el=document.createElement("li")).className=classes.join(" "),group_el.innerHTML=group.highlighted_html||this.escape_html(group.label),group.title&&(group_el.title=group.title),this.outerHTML(group_el)):""},AbstractChosen.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},AbstractChosen.prototype.reset_single_select_options=function(){var i,len,ref,result,results1;for(results1=[],i=0,len=(ref=this.results_data).length;i<len;i++)(result=ref[i]).selected?results1.push(result.selected=!1):results1.push(void 0);return results1},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(evt){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(options){var escapedQuery,fix,i,len,option,prefix,query,ref,regex,results,results_group,search_match,startpos,suffix,text;for(this.no_results_clear(),results=0,escapedQuery=(query=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),regex=this.get_search_regex(escapedQuery),i=0,len=(ref=this.results_data).length;i<len;i++)(option=ref[i]).search_match=!1,results_group=null,search_match=null,option.highlighted_html="",this.include_option_in_results(option)&&(option.group&&(option.group_match=!1,option.active_options=0),null!=option.group_array_index&&this.results_data[option.group_array_index]&&(0===(results_group=this.results_data[option.group_array_index]).active_options&&results_group.search_match&&(results+=1),results_group.active_options+=1),text=option.group?option.label:option.text,option.group&&!this.group_search||(search_match=this.search_string_match(text,regex),option.search_match=null!=search_match,option.search_match&&!option.group&&(results+=1),option.search_match?(query.length&&(startpos=search_match.index,prefix=text.slice(0,startpos),fix=text.slice(startpos,startpos+query.length),suffix=text.slice(startpos+query.length),option.highlighted_html=this.escape_html(prefix)+"<em>"+this.escape_html(fix)+"</em>"+this.escape_html(suffix)),null!=results_group&&(results_group.group_match=!0)):null!=option.group_array_index&&this.results_data[option.group_array_index].search_match&&(option.search_match=!0)));return this.result_clear_highlight(),results<1&&query.length?(this.update_results_content(""),this.no_results(query)):(this.update_results_content(this.results_option_build()),(null!=options?options.skip_highlight:void 0)?void 0:this.winnow_results_set_highlight())},AbstractChosen.prototype.get_search_regex=function(escaped_search_string){var regex_flag,regex_string;return regex_string=this.search_contains?escaped_search_string:"(^|\\s|\\b)"+escaped_search_string+"[^\\s]*",this.enable_split_word_search||this.search_contains||(regex_string="^"+regex_string),regex_flag=this.case_sensitive_search?"":"i",new RegExp(regex_string,regex_flag)},AbstractChosen.prototype.search_string_match=function(search_string,regex){var match;return match=regex.exec(search_string),!this.search_contains&&(null!=match?match[1]:void 0)&&(match.index+=1),match},AbstractChosen.prototype.choices_count=function(){var i,len,option,ref;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,i=0,len=(ref=this.form_field.options).length;i<len;i++)(option=ref[i]).selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(evt){if(evt.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},AbstractChosen.prototype.keydown_checker=function(evt){var ref,stroke;switch(stroke=null!=(ref=evt.which)?ref:evt.keyCode,this.search_field_scale(),8!==stroke&&this.pending_backstroke&&this.clear_backstroke(),stroke){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(evt),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&evt.preventDefault();break;case 32:this.disable_search&&evt.preventDefault();break;case 38:evt.preventDefault(),this.keyup_arrow();break;case 40:evt.preventDefault(),this.keydown_arrow()}},AbstractChosen.prototype.keyup_checker=function(evt){var ref,stroke;switch(stroke=null!=(ref=evt.which)?ref:evt.keyCode,this.search_field_scale(),stroke){case 8:this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:evt.preventDefault(),this.results_showing&&this.result_select(evt);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},AbstractChosen.prototype.clipboard_event_checker=function(evt){var _this;if(!this.is_disabled)return setTimeout((_this=this,function(){return _this.results_search()}),50)},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(option){return!(this.is_multiple&&!this.display_selected_options&&option.selected)&&(!(!this.display_disabled_options&&option.disabled)&&!option.empty)},AbstractChosen.prototype.search_results_touchstart=function(evt){return this.touch_started=!0,this.search_results_mouseover(evt)},AbstractChosen.prototype.search_results_touchmove=function(evt){return this.touch_started=!1,this.search_results_mouseout(evt)},AbstractChosen.prototype.search_results_touchend=function(evt){if(this.touch_started)return this.search_results_mouseup(evt)},AbstractChosen.prototype.outerHTML=function(element){var tmp;return element.outerHTML?element.outerHTML:((tmp=document.createElement("div")).appendChild(element),tmp.innerHTML)},AbstractChosen.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n <span>'+this.default_text+'</span>\n <div><b></b></div>\n</a>\n<div class="chosen-drop">\n <div class="chosen-search">\n <input class="chosen-search-input" type="text" autocomplete="off" />\n </div>\n <ul class="chosen-results"></ul>\n</div>'},AbstractChosen.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n <li class="search-field">\n <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n </li>\n</ul>\n<div class="chosen-drop">\n <ul class="chosen-results"></ul>\n</div>'},AbstractChosen.prototype.get_no_results_html=function(terms){return'<li class="no-results">\n '+this.results_none_found+" <span>"+this.escape_html(terms)+"</span>\n</li>"},AbstractChosen.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen}(),($=jQuery).fn.extend({chosen:function(options){return AbstractChosen.browser_is_supported()?this.each(function(input_field){var $this,chosen;chosen=($this=$(this)).data("chosen"),"destroy"!==options?chosen instanceof Chosen||$this.data("chosen",new Chosen(this,options)):chosen instanceof Chosen&&chosen.destroy()}):this}}),Chosen=function(superClass){function Chosen(){return Chosen.__super__.constructor.apply(this,arguments)}return extend(Chosen,superClass),Chosen.prototype.setup=function(){return this.form_field_jq=$(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},Chosen.prototype.set_up_html=function(){var container_classes,container_props;return(container_classes=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&container_classes.push(this.form_field.className),this.is_rtl&&container_classes.push("chosen-rtl"),container_props={class:container_classes.join(" "),title:this.form_field.title},this.form_field.id.length&&(container_props.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=$("<div />",container_props),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},Chosen.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var _this;return this.container.on("touchstart.chosen",(_this=this,function(evt){_this.container_mousedown(evt)})),this.container.on("touchend.chosen",function(_this){return function(evt){_this.container_mouseup(evt)}}(this)),this.container.on("mousedown.chosen",function(_this){return function(evt){_this.container_mousedown(evt)}}(this)),this.container.on("mouseup.chosen",function(_this){return function(evt){_this.container_mouseup(evt)}}(this)),this.container.on("mouseenter.chosen",function(_this){return function(evt){_this.mouse_enter(evt)}}(this)),this.container.on("mouseleave.chosen",function(_this){return function(evt){_this.mouse_leave(evt)}}(this)),this.search_results.on("mouseup.chosen",function(_this){return function(evt){_this.search_results_mouseup(evt)}}(this)),this.search_results.on("mouseover.chosen",function(_this){return function(evt){_this.search_results_mouseover(evt)}}(this)),this.search_results.on("mouseout.chosen",function(_this){return function(evt){_this.search_results_mouseout(evt)}}(this)),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",function(_this){return function(evt){_this.search_results_mousewheel(evt)}}(this)),this.search_results.on("touchstart.chosen",function(_this){return function(evt){_this.search_results_touchstart(evt)}}(this)),this.search_results.on("touchmove.chosen",function(_this){return function(evt){_this.search_results_touchmove(evt)}}(this)),this.search_results.on("touchend.chosen",function(_this){return function(evt){_this.search_results_touchend(evt)}}(this)),this.form_field_jq.on("chosen:updated.chosen",function(_this){return function(evt){_this.results_update_field(evt)}}(this)),this.form_field_jq.on("chosen:activate.chosen",function(_this){return function(evt){_this.activate_field(evt)}}(this)),this.form_field_jq.on("chosen:open.chosen",function(_this){return function(evt){_this.container_mousedown(evt)}}(this)),this.form_field_jq.on("chosen:close.chosen",function(_this){return function(evt){_this.close_field(evt)}}(this)),this.search_field.on("blur.chosen",function(_this){return function(evt){_this.input_blur(evt)}}(this)),this.search_field.on("keyup.chosen",function(_this){return function(evt){_this.keyup_checker(evt)}}(this)),this.search_field.on("keydown.chosen",function(_this){return function(evt){_this.keydown_checker(evt)}}(this)),this.search_field.on("focus.chosen",function(_this){return function(evt){_this.input_focus(evt)}}(this)),this.search_field.on("cut.chosen",function(_this){return function(evt){_this.clipboard_event_checker(evt)}}(this)),this.search_field.on("paste.chosen",function(_this){return function(evt){_this.clipboard_event_checker(evt)}}(this)),this.is_multiple?this.search_choices.on("click.chosen",function(_this){return function(evt){_this.choices_click(evt)}}(this)):this.container.on("click.chosen",function(evt){evt.preventDefault()})},Chosen.prototype.destroy=function(){return $(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.form_field_label.length>0&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},Chosen.prototype.container_mousedown=function(evt){var ref;if(!this.is_disabled)return!evt||"mousedown"!==(ref=evt.type)&&"touchstart"!==ref||this.results_showing||evt.preventDefault(),null!=evt&&$(evt.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!evt||$(evt.target)[0]!==this.selected_item[0]&&!$(evt.target).parents("a.chosen-single").length||(evt.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),$(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(evt){if("ABBR"===evt.target.nodeName&&!this.is_disabled)return this.results_reset(evt)},Chosen.prototype.search_results_mousewheel=function(evt){var delta;if(evt.originalEvent&&(delta=evt.originalEvent.deltaY||-evt.originalEvent.wheelDelta||evt.originalEvent.detail),null!=delta)return evt.preventDefault(),"DOMMouseScroll"===evt.type&&(delta*=40),this.search_results.scrollTop(delta+this.search_results.scrollTop())},Chosen.prototype.blur_test=function(evt){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},Chosen.prototype.close_field=function(){return $(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},Chosen.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(evt){var active_container;return(active_container=$(evt.target).closest(".chosen-container")).length&&this.container[0]===active_container[0]?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(el){var high_bottom,high_top,maxHeight,visible_bottom,visible_top;if(el.length){if(this.result_clear_highlight(),this.result_highlight=el,this.result_highlight.addClass("highlighted"),visible_bottom=(maxHeight=parseInt(this.search_results.css("maxHeight"),10))+(visible_top=this.search_results.scrollTop()),(high_bottom=(high_top=this.result_highlight.position().top+this.search_results.scrollTop())+this.result_highlight.outerHeight())>=visible_bottom)return this.search_results.scrollTop(high_bottom-maxHeight>0?high_bottom-maxHeight:0);if(high_top<visible_top)return this.search_results.scrollTop(high_top)}},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.get_search_field_value()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},Chosen.prototype.update_results_content=function(content){return this.search_results.html(content)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(el){var ti;if(this.form_field.tabIndex)return ti=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=ti},Chosen.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=$("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return this.form_field_label.on("click.chosen",this.label_click_handler)},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(evt){var target;if((target=$(evt.target).hasClass("active-result")?$(evt.target):$(evt.target).parents(".active-result").first()).length)return this.result_highlight=target,this.result_select(evt),this.search_field.focus()},Chosen.prototype.search_results_mouseover=function(evt){var target;if(target=$(evt.target).hasClass("active-result")?$(evt.target):$(evt.target).parents(".active-result").first())return this.result_do_highlight(target)},Chosen.prototype.search_results_mouseout=function(evt){if($(evt.target).hasClass("active-result")||$(evt.target).parents(".active-result").first())return this.result_clear_highlight()},Chosen.prototype.choice_build=function(item){var choice,close_link,_this;return choice=$("<li />",{class:"search-choice"}).html("<span>"+this.choice_label(item)+"</span>"),item.disabled?choice.addClass("search-choice-disabled"):((close_link=$("<a />",{class:"search-choice-close","data-option-array-index":item.array_index})).on("click.chosen",(_this=this,function(evt){return _this.choice_destroy_link_click(evt)})),choice.append(close_link)),this.search_container.before(choice)},Chosen.prototype.choice_destroy_link_click=function(evt){if(evt.preventDefault(),evt.stopPropagation(),!this.is_disabled)return this.choice_destroy($(evt.target))},Chosen.prototype.choice_destroy=function(link){if(this.result_deselect(link[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),link.parents("li").first().remove(),this.search_field_scale()},Chosen.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(evt){var high,item;if(this.result_highlight)return high=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?high.removeClass("active-result"):this.reset_single_select_options(),high.addClass("result-selected"),(item=this.results_data[high[0].getAttribute("data-option-array-index")]).selected=!0,this.form_field.options[item.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(item):this.single_set_selected_text(this.choice_label(item)),this.is_multiple&&(!this.hide_results_on_select||evt.metaKey||evt.ctrlKey)?evt.metaKey||evt.ctrlKey?this.winnow_results({skip_highlight:!0}):(this.search_field.val(""),this.winnow_results()):(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[item.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,evt.preventDefault(),this.search_field_scale())},Chosen.prototype.single_set_selected_text=function(text){return null==text&&(text=this.default_text),text===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(text)},Chosen.prototype.result_deselect=function(pos){var result_data;return result_data=this.results_data[pos],!this.form_field.options[result_data.options_index].disabled&&(result_data.selected=!1,this.form_field.options[result_data.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[result_data.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},Chosen.prototype.get_search_field_value=function(){return this.search_field.val()},Chosen.prototype.get_search_text=function(){return $.trim(this.get_search_field_value())},Chosen.prototype.escape_html=function(text){return $("<div/>").text(text).html()},Chosen.prototype.winnow_results_set_highlight=function(){var do_high,selected_results;if(null!=(do_high=(selected_results=this.is_multiple?[]:this.search_results.find(".result-selected.active-result")).length?selected_results.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(do_high)},Chosen.prototype.no_results=function(terms){var no_results_html;return no_results_html=this.get_no_results_html(terms),this.search_results.append(no_results_html),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var next_sib;return this.results_showing&&this.result_highlight?(next_sib=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(next_sib):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var prev_sibs;return this.results_showing||this.is_multiple?this.result_highlight?(prev_sibs=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(prev_sibs.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},Chosen.prototype.keydown_backstroke=function(){var next_available_destroy;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(next_available_destroy=this.search_container.siblings("li.search-choice").last()).length&&!next_available_destroy.hasClass("search-choice-disabled")?(this.pending_backstroke=next_available_destroy,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.search_field_scale=function(){var div,i,len,style,style_block,styles,width;if(this.is_multiple){for(style_block={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},i=0,len=(styles=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;i<len;i++)style_block[style=styles[i]]=this.search_field.css(style);return(div=$("<div />").css(style_block)).text(this.get_search_field_value()),$("body").append(div),width=div.width()+25,div.remove(),this.container.is(":visible")&&(width=Math.min(this.container.outerWidth()-10,width)),this.search_field.width(width)}},Chosen.prototype.trigger_form_field_change=function(extra){return this.form_field_jq.trigger("input",extra),this.form_field_jq.trigger("change",extra)},Chosen}(AbstractChosen)}).call(this),function($){"use strict";function Rule(controller,condition,value){this.init(controller,condition,value)}function Ruleset(){this.rules=[]}$.extend(Rule.prototype,{init:function(controller,condition,value){this.controller=controller,this.condition=condition,this.value=value,this.rules=[],this.controls=[]},evalCondition:function(context,control,condition,val1,val2){if("=="==condition)return this.checkBoolean(val1)==this.checkBoolean(val2);if("!="==condition)return this.checkBoolean(val1)!=this.checkBoolean(val2);if(">="==condition)return Number(val2)>=Number(val1);if("<="==condition)return Number(val2)<=Number(val1);if(">"==condition)return Number(val2)>Number(val1);if("<"==condition)return Number(val2)<Number(val1);if("()"==condition)return window[val1](context,control,val2);if("any"==condition){if($.isArray(val2)){for(var i=val2.length-1;i>=0;i--)if(-1!==$.inArray(val2[i],val1.split(",")))return!0}else if(-1!==$.inArray(val2,val1.split(",")))return!0}else if("not-any"==condition)if($.isArray(val2)){for(var i=val2.length-1;i>=0;i--)if(-1==$.inArray(val2[i],val1.split(",")))return!0}else if(-1==$.inArray(val2,val1.split(",")))return!0;return!1},checkBoolean:function(value){switch(value){case!0:case"true":case 1:case"1":value=!0;break;case null:case!1:case"false":case 0:case"0":value=!1}return value},checkCondition:function(context){if(!this.condition)return!0;var control=context.find(this.controller),control_value=this.getControlValue(context,control);return void 0!==control_value&&(control_value=this.normalizeValue(control,this.value,control_value),this.evalCondition(context,control,this.condition,this.value,control_value))},normalizeValue:function(control,baseValue,control_value){return"number"==typeof baseValue?parseFloat(control_value):control_value},getControlValue:function(context,control){return control.length>1&&("radio"==control.attr("type")||"checkbox"==control.attr("type"))?control.filter(":checked").map(function(){return this.value}).get():"checkbox"==control.attr("type")||"radio"==control.attr("type")?control.is(":checked"):control.val()},createRule:function(controller,condition,value){var rule=new Rule(controller,condition,value);return this.rules.push(rule),rule},include:function(input){this.controls.push(input)},applyRule:function(context,enforced){var result;result=void 0===enforced?this.checkCondition(context):enforced;var controls=$.map(this.controls,function(elem,idx){return context.find(elem)});result?($(controls).each(function(){$(this).removeClass("hidden")}),$(this.rules).each(function(){this.applyRule(context)})):($(controls).each(function(){$(this).addClass("hidden")}),$(this.rules).each(function(){this.applyRule(context,!1)}))}}),$.extend(Ruleset.prototype,{createRule:function(controller,condition,value){var rule=new Rule(controller,condition,value);return this.rules.push(rule),rule},applyRules:function(context){$(this.rules).each(function(){this.applyRule(context)})}}),$.spf_deps={createRuleset:function(){return new Ruleset},enable:function(selection,ruleset,depends){return selection.on("change",function(elem){var depend_id=elem.target.getAttribute("data-depend-id")||elem.target.getAttribute("data-sub-depend-id");-1!==depends.indexOf(depend_id)&&ruleset.applyRules(selection)}),ruleset.applyRules(selection),!0}}}(jQuery),function(root,factory){if("function"==typeof define&&define.amd)define(["exports","jquery"],function(exports,$){return factory(exports,$)});else if("undefined"!=typeof exports){var $=require("jquery");factory(exports,$)}else factory(root,root.jQuery||root.Zepto||root.ender||root.$)}(this,function(exports,$){var patterns={validate:/^(?!_nonce)[a-zA-Z0-9_-]*(?:\[(?:\d*|(?!_nonce)[a-zA-Z0-9_-]+)\])*$/i,key:/[a-zA-Z0-9_-]+|(?=\[\])/g,named:/^[a-zA-Z0-9_-]+$/,push:/^$/,fixed:/^\d+$/};function FormSerializer(helper,$form){var data={},pushes={};function build(base,key,value){return base[key]=value,base}function makeObject(root,value){for(var keys=root.match(patterns.key),k;void 0!==(k=keys.pop());){var idx;if(patterns.push.test(k))value=build([],incrementPush(root.replace(/\[\]$/,"")),value);else patterns.fixed.test(k)?value=build([],k,value):patterns.named.test(k)&&(value=build({},k,value))}return value}function incrementPush(key){return void 0===pushes[key]&&(pushes[key]=0),pushes[key]++}function addPair(pair){if(!patterns.validate.test(pair.name))return this;var obj=makeObject(pair.name,pair.value);return data=helper.extend(!0,data,obj),this}function addPairs(pairs){if(!helper.isArray(pairs))throw new Error("formSerializer.addPairs expects an Array");for(var i=0,len=pairs.length;i<len;i++)this.addPair(pairs[i]);return this}function serialize(){return data}function serializeJSON(){return JSON.stringify(serialize())}this.addPair=addPair,this.addPairs=addPairs,this.serialize=serialize,this.serializeJSON=serializeJSON}return FormSerializer.patterns=patterns,FormSerializer.serializeObject=function serializeObject(){return new FormSerializer($,this).addPairs(this.serializeArray()).serialize()},FormSerializer.serializeJSON=function serializeJSON(){return new FormSerializer($,this).addPairs(this.serializeArray()).serializeJSON()},void 0!==$.fn&&($.fn.serializeObjectSP_WPCF=FormSerializer.serializeObject,$.fn.serializeJSONSP_WPCF=FormSerializer.serializeJSON),exports.FormSerializer=FormSerializer,FormSerializer});
 
admin/views/wpcfree-metabox/assets/js/spf.js DELETED
@@ -1,2640 +0,0 @@
1
- /**
2
- *
3
- * -----------------------------------------------------------
4
- *
5
- * SP Framework
6
- * A Simple and Lightweight WordPress Option Framework
7
- *
8
- * -----------------------------------------------------------
9
- *
10
- */
11
- ; (function ($, window, document, undefined) {
12
- 'use strict';
13
-
14
- //
15
- // Constants
16
- //
17
- var SP_WPCF = SP_WPCF || {};
18
-
19
- SP_WPCF.funcs = {};
20
-
21
- SP_WPCF.vars = {
22
- onloaded: false,
23
- $body: $('body'),
24
- $window: $(window),
25
- $document: $(document),
26
- is_rtl: $('body').hasClass('rtl'),
27
- code_themes: [],
28
- };
29
-
30
- //
31
- // Helper Functions
32
- //
33
- SP_WPCF.helper = {
34
-
35
- //
36
- // Generate UID
37
- //
38
- uid: function (prefix) {
39
- return (prefix || '') + Math.random().toString(36).substr(2, 9);
40
- },
41
-
42
- // Quote regular expression characters
43
- //
44
- preg_quote: function (str) {
45
- return (str + '').replace(/(\[|\-|\])/g, "\\$1");
46
- },
47
-
48
- //
49
- // Reneme input names
50
- //
51
- name_nested_replace: function ($selector, field_id) {
52
-
53
- var checks = [];
54
- var regex = new RegExp('(' + SP_WPCF.helper.preg_quote(field_id) + ')\\[(\\d+)\\]', 'g');
55
-
56
- $selector.find(':radio').each(function () {
57
- if (this.checked || this.orginal_checked) {
58
- this.orginal_checked = true;
59
- }
60
- });
61
-
62
- $selector.each(function (index) {
63
- $(this).find(':input').each(function () {
64
- this.name = this.name.replace(regex, field_id + '[' + index + ']');
65
- if (this.orginal_checked) {
66
- this.checked = true;
67
- }
68
- });
69
- });
70
-
71
- },
72
-
73
- //
74
- // Debounce
75
- //
76
- debounce: function (callback, threshold, immediate) {
77
- var timeout;
78
- return function () {
79
- var context = this, args = arguments;
80
- var later = function () {
81
- timeout = null;
82
- if (!immediate) {
83
- callback.apply(context, args);
84
- }
85
- };
86
- var callNow = (immediate && !timeout);
87
- clearTimeout(timeout);
88
- timeout = setTimeout(later, threshold);
89
- if (callNow) {
90
- callback.apply(context, args);
91
- }
92
- };
93
- },
94
-
95
- //
96
- // Get a cookie
97
- //
98
- get_cookie: function (name) {
99
-
100
- var e, b, cookie = document.cookie, p = name + '=';
101
-
102
- if (!cookie) {
103
- return;
104
- }
105
-
106
- b = cookie.indexOf('; ' + p);
107
-
108
- if (b === -1) {
109
- b = cookie.indexOf(p);
110
-
111
- if (b !== 0) {
112
- return null;
113
- }
114
- } else {
115
- b += 2;
116
- }
117
-
118
- e = cookie.indexOf(';', b);
119
-
120
- if (e === -1) {
121
- e = cookie.length;
122
- }
123
-
124
- return decodeURIComponent(cookie.substring(b + p.length, e));
125
-
126
- },
127
-
128
- //
129
- // Set a cookie
130
- //
131
- set_cookie: function (name, value, expires, path, domain, secure) {
132
-
133
- var d = new Date();
134
-
135
- if (typeof (expires) === 'object' && expires.toGMTString) {
136
- expires = expires.toGMTString();
137
- } else if (parseInt(expires, 10)) {
138
- d.setTime(d.getTime() + (parseInt(expires, 10) * 1000));
139
- expires = d.toGMTString();
140
- } else {
141
- expires = '';
142
- }
143
-
144
- document.cookie = name + '=' + encodeURIComponent(value) +
145
- (expires ? '; expires=' + expires : '') +
146
- (path ? '; path=' + path : '') +
147
- (domain ? '; domain=' + domain : '') +
148
- (secure ? '; secure' : '');
149
-
150
- },
151
-
152
- //
153
- // Remove a cookie
154
- //
155
- remove_cookie: function (name, path, domain, secure) {
156
- SP_WPCF.helper.set_cookie(name, '', -1000, path, domain, secure);
157
- },
158
-
159
- };
160
-
161
- //
162
- // Custom clone for textarea and select clone() bug
163
- //
164
- $.fn.spf_clone = function () {
165
-
166
- var base = $.fn.clone.apply(this, arguments),
167
- clone = this.find('select').add(this.filter('select')),
168
- cloned = base.find('select').add(base.filter('select'));
169
-
170
- for (var i = 0; i < clone.length; ++i) {
171
- for (var j = 0; j < clone[i].options.length; ++j) {
172
-
173
- if (clone[i].options[j].selected === true) {
174
- cloned[i].options[j].selected = true;
175
- }
176
-
177
- }
178
- }
179
-
180
- this.find(':radio').each(function () {
181
- this.orginal_checked = this.checked;
182
- });
183
-
184
- return base;
185
-
186
- };
187
-
188
- //
189
- // Expand All Options
190
- //
191
- $.fn.spf_expand_all = function () {
192
- return this.each(function () {
193
- $(this).on('click', function (e) {
194
-
195
- e.preventDefault();
196
- $('.spf-wrapper').toggleClass('spf-show-all');
197
- $('.spf-section').spf_reload_script();
198
- $(this).find('.fa').toggleClass('fa-indent').toggleClass('fa-outdent');
199
-
200
- });
201
- });
202
- };
203
-
204
- //
205
- // Options Navigation
206
- //
207
- $.fn.spf_nav_options = function () {
208
- return this.each(function () {
209
-
210
- var $nav = $(this),
211
- $links = $nav.find('a'),
212
- $hidden = $nav.closest('.spf').find('.spf-section-id'),
213
- $last_section;
214
-
215
- $(window).on('hashchange', function () {
216
-
217
- var hash = window.location.hash.match(new RegExp('tab=([^&]*)'));
218
- var slug = hash ? hash[1] : $links.first().attr('href').replace('#tab=', '');
219
- var $link = $('#spf-tab-link-' + slug);
220
-
221
- if ($link.length > 0) {
222
-
223
- $link.closest('.spf-tab-depth-0').addClass('spf-tab-active').siblings().removeClass('spf-tab-active');
224
- $links.removeClass('spf-section-active');
225
- $link.addClass('spf-section-active');
226
-
227
- if ($last_section !== undefined) {
228
- $last_section.hide();
229
- }
230
-
231
- var $section = $('#spf-section-' + slug);
232
- $section.css({ display: 'block' });
233
- $section.spf_reload_script();
234
-
235
- $hidden.val(slug);
236
-
237
- $last_section = $section;
238
-
239
- }
240
-
241
- }).trigger('hashchange');
242
-
243
- });
244
- };
245
-
246
- //
247
- // Metabox Tabs
248
- //
249
- $.fn.spf_nav_metabox = function () {
250
- return this.each(function () {
251
-
252
- var $nav = $(this),
253
- $links = $nav.find('a'),
254
- unique_id = $nav.data('unique'),
255
- post_id = $('#post_ID').val() || 'global',
256
- $last_section,
257
- $last_link;
258
-
259
- $links.on('click', function (e) {
260
-
261
- e.preventDefault();
262
-
263
- var $link = $(this),
264
- section_id = $link.data('section');
265
-
266
- if ($last_link !== undefined) {
267
- $last_link.removeClass('spf-section-active');
268
- }
269
-
270
- if ($last_section !== undefined) {
271
- $last_section.hide();
272
- }
273
-
274
- $link.addClass('spf-section-active');
275
-
276
- var $section = $('#spf-section-' + section_id);
277
- $section.css({ display: 'block' });
278
- $section.spf_reload_script();
279
-
280
- SP_WPCF.helper.set_cookie('spf-last-metabox-tab-' + post_id + '-' + unique_id, section_id);
281
-
282
- $last_section = $section;
283
- $last_link = $link;
284
-
285
- });
286
-
287
- var get_cookie = SP_WPCF.helper.get_cookie('spf-last-metabox-tab-' + post_id + '-' + unique_id);
288
-
289
- if (get_cookie) {
290
- $nav.find('a[data-section="' + get_cookie + '"]').trigger('click');
291
- } else {
292
- $links.first('a').trigger('click');
293
- }
294
-
295
- });
296
- };
297
-
298
- //
299
- // Metabox Page Templates Listener
300
- //
301
- $.fn.spf_page_templates = function () {
302
- if (this.length) {
303
-
304
- $(document).on('change', '.editor-page-attributes__template select, #page_template', function () {
305
-
306
- var maybe_value = $(this).val() || 'default';
307
-
308
- $('.spf-page-templates').removeClass('spf-show').addClass('spf-hide');
309
- $('.spf-page-' + maybe_value.toLowerCase().replace(/[^a-zA-Z0-9]+/g, '-')).removeClass('spf-hide').addClass('spf-show');
310
-
311
- });
312
-
313
- }
314
- };
315
-
316
- //
317
- // Metabox Post Formats Listener
318
- //
319
- $.fn.spf_post_formats = function () {
320
- if (this.length) {
321
-
322
- $(document).on('change', '.editor-post-format select, #formatdiv input[name="post_format"]', function () {
323
-
324
- var maybe_value = $(this).val() || 'default';
325
-
326
- // Fallback for classic editor version
327
- maybe_value = (maybe_value === '0') ? 'default' : maybe_value;
328
-
329
- $('.spf-post-formats').removeClass('spf-show').addClass('spf-hide');
330
- $('.spf-post-format-' + maybe_value).removeClass('spf-hide').addClass('spf-show');
331
-
332
- });
333
-
334
- }
335
- };
336
-
337
- //
338
- // Search
339
- //
340
- $.fn.spf_search = function () {
341
- return this.each(function () {
342
-
343
- var $this = $(this),
344
- $input = $this.find('input');
345
-
346
- $input.on('change keyup', function () {
347
-
348
- var value = $(this).val(),
349
- $wrapper = $('.spf-wrapper'),
350
- $section = $wrapper.find('.spf-section'),
351
- $fields = $section.find('> .spf-field:not(.hidden)'),
352
- $titles = $fields.find('> .spf-title, .spf-search-tags');
353
-
354
- if (value.length > 3) {
355
-
356
- $fields.addClass('spf-hidden');
357
- $wrapper.addClass('spf-search-all');
358
-
359
- $titles.each(function () {
360
-
361
- var $title = $(this);
362
-
363
- if ($title.text().match(new RegExp('.*?' + value + '.*?', 'i'))) {
364
-
365
- var $field = $title.closest('.spf-field');
366
-
367
- $field.removeClass('spf-hidden');
368
- $field.parent().spf_reload_script();
369
-
370
- }
371
-
372
- });
373
-
374
- } else {
375
-
376
- $fields.removeClass('spf-hidden');
377
- $wrapper.removeClass('spf-search-all');
378
-
379
- }
380
-
381
- });
382
-
383
- });
384
- };
385
-
386
- //
387
- // Sticky Header
388
- //
389
- $.fn.spf_sticky = function () {
390
- return this.each(function () {
391
-
392
- var $this = $(this),
393
- $window = $(window),
394
- $inner = $this.find('.spf-header-inner'),
395
- padding = parseInt($inner.css('padding-left')) + parseInt($inner.css('padding-right')),
396
- offset = 32,
397
- scrollTop = 0,
398
- lastTop = 0,
399
- ticking = false,
400
- stickyUpdate = function () {
401
-
402
- var offsetTop = $this.offset().top,
403
- stickyTop = Math.max(offset, offsetTop - scrollTop),
404
- winWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
405
-
406
- if (stickyTop <= offset && winWidth > 782) {
407
- $inner.css({ width: $this.outerWidth() - padding });
408
- $this.css({ height: $this.outerHeight() }).addClass('spf-sticky');
409
- } else {
410
- $inner.removeAttr('style');
411
- $this.removeAttr('style').removeClass('spf-sticky');
412
- }
413
-
414
- },
415
- requestTick = function () {
416
-
417
- if (!ticking) {
418
- requestAnimationFrame(function () {
419
- stickyUpdate();
420
- ticking = false;
421
- });
422
- }
423
-
424
- ticking = true;
425
-
426
- },
427
- onSticky = function () {
428
-
429
- scrollTop = $window.scrollTop();
430
- requestTick();
431
-
432
- };
433
-
434
- $window.on('scroll resize', onSticky);
435
-
436
- onSticky();
437
-
438
- });
439
- };
440
-
441
- //
442
- // Dependency System
443
- //
444
- $.fn.spf_dependency = function () {
445
- return this.each(function () {
446
-
447
- var $this = $(this),
448
- ruleset = $.spf_deps.createRuleset(),
449
- depends = [],
450
- is_global = false;
451
-
452
- $this.children('[data-controller]').each(function () {
453
-
454
- var $field = $(this),
455
- controllers = $field.data('controller').split('|'),
456
- conditions = $field.data('condition').split('|'),
457
- values = $field.data('value').toString().split('|'),
458
- rules = ruleset;
459
-
460
- if ($field.data('depend-global')) {
461
- is_global = true;
462
- }
463
-
464
- $.each(controllers, function (index, depend_id) {
465
-
466
- var value = values[index] || '',
467
- condition = conditions[index] || conditions[0];
468
-
469
- rules = rules.createRule('[data-depend-id="' + depend_id + '"]', condition, value);
470
-
471
- rules.include($field);
472
-
473
- depends.push(depend_id);
474
-
475
- });
476
-
477
- });
478
-
479
- if (depends.length) {
480
-
481
- if (is_global) {
482
- $.spf_deps.enable(SP_WPCF.vars.$body, ruleset, depends);
483
- } else {
484
- $.spf_deps.enable($this, ruleset, depends);
485
- }
486
-
487
- }
488
-
489
- });
490
- };
491
-
492
- //
493
- // Field: accordion
494
- //
495
- $.fn.spf_field_accordion = function () {
496
- return this.each(function () {
497
-
498
- var $titles = $(this).find('.spf-accordion-title');
499
-
500
- $titles.on('click', function () {
501
-
502
- var $title = $(this),
503
- $icon = $title.find('.spf-accordion-icon'),
504
- $content = $title.next();
505
-
506
- if ($icon.hasClass('fa-angle-right')) {
507
- $icon.removeClass('fa-angle-right').addClass('fa-angle-down');
508
- } else {
509
- $icon.removeClass('fa-angle-down').addClass('fa-angle-right');
510
- }
511
-
512
- if (!$content.data('opened')) {
513
-
514
- $content.spf_reload_script();
515
- $content.data('opened', true);
516
-
517
- }
518
-
519
- $content.toggleClass('spf-accordion-open');
520
-
521
- });
522
-
523
- });
524
- };
525
-
526
- //
527
- // Field: code_editor
528
- //
529
- $.fn.spf_field_code_editor = function () {
530
- return this.each(function () {
531
-
532
- if (typeof CodeMirror !== 'function') { return; }
533
-
534
- var $this = $(this),
535
- $textarea = $this.find('textarea'),
536
- $inited = $this.find('.CodeMirror'),
537
- data_editor = $textarea.data('editor');
538
-
539
- if ($inited.length) {
540
- $inited.remove();
541
- }
542
-
543
- var interval = setInterval(function () {
544
- if ($this.is(':visible')) {
545
-
546
- var code_editor = CodeMirror.fromTextArea($textarea[0], data_editor);
547
-
548
- // load code-mirror theme css.
549
- if (data_editor.theme !== 'default' && SP_WPCF.vars.code_themes.indexOf(data_editor.theme) === -1) {
550
-
551
- var $cssLink = $('<link>');
552
-
553
- $('#spf-codemirror-css').after($cssLink);
554
-
555
- $cssLink.attr({
556
- rel: 'stylesheet',
557
- id: 'spf-codemirror-' + data_editor.theme + '-css',
558
- href: data_editor.cdnURL + '/theme/' + data_editor.theme + '.min.css',
559
- type: 'text/css',
560
- media: 'all'
561
- });
562
-
563
- SP_WPCF.vars.code_themes.push(data_editor.theme);
564
-
565
- }
566
-
567
- CodeMirror.modeURL = data_editor.cdnURL + '/mode/%N/%N.min.js';
568
- CodeMirror.autoLoadMode(code_editor, data_editor.mode);
569
-
570
- code_editor.on('change', function (editor, event) {
571
- $textarea.val(code_editor.getValue()).trigger('change');
572
- });
573
-
574
- clearInterval(interval);
575
-
576
- }
577
- });
578
-
579
- });
580
- };
581
-
582
- //
583
- // Field: date
584
- //
585
- $.fn.spf_field_date = function () {
586
- return this.each(function () {
587
-
588
- var $this = $(this),
589
- $inputs = $this.find('input'),
590
- settings = $this.find('.spf-date-settings').data('settings'),
591
- wrapper = '<div class="spf-datepicker-wrapper"></div>',
592
- $datepicker;
593
-
594
- var defaults = {
595
- showAnim: '',
596
- beforeShow: function (input, inst) {
597
- $(inst.dpDiv).addClass('spf-datepicker-wrapper');
598
- },
599
- onClose: function (input, inst) {
600
- $(inst.dpDiv).removeClass('spf-datepicker-wrapper');
601
- },
602
- };
603
-
604
- settings = $.extend({}, settings, defaults);
605
-
606
- if ($inputs.length === 2) {
607
-
608
- settings = $.extend({}, settings, {
609
- onSelect: function (selectedDate) {
610
-
611
- var $this = $(this),
612
- $from = $inputs.first(),
613
- option = ($inputs.first().attr('id') === $(this).attr('id')) ? 'minDate' : 'maxDate',
614
- date = $.datepicker.parseDate(settings.dateFormat, selectedDate);
615
-
616
- $inputs.not(this).datepicker('option', option, date);
617
-
618
- }
619
- });
620
-
621
- }
622
-
623
- $inputs.each(function () {
624
-
625
- var $input = $(this);
626
-
627
- if ($input.hasClass('hasDatepicker')) {
628
- $input.removeAttr('id').removeClass('hasDatepicker');
629
- }
630
-
631
- $input.datepicker(settings);
632
-
633
- });
634
-
635
- });
636
- };
637
-
638
- //
639
- // Field: fieldset
640
- //
641
- $.fn.spf_field_fieldset = function () {
642
- return this.each(function () {
643
- $(this).find('.spf-fieldset-content').spf_reload_script();
644
- });
645
- };
646
-
647
- //
648
- // Field: gallery
649
- //
650
- $.fn.spf_field_gallery = function () {
651
- return this.each(function () {
652
-
653
- var $this = $(this),
654
- $edit = $this.find('.spf-edit-gallery'),
655
- $clear = $this.find('.spf-clear-gallery'),
656
- $list = $this.find('ul.sp-gallery-images'),
657
- $input = $this.find('input'),
658
- $img = $this.find('img'),
659
- wp_media_frame;
660
-
661
- $this.on('click', '.spf-button, .spf-edit-gallery', function (e) {
662
-
663
- var $el = $(this),
664
- ids = $input.val(),
665
- what = ($el.hasClass('spf-edit-gallery')) ? 'edit' : 'add',
666
- state = (what === 'add' && !ids.length) ? 'gallery' : 'gallery-edit';
667
-
668
- e.preventDefault();
669
-
670
- if (typeof window.wp === 'undefined' || !window.wp.media || !window.wp.media.gallery) { return; }
671
-
672
- // Open media with state
673
- if (state === 'gallery') {
674
-
675
- wp_media_frame = window.wp.media({
676
- library: {
677
- type: 'image'
678
- },
679
- frame: 'post',
680
- state: 'gallery',
681
- multiple: true
682
- });
683
-
684
- wp_media_frame.open();
685
-
686
- } else {
687
-
688
- wp_media_frame = window.wp.media.gallery.edit('[gallery ids="' + ids + '"]');
689
-
690
- if (what === 'add') {
691
- wp_media_frame.setState('gallery-library');
692
- }
693
-
694
- }
695
-
696
- // Media Update
697
- wp_media_frame.on('update', function (selection) {
698
-
699
- $list.empty();
700
-
701
- var selectedIds = selection.models.map(function (attachment) {
702
-
703
- var item = attachment.toJSON();
704
- var thumb = (typeof item.sizes.thumbnail !== 'undefined') ? item.sizes.thumbnail.url : item.url;
705
-
706
- $list.append('<li><img src="' + thumb + '"></li>');
707
-
708
- return item.id;
709
-
710
- });
711
-
712
- $input.val(selectedIds.join(',')).trigger('change');
713
- $clear.removeClass('hidden');
714
- $edit.removeClass('hidden');
715
-
716
- });
717
-
718
- });
719
-
720
- $clear.on('click', function (e) {
721
- e.preventDefault();
722
- $list.empty();
723
- $input.val('').trigger('change');
724
- $clear.addClass('hidden');
725
- $edit.addClass('hidden');
726
- });
727
-
728
- });
729
-
730
- };
731
-
732
- //
733
- // Field: group
734
- //
735
- $.fn.spf_field_group = function () {
736
- return this.each(function () {
737
-
738
- var $this = $(this),
739
- $fieldset = $this.children('.spf-fieldset'),
740
- $group = $fieldset.length ? $fieldset : $this,
741
- $wrapper = $group.children('.spf-cloneable-wrapper'),
742
- $hidden = $group.children('.spf-cloneable-hidden'),
743
- $max = $group.children('.spf-cloneable-max'),
744
- $min = $group.children('.spf-cloneable-min'),
745
- field_id = $wrapper.data('field-id'),
746
- unique_id = $wrapper.data('unique-id'),
747
- is_number = Boolean(Number($wrapper.data('title-number'))),
748
- max = parseInt($wrapper.data('max')),
749
- min = parseInt($wrapper.data('min'));
750
-
751
- // clear accordion arrows if multi-instance
752
- if ($wrapper.hasClass('ui-accordion')) {
753
- $wrapper.find('.ui-accordion-header-icon').remove();
754
- }
755
-
756
- var update_title_numbers = function ($selector) {
757
- $selector.find('.spf-cloneable-title-number').each(function (index) {
758
- $(this).html(($(this).closest('.spf-cloneable-item').index() + 1) + '.');
759
- });
760
- };
761
-
762
- $wrapper.accordion({
763
- header: '> .spf-cloneable-item > .spf-cloneable-title',
764
- collapsible: true,
765
- active: false,
766
- animate: false,
767
- heightStyle: 'content',
768
- icons: {
769
- 'header': 'spf-cloneable-header-icon fa fa-angle-right',
770
- 'activeHeader': 'spf-cloneable-header-icon fa fa-angle-down'
771
- },
772
- activate: function (event, ui) {
773
-
774
- var $panel = ui.newPanel;
775
- var $header = ui.newHeader;
776
-
777
- if ($panel.length && !$panel.data('opened')) {
778
-
779
- var $fields = $panel.children();
780
- var $first = $fields.first().find(':input').first();
781
- var $title = $header.find('.spf-cloneable-value');
782
-
783
- $first.on('keyup', function (event) {
784
- $title.text($first.val());
785
- });
786
-
787
- $panel.spf_reload_script();
788
- $panel.data('opened', true);
789
- $panel.data('retry', false);
790
-
791
- } else if ($panel.data('retry')) {
792
-
793
- $panel.spf_reload_script_retry();
794
- $panel.data('retry', false);
795
-
796
- }
797
-
798
- }
799
- });
800
-
801
- $wrapper.sortable({
802
- axis: 'y',
803
- handle: '.spf-cloneable-title,.spf-cloneable-sort',
804
- helper: 'original',
805
- cursor: 'move',
806
- placeholder: 'widget-placeholder',
807
- start: function (event, ui) {
808
-
809
- $wrapper.accordion({ active: false });
810
- $wrapper.sortable('refreshPositions');
811
- ui.item.children('.spf-cloneable-content').data('retry', true);
812
-
813
- },
814
- update: function (event, ui) {
815
-
816
- SP_WPCF.helper.name_nested_replace($wrapper.children('.spf-cloneable-item'), field_id);
817
- $wrapper.spf_customizer_refresh();
818
-
819
- if (is_number) {
820
- update_title_numbers($wrapper);
821
- }
822
-
823
- },
824
- });
825
-
826
- $group.children('.spf-cloneable-add').on('click', function (e) {
827
-
828
- e.preventDefault();
829
-
830
- var count = $wrapper.children('.spf-cloneable-item').length;
831
-
832
- $min.hide();
833
-
834
- if (max && (count + 1) > max) {
835
- $max.show();
836
- return;
837
- }
838
-
839
- var new_field_id = unique_id + field_id + '[' + count + ']';
840
-
841
- var $cloned_item = $hidden.spf_clone(true);
842
-
843
- $cloned_item.removeClass('spf-cloneable-hidden');
844
-
845
- $cloned_item.find(':input').each(function () {
846
- this.name = new_field_id + this.name.replace((this.name.startsWith('_nonce') ? '_nonce' : unique_id), '');
847
- });
848
-
849
- $cloned_item.find('.spf-data-wrapper').each(function () {
850
- $(this).attr('data-unique-id', new_field_id);
851
- });
852
-
853
- $wrapper.append($cloned_item);
854
- $wrapper.accordion('refresh');
855
- $wrapper.accordion({ active: count });
856
- $wrapper.spf_customizer_refresh();
857
- $wrapper.spf_customizer_listen({ closest: true });
858
-
859
- if (is_number) {
860
- update_title_numbers($wrapper);
861
- }
862
-
863
- });
864
-
865
- var event_clone = function (e) {
866
-
867
- e.preventDefault();
868
-
869
- var count = $wrapper.children('.spf-cloneable-item').length;
870
-
871
- $min.hide();
872
-
873
- if (max && (count + 1) > max) {
874
- $max.show();
875
- return;
876
- }
877
-
878
- var $this = $(this),
879
- $parent = $this.parent().parent(),
880
- $cloned_helper = $parent.children('.spf-cloneable-helper').spf_clone(true),
881
- $cloned_title = $parent.children('.spf-cloneable-title').spf_clone(),
882
- $cloned_content = $parent.children('.spf-cloneable-content').spf_clone(),
883
- cloned_regex = new RegExp('(' + SP_WPCF.helper.preg_quote(field_id) + ')\\[(\\d+)\\]', 'g');
884
-
885
- $cloned_content.find('.spf-data-wrapper').each(function () {
886
- var $this = $(this);
887
- $this.attr('data-unique-id', $this.attr('data-unique-id').replace(cloned_regex, field_id + '[' + ($parent.index() + 1) + ']'));
888
- });
889
-
890
- var $cloned = $('<div class="spf-cloneable-item" />');
891
-
892
- $cloned.append($cloned_helper);
893
- $cloned.append($cloned_title);
894
- $cloned.append($cloned_content);
895
-
896
- $wrapper.children().eq($parent.index()).after($cloned);
897
-
898
- SP_WPCF.helper.name_nested_replace($wrapper.children('.spf-cloneable-item'), field_id);
899
-
900
- $wrapper.accordion('refresh');
901
- $wrapper.spf_customizer_refresh();
902
- $wrapper.spf_customizer_listen({ closest: true });
903
-
904
- if (is_number) {
905
- update_title_numbers($wrapper);
906
- }
907
-
908
- };
909
-
910
- $wrapper.children('.spf-cloneable-item').children('.spf-cloneable-helper').on('click', '.spf-cloneable-clone', event_clone);
911
- $group.children('.spf-cloneable-hidden').children('.spf-cloneable-helper').on('click', '.spf-cloneable-clone', event_clone);
912
-
913
- var event_remove = function (e) {
914
-
915
- e.preventDefault();
916
-
917
- var count = $wrapper.children('.spf-cloneable-item').length;
918
-
919
- $max.hide();
920
- $min.hide();
921
-
922
- if (min && (count - 1) < min) {
923
- $min.show();
924
- return;
925
- }
926
-
927
- $(this).closest('.spf-cloneable-item').remove();
928
-
929
- SP_WPCF.helper.name_nested_replace($wrapper.children('.spf-cloneable-item'), field_id);
930
-
931
- $wrapper.spf_customizer_refresh();
932
-
933
- if (is_number) {
934
- update_title_numbers($wrapper);
935
- }
936
-
937
- };
938
-
939
- $wrapper.children('.spf-cloneable-item').children('.spf-cloneable-helper').on('click', '.spf-cloneable-remove', event_remove);
940
- $group.children('.spf-cloneable-hidden').children('.spf-cloneable-helper').on('click', '.spf-cloneable-remove', event_remove);
941
-
942
- });
943
- };
944
-
945
- //
946
- // Field: media
947
- //
948
- $.fn.spf_field_media = function () {
949
- return this.each(function () {
950
-
951
- var $this = $(this),
952
- $upload_button = $this.find('.spf--button'),
953
- $remove_button = $this.find('.spf--remove'),
954
- $library = $upload_button.data('library') && $upload_button.data('library').split(',') || '',
955
- wp_media_frame;
956
-
957
- $upload_button.on('click', function (e) {
958
-
959
- e.preventDefault();
960
-
961
- if (typeof window.wp === 'undefined' || !window.wp.media || !window.wp.media.gallery) {
962
- return;
963
- }
964
-
965
- if (wp_media_frame) {
966
- wp_media_frame.open();
967
- return;
968
- }
969
-
970
- wp_media_frame = window.wp.media({
971
- library: {
972
- type: $library
973
- }
974
- });
975
-
976
- wp_media_frame.on('select', function () {
977
-
978
- var thumbnail;
979
- var attributes = wp_media_frame.state().get('selection').first().attributes;
980
- var preview_size = $upload_button.data('preview-size') || 'thumbnail';
981
-
982
- $this.find('.spf--url').val(attributes.url);
983
- $this.find('.spf--id').val(attributes.id);
984
- $this.find('.spf--width').val(attributes.width);
985
- $this.find('.spf--height').val(attributes.height);
986
- $this.find('.spf--alt').val(attributes.alt);
987
- $this.find('.spf--title').val(attributes.title);
988
- $this.find('.spf--description').val(attributes.description);
989
-
990
- if (typeof attributes.sizes !== 'undefined' && typeof attributes.sizes.thumbnail !== 'undefined' && preview_size === 'thumbnail') {
991
- thumbnail = attributes.sizes.thumbnail.url;
992
- } else if (typeof attributes.sizes !== 'undefined' && typeof attributes.sizes.full !== 'undefined') {
993
- thumbnail = attributes.sizes.full.url;
994
- } else {
995
- thumbnail = attributes.icon;
996
- }
997
-
998
- $remove_button.removeClass('hidden');
999
- $this.find('.spf--preview').removeClass('hidden');
1000
- $this.find('.spf--src').attr('src', thumbnail);
1001
- $this.find('.spf--thumbnail').val(thumbnail).trigger('change');
1002
-
1003
- });
1004
-
1005
- wp_media_frame.open();
1006
-
1007
- });
1008
-
1009
- $remove_button.on('click', function (e) {
1010
- e.preventDefault();
1011
- $remove_button.addClass('hidden');
1012
- $this.find('.spf--preview').addClass('hidden');
1013
- $this.find('input').val('');
1014
- $this.find('.spf--thumbnail').trigger('change');
1015
- });
1016
-
1017
- });
1018
-
1019
- };
1020
-
1021
- //
1022
- // Field: spinner
1023
- //
1024
- $.fn.spf_field_spinner = function () {
1025
- return this.each(function () {
1026
-
1027
- var $this = $(this),
1028
- $input = $this.find('input'),
1029
- $inited = $this.find('.ui-spinner-button');
1030
-
1031
- if ($inited.length) {
1032
- $inited.remove();
1033
- }
1034
-
1035
- $input.spinner({
1036
- max: $input.data('max') || 100,
1037
- min: $input.data('min') || 0,
1038
- step: $input.data('step') || 1,
1039
- spin: function (event, ui) {
1040
- $input.val(ui.value).trigger('change');
1041
- }
1042
- });
1043
-
1044
-
1045
- });
1046
- };
1047
-
1048
- //
1049
- // Field: switcher
1050
- //
1051
- $.fn.spf_field_switcher = function () {
1052
- return this.each(function () {
1053
-
1054
- var $switcher = $(this).find('.spf--switcher');
1055
-
1056
- $switcher.on('click', function () {
1057
-
1058
- var value = 0;
1059
- var $input = $switcher.find('input');
1060
-
1061
- if ($switcher.hasClass('spf--active')) {
1062
- $switcher.removeClass('spf--active');
1063
- } else {
1064
- value = 1;
1065
- $switcher.addClass('spf--active');
1066
- }
1067
-
1068
- $input.val(value).trigger('change');
1069
-
1070
- });
1071
-
1072
- });
1073
- };
1074
-
1075
- //
1076
- // Field: typography
1077
- //
1078
- $.fn.spf_field_typography = function () {
1079
- return this.each(function () {
1080
-
1081
- var base = this;
1082
- var $this = $(this);
1083
- var loaded_fonts = [];
1084
- var webfonts = spf_typography_json.webfonts;
1085
- var googlestyles = spf_typography_json.googlestyles;
1086
- var defaultstyles = spf_typography_json.defaultstyles;
1087
-
1088
- //
1089
- //
1090
- // Sanitize google font subset
1091
- base.sanitize_subset = function (subset) {
1092
- subset = subset.replace('-ext', ' Extended');
1093
- subset = subset.charAt(0).toUpperCase() + subset.slice(1);
1094
- return subset;
1095
- };
1096
-
1097
- //
1098
- //
1099
- // Sanitize google font styles (weight and style)
1100
- base.sanitize_style = function (style) {
1101
- return googlestyles[style] ? googlestyles[style] : style;
1102
- };
1103
-
1104
- //
1105
- //
1106
- // Load google font
1107
- base.load_google_font = function (font_family, weight, style) {
1108
-
1109
- if (font_family && typeof WebFont === 'object') {
1110
-
1111
- weight = weight ? weight.replace('normal', '') : '';
1112
- style = style ? style.replace('normal', '') : '';
1113
-
1114
- if (weight || style) {
1115
- font_family = font_family + ':' + weight + style;
1116
- }
1117
-
1118
- if (loaded_fonts.indexOf(font_family) === -1) {
1119
- WebFont.load({ google: { families: [font_family] } });
1120
- }
1121
-
1122
- loaded_fonts.push(font_family);
1123
-
1124
- }
1125
-
1126
- };
1127
-
1128
- //
1129
- //
1130
- // Append select options
1131
- base.append_select_options = function ($select, options, condition, type, is_multi) {
1132
-
1133
- $select.find('option').not(':first').remove();
1134
-
1135
- var opts = '';
1136
-
1137
- $.each(options, function (key, value) {
1138
-
1139
- var selected;
1140
- var name = value;
1141
-
1142
- // is_multi
1143
- if (is_multi) {
1144
- selected = (condition && condition.indexOf(value) !== -1) ? ' selected' : '';
1145
- } else {
1146
- selected = (condition && condition === value) ? ' selected' : '';
1147
- }
1148
-
1149
- if (type === 'subset') {
1150
- name = base.sanitize_subset(value);
1151
- } else if (type === 'style') {
1152
- name = base.sanitize_style(value);
1153
- }
1154
-
1155
- opts += '<option value="' + value + '"' + selected + '>' + name + '</option>';
1156
-
1157
- });
1158
-
1159
- $select.append(opts).trigger('spf.change').trigger('chosen:updated');
1160
-
1161
- };
1162
-
1163
- base.init = function () {
1164
-
1165
- //
1166
- //
1167
- // Constants
1168
- var selected_styles = [];
1169
- var $typography = $this.find('.spf--typography');
1170
- var $type = $this.find('.spf--type');
1171
- var unit = $typography.data('unit');
1172
- var exclude_fonts = $typography.data('exclude') ? $typography.data('exclude').split(',') : [];
1173
-
1174
- //
1175
- //
1176
- // Chosen init
1177
- if ($this.find('.spf--chosen').length) {
1178
-
1179
- var $chosen_selects = $this.find('select');
1180
-
1181
- $chosen_selects.each(function () {
1182
-
1183
- var $chosen_select = $(this),
1184
- $chosen_inited = $chosen_select.parent().find('.chosen-container');
1185
-
1186
- if ($chosen_inited.length) {
1187
- $chosen_inited.remove();
1188
- }
1189
-
1190
- $chosen_select.chosen({
1191
- allow_single_deselect: true,
1192
- disable_search_threshold: 15,
1193
- width: '100%'
1194
- });
1195
-
1196
- });
1197
-
1198
- }
1199
-
1200
- //
1201
- //
1202
- // Font family select
1203
- var $font_family_select = $this.find('.spf--font-family');
1204
- var first_font_family = $font_family_select.val();
1205
-
1206
- // Clear default font family select options
1207
- $font_family_select.find('option').not(':first-child').remove();
1208
-
1209
- var opts = '';
1210
-
1211
- $.each(webfonts, function (type, group) {
1212
-
1213
- // Check for exclude fonts
1214
- if (exclude_fonts && exclude_fonts.indexOf(type) !== -1) { return; }
1215
-
1216
- opts += '<optgroup label="' + group.label + '">';
1217
-
1218
- $.each(group.fonts, function (key, value) {
1219
-
1220
- // use key if value is object
1221
- value = (typeof value === 'object') ? key : value;
1222
- var selected = (value === first_font_family) ? ' selected' : '';
1223
- opts += '<option value="' + value + '" data-type="' + type + '"' + selected + '>' + value + '</option>';
1224
-
1225
- });
1226
-
1227
- opts += '</optgroup>';
1228
-
1229
- });
1230
-
1231
- // Append google font select options
1232
- $font_family_select.append(opts).trigger('chosen:updated');
1233
-
1234
- //
1235
- //
1236
- // Font style select
1237
- var $font_style_block = $this.find('.spf--block-font-style');
1238
-
1239
- if ($font_style_block.length) {
1240
-
1241
- var $font_style_select = $this.find('.spf--font-style-select');
1242
- var first_style_value = $font_style_select.val() ? $font_style_select.val().replace(/normal/g, '') : '';
1243
-
1244
- //
1245
- //
1246
- // Extra font style select
1247
- var $extra_font_style_block = $this.find('.spf--block-extra-styles');
1248
-
1249
- if ($extra_font_style_block.length) {
1250
- var $extra_font_style_select = $this.find('.spf--extra-styles');
1251
- var first_extra_style_value = $extra_font_style_select.val();
1252
- }
1253
-
1254
- }
1255
-
1256
- //
1257
- //
1258
- // Subsets select
1259
- var $subset_block = $this.find('.spf--block-subset');
1260
- if ($subset_block.length) {
1261
- var $subset_select = $this.find('.spf--subset');
1262
- var first_subset_select_value = $subset_select.val();
1263
- var subset_multi_select = $subset_select.data('multiple') || false;
1264
- }
1265
-
1266
- //
1267
- //
1268
- // Backup font family
1269
- var $backup_font_family_block = $this.find('.spf--block-backup-font-family');
1270
-
1271
- //
1272
- //
1273
- // Font Family on Change Listener
1274
- $font_family_select.on('change spf.change', function (event) {
1275
-
1276
- // Hide subsets on change
1277
- if ($subset_block.length) {
1278
- $subset_block.addClass('hidden');
1279
- }
1280
-
1281
- // Hide extra font style on change
1282
- if ($extra_font_style_block.length) {
1283
- $extra_font_style_block.addClass('hidden');
1284
- }
1285
-
1286
- // Hide backup font family on change
1287
- if ($backup_font_family_block.length) {
1288
- $backup_font_family_block.addClass('hidden');
1289
- }
1290
-
1291
- var $selected = $font_family_select.find(':selected');
1292
- var value = $selected.val();
1293
- var type = $selected.data('type');
1294
-
1295
- if (type && value) {
1296
-
1297
- // Show backup fonts if font type google or custom
1298
- if ((type === 'google' || type === 'custom') && $backup_font_family_block.length) {
1299
- $backup_font_family_block.removeClass('hidden');
1300
- }
1301
-
1302
- } else {
1303
-
1304
- // Clear subsets options if type and value empty
1305
- if ($subset_block.length) {
1306
- $subset_select.find('option').not(':first-child').remove();
1307
- $subset_select.trigger('chosen:updated');
1308
- }
1309
-
1310
- // Clear font styles options if type and value empty
1311
- if ($font_style_block.length) {
1312
- $font_style_select.find('option').not(':first-child').remove();
1313
- $font_style_select.trigger('chosen:updated');
1314
- }
1315
-
1316
- }
1317
-
1318
- // Update font type input value
1319
- $type.val(type);
1320
-
1321
- }).trigger('spf.change');
1322
-
1323
- };
1324
-
1325
- base.init();
1326
-
1327
- });
1328
- };
1329
-
1330
- //
1331
- // Field: upload
1332
- //
1333
- $.fn.spf_field_upload = function () {
1334
- return this.each(function () {
1335
-
1336
- var $this = $(this),
1337
- $input = $this.find('input'),
1338
- $upload_button = $this.find('.spf--button'),
1339
- $remove_button = $this.find('.spf--remove'),
1340
- $library = $upload_button.data('library') && $upload_button.data('library').split(',') || '',
1341
- wp_media_frame;
1342
-
1343
- $input.on('change', function (e) {
1344
- if ($input.val()) {
1345
- $remove_button.removeClass('hidden');
1346
- } else {
1347
- $remove_button.addClass('hidden');
1348
- }
1349
- });
1350
-
1351
- $upload_button.on('click', function (e) {
1352
-
1353
- e.preventDefault();
1354
-
1355
- if (typeof window.wp === 'undefined' || !window.wp.media || !window.wp.media.gallery) {
1356
- return;
1357
- }
1358
-
1359
- if (wp_media_frame) {
1360
- wp_media_frame.open();
1361
- return;
1362
- }
1363
-
1364
- wp_media_frame = window.wp.media({
1365
- library: {
1366
- type: $library
1367
- },
1368
- });
1369
-
1370
- wp_media_frame.on('select', function () {
1371
- $input.val(wp_media_frame.state().get('selection').first().attributes.url).trigger('change');
1372
- });
1373
-
1374
- wp_media_frame.open();
1375
-
1376
- });
1377
-
1378
- $remove_button.on('click', function (e) {
1379
- e.preventDefault();
1380
- $input.val('').trigger('change');
1381
- });
1382
-
1383
- });
1384
-
1385
- };
1386
-
1387
- //
1388
- // Confirm
1389
- //
1390
- $.fn.spf_confirm = function () {
1391
- return this.each(function () {
1392
- $(this).on('click', function (e) {
1393
-
1394
- var confirm_text = $(this).data('confirm') || window.spf_vars.i18n.confirm;
1395
- var confirm_answer = confirm(confirm_text);
1396
- SP_WPCF.vars.is_confirm = true;
1397
-
1398
- if (!confirm_answer) {
1399
- e.preventDefault();
1400
- SP_WPCF.vars.is_confirm = false;
1401
- return false;
1402
- }
1403
-
1404
- });
1405
- });
1406
- };
1407
-
1408
- $.fn.serializeObject = function () {
1409
-
1410
- var obj = {};
1411
-
1412
- $.each(this.serializeArray(), function (i, o) {
1413
- var n = o.name,
1414
- v = o.value;
1415
-
1416
- obj[n] = obj[n] === undefined ? v
1417
- : $.isArray(obj[n]) ? obj[n].concat(v)
1418
- : [obj[n], v];
1419
- });
1420
-
1421
- return obj;
1422
-
1423
- };
1424
-
1425
- //
1426
- // Options Save
1427
- //
1428
- $.fn.spf_save = function () {
1429
- return this.each(function () {
1430
-
1431
- var $this = $(this),
1432
- $buttons = $('.spf-save'),
1433
- $panel = $('.spf-options'),
1434
- flooding = false,
1435
- timeout;
1436
-
1437
- $this.on('click', function (e) {
1438
-
1439
- if (!flooding) {
1440
-
1441
- var $text = $this.data('save'),
1442
- $value = $this.val();
1443
-
1444
- $buttons.attr('value', $text);
1445
-
1446
- if ($this.hasClass('spf-save-ajax')) {
1447
-
1448
- e.preventDefault();
1449
-
1450
- $panel.addClass('spf-saving');
1451
- $buttons.prop('disabled', true);
1452
-
1453
- window.wp.ajax.post('spf_' + $panel.data('unique') + '_ajax_save', {
1454
- data: $('#spf-form').serializeJSONSP_WPCF()
1455
- })
1456
- .done(function (response) {
1457
-
1458
- clearTimeout(timeout);
1459
-
1460
- var $result_success = $('.spf-form-success');
1461
-
1462
- $result_success.empty().append(response.notice).slideDown('fast', function () {
1463
- timeout = setTimeout(function () {
1464
- $result_success.slideUp('fast');
1465
- }, 2000);
1466
- });
1467
-
1468
- // clear errors
1469
- $('.spf-error').remove();
1470
-
1471
- var $append_errors = $('.spf-form-error');
1472
-
1473
- $append_errors.empty().hide();
1474
-
1475
- if (Object.keys(response.errors).length) {
1476
-
1477
- var error_icon = '<i class="spf-label-error spf-error">!</i>';
1478
-
1479
- $.each(response.errors, function (key, error_message) {
1480
-
1481
- var $field = $('[data-depend-id="' + key + '"]'),
1482
- $link = $('#spf-tab-link-' + ($field.closest('.spf-section').index() + 1)),
1483
- $tab = $link.closest('.spf-tab-depth-0');
1484
-
1485
- $field.closest('.spf-fieldset').append('<p class="spf-text-error spf-error">' + error_message + '</p>');
1486
-
1487
- if (!$link.find('.spf-error').length) {
1488
- $link.append(error_icon);
1489
- }
1490
-
1491
- if (!$tab.find('.spf-arrow .spf-error').length) {
1492
- $tab.find('.spf-arrow').append(error_icon);
1493
- }
1494
-
1495
- console.log(error_message);
1496
-
1497
- $append_errors.append('<div>' + error_icon + ' ' + error_message + '</div>');
1498
-
1499
- });
1500
-
1501
- $append_errors.show();
1502
-
1503
- }
1504
-
1505
- $panel.removeClass('spf-saving');
1506
- $buttons.prop('disabled', false).attr('value', $value);
1507
- flooding = false;
1508
-
1509
- })
1510
- .fail(function (response) {
1511
- alert(response.error);
1512
- });
1513
-
1514
- }
1515
-
1516
- }
1517
-
1518
- flooding = true;
1519
-
1520
- });
1521
-
1522
- });
1523
- };
1524
-
1525
- //
1526
- // Taxonomy Framework
1527
- //
1528
- $.fn.spf_taxonomy = function () {
1529
- return this.each(function () {
1530
-
1531
- var $this = $(this),
1532
- $form = $this.parents('form');
1533
-
1534
- if ($form.attr('id') === 'addtag') {
1535
-
1536
- var $submit = $form.find('#submit'),
1537
- $cloned = $this.find('.spf-field').spf_clone();
1538
-
1539
- $submit.on('click', function () {
1540
-
1541
- if (!$form.find('.form-required').hasClass('form-invalid')) {
1542
-
1543
- $this.data('inited', false);
1544
-
1545
- $this.empty();
1546
-
1547
- $this.html($cloned);
1548
-
1549
- $cloned = $cloned.spf_clone();
1550
-
1551
- $this.spf_reload_script();
1552
-
1553
- }
1554
-
1555
- });
1556
-
1557
- }
1558
-
1559
- });
1560
- };
1561
-
1562
- //
1563
- // Shortcode Framework
1564
- //
1565
- $.fn.spf_shortcode = function () {
1566
-
1567
- var base = this;
1568
-
1569
- base.shortcode_parse = function (serialize, key) {
1570
-
1571
- var shortcode = '';
1572
-
1573
- $.each(serialize, function (shortcode_key, shortcode_values) {
1574
-
1575
- key = (key) ? key : shortcode_key;
1576
-
1577
- shortcode += '[' + key;
1578
-
1579
- $.each(shortcode_values, function (shortcode_tag, shortcode_value) {
1580
-
1581
- if (shortcode_tag === 'content') {
1582
-
1583
- shortcode += ']';
1584
- shortcode += shortcode_value;
1585
- shortcode += '[/' + key + '';
1586
-
1587
- } else {
1588
-
1589
- shortcode += base.shortcode_tags(shortcode_tag, shortcode_value);
1590
-
1591
- }
1592
-
1593
- });
1594
-
1595
- shortcode += ']';
1596
-
1597
- });
1598
-
1599
- return shortcode;
1600
-
1601
- };
1602
-
1603
- base.shortcode_tags = function (shortcode_tag, shortcode_value) {
1604
-
1605
- var shortcode = '';
1606
-
1607
- if (shortcode_value !== '') {
1608
-
1609
- if (typeof shortcode_value === 'object' && !$.isArray(shortcode_value)) {
1610
-
1611
- $.each(shortcode_value, function (sub_shortcode_tag, sub_shortcode_value) {
1612
-
1613
- // sanitize spesific key/value
1614
- switch (sub_shortcode_tag) {
1615
-
1616
- case 'background-image':
1617
- sub_shortcode_value = (sub_shortcode_value.url) ? sub_shortcode_value.url : '';
1618
- break;
1619
-
1620
- }
1621
-
1622
- if (sub_shortcode_value !== '') {
1623
- shortcode += ' ' + sub_shortcode_tag.replace('-', '_') + '="' + sub_shortcode_value.toString() + '"';
1624
- }
1625
-
1626
- });
1627
-
1628
- } else {
1629
-
1630
- shortcode += ' ' + shortcode_tag.replace('-', '_') + '="' + shortcode_value.toString() + '"';
1631
-
1632
- }
1633
-
1634
- }
1635
-
1636
- return shortcode;
1637
-
1638
- };
1639
-
1640
- base.insertAtChars = function (_this, currentValue) {
1641
-
1642
- var obj = (typeof _this[0].name !== 'undefined') ? _this[0] : _this;
1643
-
1644
- if (obj.value.length && typeof obj.selectionStart !== 'undefined') {
1645
- obj.focus();
1646
- return obj.value.substring(0, obj.selectionStart) + currentValue + obj.value.substring(obj.selectionEnd, obj.value.length);
1647
- } else {
1648
- obj.focus();
1649
- return currentValue;
1650
- }
1651
-
1652
- };
1653
-
1654
- base.send_to_editor = function (html, editor_id) {
1655
-
1656
- var tinymce_editor;
1657
-
1658
- if (typeof tinymce !== 'undefined') {
1659
- tinymce_editor = tinymce.get(editor_id);
1660
- }
1661
-
1662
- if (tinymce_editor && !tinymce_editor.isHidden()) {
1663
- tinymce_editor.execCommand('mceInsertContent', false, html);
1664
- } else {
1665
- var $editor = $('#' + editor_id);
1666
- $editor.val(base.insertAtChars($editor, html)).trigger('change');
1667
- }
1668
-
1669
- };
1670
-
1671
- return this.each(function () {
1672
-
1673
- var $modal = $(this),
1674
- $load = $modal.find('.spf-modal-load'),
1675
- $content = $modal.find('.spf-modal-content'),
1676
- $insert = $modal.find('.spf-modal-insert'),
1677
- $loading = $modal.find('.spf-modal-loading'),
1678
- $select = $modal.find('select'),
1679
- modal_id = $modal.data('modal-id'),
1680
- nonce = $modal.data('nonce'),
1681
- editor_id,
1682
- target_id,
1683
- gutenberg_id,
1684
- sc_key,
1685
- sc_name,
1686
- sc_view,
1687
- sc_group,
1688
- $cloned,
1689
- $button;
1690
-
1691
- $(document).on('click', '.spf-shortcode-button[data-modal-id="' + modal_id + '"]', function (e) {
1692
-
1693
- e.preventDefault();
1694
-
1695
- $button = $(this);
1696
- editor_id = $button.data('editor-id') || false;
1697
- target_id = $button.data('target-id') || false;
1698
- gutenberg_id = $button.data('gutenberg-id') || false;
1699
-
1700
- $modal.show();
1701
-
1702
- // single usage trigger first shortcode
1703
- if ($modal.hasClass('spf-shortcode-single') && sc_name === undefined) {
1704
- $select.trigger('change');
1705
- }
1706
-
1707
- });
1708
-
1709
- $select.on('change', function () {
1710
-
1711
- var $option = $(this);
1712
- var $selected = $option.find(':selected');
1713
-
1714
- sc_key = $option.val();
1715
- sc_name = $selected.data('shortcode');
1716
- sc_view = $selected.data('view') || 'normal';
1717
- sc_group = $selected.data('group') || sc_name;
1718
-
1719
- $load.empty();
1720
-
1721
- if (sc_key) {
1722
-
1723
- $loading.show();
1724
-
1725
- window.wp.ajax.post('spf-get-shortcode-' + modal_id, {
1726
- shortcode_key: sc_key,
1727
- nonce: nonce
1728
- })
1729
- .done(function (response) {
1730
-
1731
- $loading.hide();
1732
-
1733
- var $appended = $(response.content).appendTo($load);
1734
-
1735
- $insert.parent().removeClass('hidden');
1736
-
1737
- $cloned = $appended.find('.spf--repeat-shortcode').spf_clone();
1738
-
1739
- $appended.spf_reload_script();
1740
- $appended.find('.spf-fields').spf_reload_script();
1741
-
1742
- });
1743
-
1744
- } else {
1745
-
1746
- $insert.parent().addClass('hidden');
1747
-
1748
- }
1749
-
1750
- });
1751
-
1752
- $insert.on('click', function (e) {
1753
-
1754
- e.preventDefault();
1755
-
1756
- var shortcode = '';
1757
- var serialize = $modal.find('.spf-field:not(.hidden)').find(':input').serializeObjectSP_WPCF();
1758
-
1759
- switch (sc_view) {
1760
-
1761
- case 'contents':
1762
- var contentsObj = (sc_name) ? serialize[sc_name] : serialize;
1763
- $.each(contentsObj, function (sc_key, sc_value) {
1764
- var sc_tag = (sc_name) ? sc_name : sc_key;
1765
- shortcode += '[' + sc_tag + ']' + sc_value + '[/' + sc_tag + ']';
1766
- });
1767
- break;
1768
-
1769
- case 'group':
1770
-
1771
- shortcode += '[' + sc_name;
1772
- $.each(serialize[sc_name], function (sc_key, sc_value) {
1773
- shortcode += base.shortcode_tags(sc_key, sc_value);
1774
- });
1775
- shortcode += ']';
1776
- shortcode += base.shortcode_parse(serialize[sc_group], sc_group);
1777
- shortcode += '[/' + sc_name + ']';
1778
-
1779
- break;
1780
-
1781
- case 'repeater':
1782
- shortcode += base.shortcode_parse(serialize[sc_group], sc_group);
1783
- break;
1784
-
1785
- default:
1786
- shortcode += base.shortcode_parse(serialize);
1787
- break;
1788
-
1789
- }
1790
-
1791
- if (gutenberg_id) {
1792
-
1793
- var content = window.spf_gutenberg_props.attributes.hasOwnProperty('shortcode') ? window.spf_gutenberg_props.attributes.shortcode : '';
1794
- window.spf_gutenberg_props.setAttributes({ shortcode: content + shortcode });
1795
-
1796
- } else if (editor_id) {
1797
-
1798
- base.send_to_editor(shortcode, editor_id);
1799
-
1800
- } else {
1801
-
1802
- var $textarea = (target_id) ? $(target_id) : $button.parent().find('textarea');
1803
- $textarea.val(base.insertAtChars($textarea, shortcode)).trigger('change');
1804
-
1805
- }
1806
-
1807
- $modal.hide();
1808
-
1809
- });
1810
-
1811
- $modal.on('click', '.spf--repeat-button', function (e) {
1812
-
1813
- e.preventDefault();
1814
-
1815
- var $repeatable = $modal.find('.spf--repeatable');
1816
- var $new_clone = $cloned.spf_clone();
1817
- var $remove_btn = $new_clone.find('.spf-repeat-remove');
1818
-
1819
- var $appended = $new_clone.appendTo($repeatable);
1820
-
1821
- $new_clone.find('.spf-fields').spf_reload_script();
1822
-
1823
- SP_WPCF.helper.name_nested_replace($modal.find('.spf--repeat-shortcode'), sc_group);
1824
-
1825
- $remove_btn.on('click', function () {
1826
-
1827
- $new_clone.remove();
1828
-
1829
- SP_WPCF.helper.name_nested_replace($modal.find('.spf--repeat-shortcode'), sc_group);
1830
-
1831
- });
1832
-
1833
- });
1834
-
1835
- $modal.on('click', '.spf-modal-close, .spf-modal-overlay', function () {
1836
- $modal.hide();
1837
- });
1838
-
1839
- });
1840
- };
1841
-
1842
- //
1843
- // Helper Checkbox Checker
1844
- //
1845
- $.fn.spf_checkbox = function () {
1846
- return this.each(function () {
1847
-
1848
- var $this = $(this),
1849
- $input = $this.find('.spf--input'),
1850
- $checkbox = $this.find('.spf--checkbox');
1851
-
1852
- $checkbox.on('click', function () {
1853
- $input.val(Number($checkbox.prop('checked'))).trigger('change');
1854
- });
1855
-
1856
- });
1857
- };
1858
-
1859
- //
1860
- // Field: wp_editor
1861
- //
1862
- $.fn.spf_field_wp_editor = function () {
1863
- return this.each(function () {
1864
-
1865
- if (typeof window.wp.editor === 'undefined' || typeof window.tinyMCEPreInit === 'undefined' || typeof window.tinyMCEPreInit.mceInit.spf_wp_editor === 'undefined') {
1866
- return;
1867
- }
1868
-
1869
- var $this = $(this),
1870
- $editor = $this.find('.spf-wp-editor'),
1871
- $textarea = $this.find('textarea');
1872
-
1873
- // If there is wp-editor remove it for avoid dupliated wp-editor conflicts.
1874
- var $has_wp_editor = $this.find('.wp-editor-wrap').length || $this.find('.mce-container').length;
1875
-
1876
- if ($has_wp_editor) {
1877
- $editor.empty();
1878
- $editor.append($textarea);
1879
- $textarea.css('display', '');
1880
- }
1881
-
1882
- // Generate a unique id
1883
- var uid = SP_WPCF.helper.uid('spf-editor-');
1884
-
1885
- $textarea.attr('id', uid);
1886
-
1887
- // Get default editor settings
1888
- var default_editor_settings = {
1889
- tinymce: window.tinyMCEPreInit.mceInit.spf_wp_editor,
1890
- quicktags: window.tinyMCEPreInit.qtInit.spf_wp_editor
1891
- };
1892
-
1893
- // Get default editor settings
1894
- var field_editor_settings = $editor.data('editor-settings');
1895
-
1896
- // Add on change event handle
1897
- var editor_on_change = function (editor) {
1898
- editor.on('change', SP_WPCF.helper.debounce(function () {
1899
- editor.save();
1900
- $textarea.trigger('change');
1901
- }, 250));
1902
- };
1903
-
1904
- // Extend editor selector and on change event handler
1905
- default_editor_settings.tinymce = $.extend({}, default_editor_settings.tinymce, { selector: '#' + uid, setup: editor_on_change });
1906
-
1907
- // Override editor tinymce settings
1908
- if (field_editor_settings.tinymce === false) {
1909
- default_editor_settings.tinymce = false;
1910
- $editor.addClass('spf-no-tinymce');
1911
- }
1912
-
1913
- // Override editor quicktags settings
1914
- if (field_editor_settings.quicktags === false) {
1915
- default_editor_settings.quicktags = false;
1916
- $editor.addClass('spf-no-quicktags');
1917
- }
1918
-
1919
- // Wait until :visible
1920
- var interval = setInterval(function () {
1921
- if ($this.is(':visible')) {
1922
- window.wp.editor.initialize(uid, default_editor_settings);
1923
- clearInterval(interval);
1924
- }
1925
- });
1926
-
1927
- // Add Media buttons
1928
- if (field_editor_settings.media_buttons && window.spf_media_buttons) {
1929
-
1930
- var $editor_buttons = $editor.find('.wp-media-buttons');
1931
-
1932
- if ($editor_buttons.length) {
1933
-
1934
- $editor_buttons.find('.spf-shortcode-button').data('editor-id', uid);
1935
-
1936
- } else {
1937
-
1938
- var $media_buttons = $(window.spf_media_buttons);
1939
-
1940
- $media_buttons.find('.spf-shortcode-button').data('editor-id', uid);
1941
-
1942
- $editor.prepend($media_buttons);
1943
-
1944
- }
1945
-
1946
- }
1947
-
1948
- });
1949
-
1950
- };
1951
-
1952
- //
1953
- // Siblings
1954
- //
1955
- $.fn.spf_siblings = function () {
1956
- return this.each(function () {
1957
-
1958
- var $this = $(this),
1959
- $siblings = $this.find('.spf--sibling'),
1960
- multiple = $this.data('multiple') || false;
1961
-
1962
- $siblings.on('click', function () {
1963
-
1964
- var $sibling = $(this);
1965
-
1966
- if (multiple) {
1967
-
1968
- if ($sibling.hasClass('spf--active')) {
1969
- $sibling.removeClass('spf--active');
1970
- $sibling.find('input').prop('checked', false).trigger('change');
1971
- } else {
1972
- $sibling.addClass('spf--active');
1973
- $sibling.find('input').prop('checked', true).trigger('change');
1974
- }
1975
-
1976
- } else {
1977
-
1978
- $this.find('input').prop('checked', false);
1979
- $sibling.find('input').prop('checked', true).trigger('change');
1980
- $sibling.addClass('spf--active').siblings().removeClass('spf--active');
1981
-
1982
- }
1983
-
1984
- });
1985
-
1986
- });
1987
- };
1988
-
1989
- //
1990
- // WP Color Picker
1991
- //
1992
- if (typeof Color === 'function') {
1993
-
1994
- Color.fn.toString = function () {
1995
-
1996
- if (this._alpha < 1) {
1997
- return this.toCSS('rgba', this._alpha).replace(/\s+/g, '');
1998
- }
1999
-
2000
- var hex = parseInt(this._color, 10).toString(16);
2001
-
2002
- if (this.error) { return ''; }
2003
-
2004
- if (hex.length < 6) {
2005
- for (var i = 6 - hex.length - 1; i >= 0; i--) {
2006
- hex = '0' + hex;
2007
- }
2008
- }
2009
-
2010
- return '#' + hex;
2011
-
2012
- };
2013
-
2014
- }
2015
-
2016
- SP_WPCF.funcs.parse_color = function (color) {
2017
-
2018
- var value = color.replace(/\s+/g, ''),
2019
- trans = (value.indexOf('rgba') !== -1) ? parseFloat(value.replace(/^.*,(.+)\)/, '$1') * 100) : 100,
2020
- rgba = (trans < 100) ? true : false;
2021
-
2022
- return { value: value, transparent: trans, rgba: rgba };
2023
-
2024
- };
2025
-
2026
- $.fn.spf_color = function () {
2027
- return this.each(function () {
2028
-
2029
- var $input = $(this),
2030
- picker_color = SP_WPCF.funcs.parse_color($input.val()),
2031
- palette_color = window.spf_vars.color_palette.length ? window.spf_vars.color_palette : true,
2032
- $container;
2033
-
2034
- // Destroy and Reinit
2035
- if ($input.hasClass('wp-color-picker')) {
2036
- $input.closest('.wp-picker-container').after($input).remove();
2037
- }
2038
-
2039
- $input.wpColorPicker({
2040
- palettes: palette_color,
2041
- change: function (event, ui) {
2042
-
2043
- var ui_color_value = ui.color.toString();
2044
-
2045
- $container.removeClass('spf--transparent-active');
2046
- $container.find('.spf--transparent-offset').css('background-color', ui_color_value);
2047
- $input.val(ui_color_value).trigger('change');
2048
-
2049
- },
2050
- create: function () {
2051
-
2052
- $container = $input.closest('.wp-picker-container');
2053
-
2054
- var a8cIris = $input.data('a8cIris'),
2055
- $transparent_wrap = $('<div class="spf--transparent-wrap">' +
2056
- '<div class="spf--transparent-slider"></div>' +
2057
- '<div class="spf--transparent-offset"></div>' +
2058
- '<div class="spf--transparent-text"></div>' +
2059
- '<div class="spf--transparent-button button button-small">transparent</div>' +
2060
- '</div>').appendTo($container.find('.wp-picker-holder')),
2061
- $transparent_slider = $transparent_wrap.find('.spf--transparent-slider'),
2062
- $transparent_text = $transparent_wrap.find('.spf--transparent-text'),
2063
- $transparent_offset = $transparent_wrap.find('.spf--transparent-offset'),
2064
- $transparent_button = $transparent_wrap.find('.spf--transparent-button');
2065
-
2066
- if ($input.val() === 'transparent') {
2067
- $container.addClass('spf--transparent-active');
2068
- }
2069
-
2070
- $transparent_button.on('click', function () {
2071
- if ($input.val() !== 'transparent') {
2072
- $input.val('transparent').trigger('change').removeClass('iris-error');
2073
- $container.addClass('spf--transparent-active');
2074
- } else {
2075
- $input.val(a8cIris._color.toString()).trigger('change');
2076
- $container.removeClass('spf--transparent-active');
2077
- }
2078
- });
2079
-
2080
- $transparent_slider.slider({
2081
- value: picker_color.transparent,
2082
- step: 1,
2083
- min: 0,
2084
- max: 100,
2085
- slide: function (event, ui) {
2086
-
2087
- var slide_value = parseFloat(ui.value / 100);
2088
- a8cIris._color._alpha = slide_value;
2089
- $input.wpColorPicker('color', a8cIris._color.toString());
2090
- $transparent_text.text((slide_value === 1 || slide_value === 0 ? '' : slide_value));
2091
-
2092
- },
2093
- create: function () {
2094
-
2095
- var slide_value = parseFloat(picker_color.transparent / 100),
2096
- text_value = slide_value < 1 ? slide_value : '';
2097
-
2098
- $transparent_text.text(text_value);
2099
- $transparent_offset.css('background-color', picker_color.value);
2100
-
2101
- $container.on('click', '.wp-picker-clear', function () {
2102
-
2103
- a8cIris._color._alpha = 1;
2104
- $transparent_text.text('');
2105
- $transparent_slider.slider('option', 'value', 100);
2106
- $container.removeClass('spf--transparent-active');
2107
- $input.trigger('change');
2108
-
2109
- });
2110
-
2111
- $container.on('click', '.wp-picker-default', function () {
2112
-
2113
- var default_color = SP_WPCF.funcs.parse_color($input.data('default-color')),
2114
- default_value = parseFloat(default_color.transparent / 100),
2115
- default_text = default_value < 1 ? default_value : '';
2116
-
2117
- a8cIris._color._alpha = default_value;
2118
- $transparent_text.text(default_text);
2119
- $transparent_slider.slider('option', 'value', default_color.transparent);
2120
-
2121
- });
2122
-
2123
- $container.on('click', '.wp-color-result', function () {
2124
- $transparent_wrap.toggle();
2125
- });
2126
-
2127
- $('body').on('click.wpcolorpicker', function () {
2128
- $transparent_wrap.hide();
2129
- });
2130
-
2131
- }
2132
- });
2133
- }
2134
- });
2135
-
2136
- });
2137
- };
2138
-
2139
- //
2140
- // ChosenJS
2141
- //
2142
- $.fn.spf_chosen = function () {
2143
- return this.each(function () {
2144
-
2145
- var $this = $(this),
2146
- $inited = $this.parent().find('.chosen-container'),
2147
- is_multi = $this.attr('multiple') || false,
2148
- set_width = is_multi ? '100%' : 'auto',
2149
- set_options = $.extend({
2150
- allow_single_deselect: true,
2151
- disable_search_threshold: 15,
2152
- width: set_width
2153
- }, $this.data());
2154
-
2155
- if ($inited.length) {
2156
- $inited.remove();
2157
- }
2158
-
2159
- $this.chosen(set_options);
2160
-
2161
- });
2162
- };
2163
-
2164
- //
2165
- // Number (only allow numeric inputs)
2166
- //
2167
- $.fn.spf_number = function () {
2168
- return this.each(function () {
2169
-
2170
- $(this).on('keypress', function (e) {
2171
-
2172
- if (e.keyCode !== 0 && e.keyCode !== 8 && e.keyCode !== 45 && e.keyCode !== 46 && (e.keyCode < 48 || e.keyCode > 57)) {
2173
- return false;
2174
- }
2175
-
2176
- });
2177
-
2178
- });
2179
- };
2180
-
2181
- //
2182
- // Help Tooltip
2183
- //
2184
- $.fn.spf_help = function () {
2185
- return this.each(function () {
2186
- var $this = $(this),
2187
- $tooltip,
2188
- offset_left;
2189
-
2190
- $this.on({
2191
- mouseenter: function () {
2192
- $tooltip = $('<div class="spf-tooltip"></div>')
2193
- .html($this.find(".spf-help-text").html())
2194
- .appendTo("body");
2195
- offset_left = SP_WPCF.vars.is_rtl
2196
- ? $this.offset().left + 24
2197
- : $this.offset().left + 24;
2198
-
2199
- $tooltip.css({
2200
- top: $this.offset().top - ($tooltip.outerHeight() / 2 - 14),
2201
- left: offset_left,
2202
- textAlign: "left",
2203
- });
2204
- },
2205
- mouseleave: function () {
2206
- if ($tooltip !== undefined) {
2207
- $tooltip.remove();
2208
- }
2209
- },
2210
- });
2211
- });
2212
- };
2213
-
2214
- //
2215
- // Customize Refresh
2216
- //
2217
- $.fn.spf_customizer_refresh = function () {
2218
- return this.each(function () {
2219
-
2220
- var $this = $(this),
2221
- $complex = $this.closest('.spf-customize-complex');
2222
-
2223
- if ($complex.length) {
2224
-
2225
- var $input = $complex.find(':input'),
2226
- $unique = $complex.data('unique-id'),
2227
- $option = $complex.data('option-id'),
2228
- obj = $input.serializeObjectSP_WPCF(),
2229
- data = (!$.isEmptyObject(obj)) ? obj[$unique][$option] : '',
2230
- control = wp.customize.control($unique + '[' + $option + ']');
2231
-
2232
- // clear the value to force refresh.
2233
- control.setting._value = null;
2234
-
2235
- control.setting.set(data);
2236
-
2237
- } else {
2238
-
2239
- $this.find(':input').first().trigger('change');
2240
-
2241
- }
2242
-
2243
- $(document).trigger('spf-customizer-refresh', $this);
2244
-
2245
- });
2246
- };
2247
-
2248
- //
2249
- // Customize Listen Form Elements
2250
- //
2251
- $.fn.spf_customizer_listen = function (options) {
2252
-
2253
- var settings = $.extend({
2254
- closest: false,
2255
- }, options);
2256
-
2257
- return this.each(function () {
2258
-
2259
- if (window.wp.customize === undefined) { return; }
2260
-
2261
- var $this = (settings.closest) ? $(this).closest('.spf-customize-complex') : $(this),
2262
- $input = $this.find(':input'),
2263
- unique_id = $this.data('unique-id'),
2264
- option_id = $this.data('option-id');
2265
-
2266
- if (unique_id === undefined) { return; }
2267
-
2268
- $input.on('change keyup', SP_WPCF.helper.debounce(function () {
2269
-
2270
- var obj = $this.find(':input').serializeObjectSP_WPCF();
2271
-
2272
- if (!$.isEmptyObject(obj) && obj[unique_id]) {
2273
-
2274
- window.wp.customize.control(unique_id + '[' + option_id + ']').setting.set(obj[unique_id][option_id]);
2275
-
2276
- }
2277
-
2278
- }, 250));
2279
-
2280
- });
2281
- };
2282
-
2283
- //
2284
- // Customizer Listener for Reload JS
2285
- //
2286
- $(document).on('expanded', '.control-section-spf', function () {
2287
-
2288
- var $this = $(this);
2289
-
2290
- if ($this.hasClass('open') && !$this.data('inited')) {
2291
- $this.spf_dependency();
2292
- $this.find('.spf-customize-field').spf_reload_script({ dependency: false });
2293
- $this.find('.spf-customize-complex').spf_customizer_listen();
2294
- $this.data('inited', true);
2295
- }
2296
-
2297
- });
2298
-
2299
- //
2300
- // Window on resize
2301
- //
2302
- SP_WPCF.vars.$window.on('resize spf.resize', SP_WPCF.helper.debounce(function (event) {
2303
-
2304
- var window_width = navigator.userAgent.indexOf('AppleWebKit/') > -1 ? SP_WPCF.vars.$window.width() : window.innerWidth;
2305
-
2306
- if (window_width <= 782 && !SP_WPCF.vars.onloaded) {
2307
- $('.spf-section').spf_reload_script();
2308
- SP_WPCF.vars.onloaded = true;
2309
- }
2310
-
2311
- }, 200)).trigger('spf.resize');
2312
-
2313
- //
2314
- // Widgets Framework
2315
- //
2316
- $.fn.spf_widgets = function () {
2317
- if (this.length) {
2318
-
2319
- $(document).on('widget-added widget-updated', function (event, $widget) {
2320
- $widget.find('.spf-fields').spf_reload_script();
2321
- });
2322
-
2323
- $('.widgets-sortables, .control-section-sidebar').on('sortstop', function (event, ui) {
2324
- ui.item.find('.spf-fields').spf_reload_script_retry();
2325
- });
2326
-
2327
- $(document).on('click', '.widget-top', function (event) {
2328
- $(this).parent().find('.spf-fields').spf_reload_script();
2329
- });
2330
-
2331
- }
2332
- };
2333
-
2334
- //
2335
- // Retry Plugins
2336
- //
2337
- $.fn.spf_reload_script_retry = function () {
2338
- return this.each(function () {
2339
-
2340
- var $this = $(this);
2341
-
2342
- if ($this.data('inited')) {
2343
- $this.children('.spf-field-wp_editor').spf_field_wp_editor();
2344
- }
2345
-
2346
- });
2347
- };
2348
-
2349
- //
2350
- // Reload Plugins
2351
- //
2352
- $.fn.spf_reload_script = function (options) {
2353
-
2354
- var settings = $.extend({
2355
- dependency: true,
2356
- }, options);
2357
-
2358
- return this.each(function () {
2359
-
2360
- var $this = $(this);
2361
-
2362
- // Avoid for conflicts
2363
- if (!$this.data('inited')) {
2364
-
2365
- // Field plugins
2366
- $this.children('.spf-field-accordion').spf_field_accordion();
2367
- // $this.children('.spf-field-backup').spf_field_backup();
2368
- // $this.children('.spf-field-background_adv').spf_field_background();
2369
- // $this.children('.spf-field-background').spf_field_background();
2370
- $this.children('.spf-field-code_editor').spf_field_code_editor();
2371
- // $this.children('.spf-field-date').spf_field_date();
2372
- $this.children('.spf-field-fieldset').spf_field_fieldset();
2373
- $this.children('.spf-field-gallery').spf_field_gallery();
2374
- $this.children('.spf-field-group').spf_field_group();
2375
- // $this.children('.spf-field-icon').spf_field_icon();
2376
- $this.children('.spf-field-media').spf_field_media();
2377
- // $this.children('.spf-field-repeater').spf_field_repeater();
2378
- // $this.children('.spf-field-slider').spf_field_slider();
2379
- // $this.children('.spf-field-sortable').spf_field_sortable();
2380
- // $this.children('.spf-field-sorter').spf_field_sorter();
2381
- $this.children('.spf-field-spinner').spf_field_spinner();
2382
- $this.children('.spf-field-switcher').spf_field_switcher();
2383
- // $this.children('.spf-field-tabbed').spf_field_tabbed();
2384
- $this.children('.spf-field-typography').spf_field_typography();
2385
- $this.children('.spf-field-upload').spf_field_upload();
2386
- $this.children('.spf-field-wp_editor').spf_field_wp_editor();
2387
-
2388
- // Field colors
2389
- $this.children('.spf-field-border').find('.spf-color').spf_color();
2390
- $this.children('.spf-field-dimensions_advanced').find('.spf-color').spf_color();
2391
- $this.children('.spf-field-background_adv').find('.spf-color').spf_color();
2392
- $this.children('.spf-field-background').find('.spf-color').spf_color();
2393
- $this.children('.spf-field-color').find('.spf-color').spf_color();
2394
- $this.children('.spf-field-color_group').find('.spf-color').spf_color();
2395
- $this.children('.spf-field-link_color').find('.spf-color').spf_color();
2396
- $this.children('.spf-field-typography').find('.spf-color').spf_color();
2397
-
2398
- // Field allows only number
2399
- $this.children('.spf-field-dimensions').find('.spf-number').spf_number();
2400
- $this.children('.spf-field-slider').find('.spf-number').spf_number();
2401
- $this.children('.spf-field-spacing').find('.spf-number').spf_number();
2402
- $this.children('.spf-field-column').find('.spf-number').spf_number();
2403
- $this.children('.spf-field-dimensions_advanced').find('.spf-number').spf_number();
2404
- $this.children('.spf-field-spinner').find('.spf-number').spf_number();
2405
- $this.children('.spf-field-typography').find('.spf-number').spf_number();
2406
-
2407
- // Field chosenjs
2408
- $this.children('.spf-field-select').find('.spf-chosen').spf_chosen();
2409
-
2410
- // Field Checkbox
2411
- $this.children('.spf-field-checkbox').find('.spf-checkbox').spf_checkbox();
2412
-
2413
- // Field Siblings
2414
- $this.children('.spf-field-button_set').find('.spf-siblings').spf_siblings();
2415
- $this.children('.spf-field-image_select').find('.spf-siblings').spf_siblings();
2416
- $this.children('.spf-field-carousel_type').find('.spf-siblings').spf_siblings();
2417
- $this.children('.spf-field-palette').find('.spf-siblings').spf_siblings();
2418
-
2419
- // Help Tooptip
2420
- $this.children('.spf-field').find('.spf-help').spf_help();
2421
-
2422
- if (settings.dependency) {
2423
- $this.spf_dependency();
2424
- }
2425
-
2426
- $this.data('inited', true);
2427
-
2428
- $(document).trigger('spf-reload-script', $this);
2429
-
2430
- }
2431
-
2432
- });
2433
- };
2434
-
2435
- //
2436
- // Document ready and run scripts.
2437
- //
2438
- $(document).ready(function () {
2439
-
2440
- $('.spf-save').spf_save();
2441
- $('.spf-confirm').spf_confirm();
2442
- $('.spf-nav-options').spf_nav_options();
2443
- $('.spf-nav-metabox').spf_nav_metabox();
2444
- $('.spf-expand-all').spf_expand_all();
2445
- $('.spf-search').spf_search();
2446
- $('.spf-sticky-header').spf_sticky();
2447
- $('.spf-taxonomy').spf_taxonomy();
2448
- $('.spf-shortcode').spf_shortcode();
2449
- $('.spf-page-templates').spf_page_templates();
2450
- $('.spf-post-formats').spf_post_formats();
2451
- $('.spf-onload').spf_reload_script();
2452
- $('.widget').spf_widgets();
2453
-
2454
- });
2455
-
2456
-
2457
- // ======================================================
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' });
2503
-
2504
- /* Copy to clipboard */
2505
- $('.wpcp-shortcode-selectable').click(function (e) {
2506
- e.preventDefault();
2507
- wpcp_copyToClipboard($(this));
2508
- wpcp_SelectText($(this));
2509
- $(this).focus().select();
2510
- jQuery(".spwpc-after-copy-text").animate({
2511
- opacity: 1,
2512
- bottom: 25
2513
- }, 300);
2514
- setTimeout(function () {
2515
- jQuery(".spwpc-after-copy-text").animate({
2516
- opacity: 0,
2517
- }, 200);
2518
- jQuery(".spwpc-after-copy-text").animate({
2519
- bottom: 0
2520
- }, 0);
2521
- }, 2000);
2522
- });
2523
- function wpcp_copyToClipboard(element) {
2524
- var $temp = $("<input>");
2525
- $("body").append($temp);
2526
- $temp.val($(element).text()).select();
2527
- document.execCommand("copy");
2528
- $temp.remove();
2529
- }
2530
- function wpcp_SelectText(element) {
2531
- var r = document.createRange();
2532
- var w = element.get(0);
2533
- r.selectNodeContents(w);
2534
- var sel = window.getSelection();
2535
- sel.removeAllRanges();
2536
- sel.addRange(r);
2537
- }
2538
- $('.post-type-sp_wp_carousel .shortcode.column-shortcode input').click(function (e) {
2539
- e.preventDefault();
2540
- /* Get the text field */
2541
- var copyText = $(this);
2542
- /* Select the text field */
2543
- copyText.select();
2544
- document.execCommand("copy");
2545
-
2546
- jQuery(".spwpc-after-copy-text").animate({
2547
- opacity: 1,
2548
- bottom: 25
2549
- }, 300);
2550
- setTimeout(function () {
2551
- jQuery(".spwpc-after-copy-text").animate({
2552
- opacity: 0,
2553
- }, 200);
2554
- jQuery(".spwpc-after-copy-text").animate({
2555
- bottom: 0
2556
- }, 0);
2557
- }, 2000);
2558
- });
2559
-
2560
- // WP Carousel export.
2561
- var $export_type = $('.wpcp_what_export').find('input:checked').val();
2562
- $('.wpcp_what_export').on('change', function () {
2563
- $export_type = $(this).find('input:checked').val();
2564
- });
2565
-
2566
- $('.wpcp_export .spf--button').click(function (event) {
2567
- event.preventDefault();
2568
-
2569
- var $shortcode_ids = $('.wpcp_post_ids select').val();
2570
- var $ex_nonce = $('#spf_options_nonce').val();
2571
- var selected_shortcode = $export_type === 'selected_shortcodes' ? $shortcode_ids : 'all_shortcodes';
2572
- if ($export_type === 'all_shortcodes' || $export_type === 'selected_shortcodes') {
2573
- var data = {
2574
- action: 'wpcp_export_shortcodes',
2575
- wpcf_ids: selected_shortcode,
2576
- nonce: $ex_nonce,
2577
- }
2578
- } else {
2579
- $('.spf-form-result.spf-form-success').text('No carousel selected.').show();
2580
- setTimeout(function () {
2581
- $('.spf-form-result.spf-form-success').hide().text('');
2582
- }, 3000);
2583
- }
2584
- $.post(ajaxurl, data, function (resp) {
2585
- if (resp) {
2586
- // Convert JSON Array to string.
2587
- var json = JSON.stringify(resp);
2588
- // Convert JSON string to BLOB.
2589
- json = [json];
2590
- var blob = new Blob(json);
2591
- var link = document.createElement('a');
2592
- var wpcp_time = $.now();
2593
- link.href = window.URL.createObjectURL(blob);
2594
- link.download = "wp-carousel-export-" + wpcp_time + ".json";
2595
- link.click();
2596
- $('.spf-form-result.spf-form-success').text('Exported successfully!').show();
2597
- setTimeout(function () {
2598
- $('.spf-form-result.spf-form-success').hide().text('');
2599
- $('.wpcp_post_ids select').val('').trigger('chosen:updated');
2600
- }, 3000);
2601
- }
2602
- });
2603
- });
2604
- // Wp Carousel import.
2605
- $('.wpcp_import button.import').click(function (event) {
2606
- event.preventDefault();
2607
- var wpcp_shortcodes = $('#import').prop('files')[0];
2608
- if ($('#import').val() != '') {
2609
- var $im_nonce = $('#spf_options_nonce').val();
2610
- var reader = new FileReader();
2611
- reader.readAsText(wpcp_shortcodes);
2612
- reader.onload = function (event) {
2613
- var jsonObj = JSON.stringify(event.target.result);
2614
- $.ajax({
2615
- url: ajaxurl,
2616
- type: 'POST',
2617
- data: {
2618
- shortcode: jsonObj,
2619
- action: 'wpcp_import_shortcodes',
2620
- nonce: $im_nonce,
2621
- },
2622
- success: function (resp) {
2623
- $('.spf-form-result.spf-form-success').text('Imported successfully!').show();
2624
- setTimeout(function () {
2625
- $('.spf-form-result.spf-form-success').hide().text('');
2626
- $('#import').val('');
2627
- window.location.replace($('#wpcp_shortcode_link_redirect').attr('href'));
2628
- }, 2000);
2629
- }
2630
- });
2631
- }
2632
- } else {
2633
- $('.spf-form-result.spf-form-success').text('No exported json file chosen.').show();
2634
- setTimeout(function () {
2635
- $('.spf-form-result.spf-form-success').hide().text('');
2636
- }, 3000);
2637
- }
2638
- });
2639
-
2640
- })(jQuery, window, document);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/wpcfree-metabox/assets/js/spf.min.js DELETED
@@ -1 +0,0 @@
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 DELETED
@@ -1,63 +0,0 @@
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
- }
61
-
62
- }
63
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/wpcfree-metabox/classes/fields.class.php DELETED
@@ -1,313 +0,0 @@
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;
26
- $this->unique = $unique;
27
- $this->where = $where;
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'] : '';
40
- $unique_id = ( ! empty( $this->unique ) ) ? $this->unique . '[' . $field_id . ']' : $field_id;
41
- $field_name = ( ! empty( $this->field['name'] ) ) ? $this->field['name'] : $unique_id;
42
- $tag_prefix = ( ! empty( $this->field['tag_prefix'] ) ) ? $this->field['tag_prefix'] : '';
43
-
44
- if ( ! empty( $tag_prefix ) ) {
45
- $nested_name = str_replace( '[', '[' . $tag_prefix, $nested_name );
46
- }
47
-
48
- return $field_name . $nested_name;
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'] : '';
61
- $attributes = ( ! empty( $this->field['attributes'] ) ) ? $this->field['attributes'] : array();
62
-
63
- if ( ! empty( $field_id ) ) {
64
- $attributes['data-depend-id'] = $field_id;
65
- }
66
-
67
- if ( ! empty( $this->field['placeholder'] ) ) {
68
- $attributes['placeholder'] = $this->field['placeholder'];
69
- }
70
-
71
- $attributes = wp_parse_args( $attributes, $custom_atts );
72
-
73
- $atts = '';
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
- }
84
-
85
- return $atts;
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>' : '';
106
- $output .= ( ! empty( $this->field['after'] ) ) ? $this->field['after'] : '';
107
- $output .= ( ! empty( $this->field['help'] ) ) ? '<span class="spf-help"><span class="spf-help-text">' . $this->field['help'] . '</span><span class="fa fa-question-circle"></span></span>' : '';
108
- $output .= ( ! empty( $this->field['_error'] ) ) ? '<p class="spf-text-error">' . $this->field['_error'] . '</p>' : '';
109
-
110
- return $output;
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();
123
- $query_args = ( ! empty( $this->field['query_args'] ) ) ? $this->field['query_args'] : array();
124
-
125
- switch ( $type ) {
126
-
127
- case 'page':
128
- case 'pages':
129
- $pages = get_pages( $query_args );
130
-
131
- if ( ! is_wp_error( $pages ) && ! empty( $pages ) ) {
132
- foreach ( $pages as $page ) {
133
- $options[ $page->ID ] = $page->post_title;
134
- }
135
- }
136
-
137
- break;
138
-
139
- case 'post':
140
- case 'posts':
141
- $posts = get_posts( $query_args );
142
-
143
- if ( ! is_wp_error( $posts ) && ! empty( $posts ) ) {
144
- foreach ( $posts as $post ) {
145
- $options[ $post->ID ] = $post->post_title;
146
- }
147
- }
148
-
149
- break;
150
- case 'sp_wp_carousel':
151
- $lcp_get_specific = array(
152
- 'post_type' => 'sp_wp_carousel',
153
- );
154
- $query_args = array_merge( $query_args, $lcp_get_specific );
155
- $all_posts = get_posts( $query_args );
156
-
157
- if ( ! is_wp_error( $all_posts ) && ! empty( $all_posts ) ) {
158
- foreach ( $all_posts as $post_obj ) {
159
- $options[ $post_obj->ID ] = isset( $post_obj->post_title ) && ! empty( $post_obj->post_title ) ? $post_obj->post_title : 'Untitled';
160
- }
161
- }
162
- wp_reset_postdata();
163
- break;
164
-
165
- case 'taxonomies':
166
- case 'taxonomy':
167
- global $post;
168
- $saved_meta = get_post_meta( $post->ID, 'sp_wpcp_upload_options', true );
169
- if ( isset( $saved_meta['wpcp_post_type'] ) && ! empty( $saved_meta['wpcp_post_type'] ) ) {
170
- $taxonomy_names = get_object_taxonomies( $saved_meta['wpcp_post_type'], 'names' );
171
- if ( ! is_wp_error( $taxonomy_names ) && ! empty( $taxonomy_names ) ) {
172
- foreach ( $taxonomy_names as $taxonomy => $label ) {
173
- $options[ $label ] = $label;
174
- }
175
- }
176
- } else {
177
- $post_types = get_post_types( array( 'public' => true ) );
178
- $post_type_list = array();
179
- $post_type_number = 1;
180
- foreach ( $post_types as $post_type => $label ) {
181
- $post_type_list[ $post_type_number++ ] = $label;
182
- }
183
- $taxonomy_names = get_object_taxonomies( $post_type_list['1'], 'names' );
184
- foreach ( $taxonomy_names as $taxonomy => $label ) {
185
- $options[ $label ] = $label;
186
- }
187
- }
188
-
189
- break;
190
-
191
- case 'terms':
192
- case 'term':
193
- global $post;
194
- $saved_meta = get_post_meta( $post->ID, 'sp_wpcp_upload_options', true );
195
- if ( isset( $saved_meta['wpcp_post_taxonomy'] ) && ! empty( $saved_meta['wpcp_post_taxonomy'] ) ) {
196
- $terms = get_terms( $saved_meta['wpcp_post_taxonomy'] );
197
- foreach ( $terms as $key => $value ) {
198
- $options[ $value->term_id ] = $value->name;
199
- }
200
- } else {
201
- $post_types = get_post_types( array( 'public' => true ) );
202
- $post_type_list = array();
203
- $post_type_number = 1;
204
- foreach ( $post_types as $post_type => $label ) {
205
- $post_type_list[ $post_type_number++ ] = $label;
206
- }
207
- $taxonomy_names = get_object_taxonomies( $post_type_list['1'], 'names' );
208
- $taxonomy_number = 1;
209
- foreach ( $taxonomy_names as $taxonomy => $label ) {
210
- $taxonomy_terms[ $taxonomy_number++ ] = $label;
211
- }
212
- $terms = get_terms( $taxonomy_terms['1'] );
213
- foreach ( $terms as $key => $value ) {
214
- $options[ $value->term_id ] = $value->name;
215
- }
216
- }
217
-
218
- break;
219
-
220
- case 'category':
221
- case 'categories':
222
- $categories = get_categories( $query_args );
223
-
224
- if ( ! is_wp_error( $categories ) && ! empty( $categories ) && ! isset( $categories['errors'] ) ) {
225
- foreach ( $categories as $category ) {
226
- $options[ $category->term_id ] = $category->name;
227
- }
228
- }
229
-
230
- break;
231
-
232
- case 'tag':
233
- case 'tags':
234
- $taxonomies = ( isset( $query_args['taxonomies'] ) ) ? $query_args['taxonomies'] : 'post_tag';
235
- $tags = get_terms( $taxonomies, $query_args );
236
-
237
- if ( ! is_wp_error( $tags ) && ! empty( $tags ) ) {
238
- foreach ( $tags as $tag ) {
239
- $options[ $tag->term_id ] = $tag->name;
240
- }
241
- }
242
-
243
- break;
244
-
245
- case 'menu':
246
- case 'menus':
247
- $menus = wp_get_nav_menus( $query_args );
248
-
249
- if ( ! is_wp_error( $menus ) && ! empty( $menus ) ) {
250
- foreach ( $menus as $menu ) {
251
- $options[ $menu->term_id ] = $menu->name;
252
- }
253
- }
254
-
255
- break;
256
-
257
- case 'post_type':
258
- case 'post_types':
259
- $post_types = get_post_types(
260
- array(
261
- 'show_in_nav_menus' => true,
262
- )
263
- );
264
-
265
- if ( ! is_wp_error( $post_types ) && ! empty( $post_types ) ) {
266
- foreach ( $post_types as $post_type ) {
267
- $options[ $post_type ] = ucfirst( $post_type );
268
- }
269
- }
270
-
271
- break;
272
-
273
- case 'sidebar':
274
- case 'sidebars':
275
- global $wp_registered_sidebars;
276
-
277
- if ( ! empty( $wp_registered_sidebars ) ) {
278
- foreach ( $wp_registered_sidebars as $sidebar ) {
279
- $options[ $sidebar['id'] ] = $sidebar['name'];
280
- }
281
- }
282
-
283
- break;
284
-
285
- case 'role':
286
- case 'roles':
287
- global $wp_roles;
288
-
289
- if ( is_object( $wp_roles ) ) {
290
- $roles = $wp_roles->get_names();
291
- if ( ! empty( $wp_roles ) ) {
292
- foreach ( $roles as $key => $value ) {
293
- $options[ $key ] = $value;
294
- }
295
- }
296
- }
297
-
298
- break;
299
-
300
- default:
301
- if ( function_exists( $type ) ) {
302
- $options = call_user_func( $type, $this->value, $this->field );
303
- }
304
- break;
305
-
306
- }
307
-
308
- return $options;
309
-
310
- }
311
-
312
- }
313
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/wpcfree-metabox/classes/metabox.class.php DELETED
@@ -1,457 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access directly.
3
- /**
4
- *
5
- * Metabox Class
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
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',
52
- 'context' => 'advanced',
53
- 'priority' => 'default',
54
- 'exclude_post_types' => array(),
55
- 'page_templates' => '',
56
- 'post_formats' => '',
57
- 'show_restore' => false,
58
- 'enqueue_webfont' => true,
59
- 'async_webfont' => false,
60
- 'output_css' => true,
61
- 'theme' => 'dark',
62
- 'class' => '',
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;
76
- $this->args = apply_filters( "spf_{$this->unique}_args", wp_parse_args( $params['args'], $this->args ), $this );
77
- $this->sections = apply_filters( "spf_{$this->unique}_sections", $params['sections'], $this );
78
- $this->post_type = ( is_array( $this->args['post_type'] ) ) ? $this->args['post_type'] : array_filter( (array) $this->args['post_type'] );
79
- $this->post_formats = ( is_array( $this->args['post_formats'] ) ) ? $this->args['post_formats'] : array_filter( (array) $this->args['post_formats'] );
80
- $this->page_templates = ( is_array( $this->args['page_templates'] ) ) ? $this->args['page_templates'] : array_filter( (array) $this->args['page_templates'] );
81
- $this->pre_fields = $this->pre_fields( $this->sections );
82
-
83
- add_action( 'add_meta_boxes', array( &$this, 'add_meta_box' ) );
84
- add_action( 'save_post', array( &$this, 'save_meta_box' ), 10, 2 );
85
-
86
- if ( ! empty( $this->page_templates ) || ! empty( $this->post_formats ) ) {
87
- foreach ( $this->post_type as $post_type ) {
88
- add_filter( 'postbox_classes_' . $post_type . '_' . $this->unique, array( &$this, 'add_metabox_classes' ) );
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();
117
-
118
- foreach ( $sections as $key => $section ) {
119
- if ( ! empty( $section['fields'] ) ) {
120
- foreach ( $section['fields'] as $field ) {
121
- $result[] = $field;
122
- }
123
- }
124
- }
125
-
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;
138
-
139
- if ( ! empty( $this->post_formats ) ) {
140
-
141
- $saved_post_format = ( is_object( $post ) ) ? get_post_format( $post ) : false;
142
- $saved_post_format = ( ! empty( $saved_post_format ) ) ? $saved_post_format : 'default';
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
- }
150
-
151
- foreach ( $this->post_formats as $format ) {
152
- $classes[] = 'spf-post-format-' . $format;
153
- }
154
-
155
- if ( ! in_array( $saved_post_format, $this->post_formats ) ) {
156
- $classes[] = 'spf-hide';
157
- } else {
158
- $classes[] = 'spf-show';
159
- }
160
- }
161
-
162
- if ( ! empty( $this->page_templates ) ) {
163
-
164
- $saved_template = ( is_object( $post ) && ! empty( $post->page_template ) ) ? $post->page_template : 'default';
165
-
166
- $classes[] = 'spf-page-templates';
167
-
168
- foreach ( $this->page_templates as $template ) {
169
- $classes[] = 'spf-page-' . preg_replace( '/[^a-zA-Z0-9]+/', '-', strtolower( $template ) );
170
- }
171
-
172
- if ( ! in_array( $saved_template, $this->page_templates ) ) {
173
- $classes[] = 'spf-hide';
174
- } else {
175
- $classes[] = 'spf-show';
176
- }
177
- }
178
-
179
- return $classes;
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'] ) ) {
192
- add_meta_box( $this->unique, $this->args['title'], array( &$this, 'add_meta_box_content' ), $this->post_type, $this->args['context'], $this->args['priority'], $this->args );
193
- }
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'] ] : '';
206
- $default = ( isset( $field['default'] ) ) ? $field['default'] : $default;
207
-
208
- return $default;
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;
221
-
222
- $value = '';
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 {
230
- $meta = get_post_meta( $post->ID, $this->unique, true );
231
- $value = ( isset( $meta[ $field['id'] ] ) ) ? $meta[ $field['id'] ] : null;
232
- }
233
-
234
- $default = $this->get_default( $field );
235
- $value = ( isset( $value ) ) ? $value : $default;
236
-
237
- }
238
-
239
- return $value;
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();
258
-
259
- if ( is_object( $post ) && ! empty( $errors ) ) {
260
- delete_post_meta( $post->ID, '_spf_errors' );
261
- }
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;
275
- foreach ( $this->sections as $section ) {
276
-
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
- }
284
- echo '</ul>';
285
-
286
- echo '</div>';
287
-
288
- }
289
-
290
- echo '<div class="spf-content">';
291
-
292
- echo '<div class="spf-sections">';
293
-
294
- $section_key = 1;
295
-
296
- foreach ( $this->sections as $section ) {
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
-
309
- foreach ( $section['fields'] as $field ) {
310
-
311
- if ( ! empty( $field['id'] ) && ! empty( $errors['fields'][ $field['id'] ] ) ) {
312
- $field['_error'] = $errors['fields'][ $field['id'] ];
313
- }
314
-
315
- SP_WPCF::field( $field, $this->get_meta_value( $field ), $this->unique, 'metabox' );
316
-
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
-
324
- echo '</div>';
325
-
326
- $section_key++;
327
- }
328
-
329
- echo '</div>';
330
-
331
- echo '<div class="clear"></div>';
332
-
333
- if ( ! empty( $this->args['show_restore'] ) ) {
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>';
341
- echo '</div>';
342
-
343
- }
344
-
345
- echo '</div>';
346
-
347
- echo ( $has_nav ) ? '<div class="spf-nav-background"></div>' : '';
348
-
349
- echo '<div class="clear"></div>';
350
-
351
- echo '</div>';
352
-
353
- echo '</div>';
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' ) ) {
367
-
368
- $errors = array();
369
- $request = spf_get_var( $this->unique );
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
-
382
- if ( ! empty( $section['fields'] ) ) {
383
-
384
- foreach ( $section['fields'] as $field ) {
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
-
403
- $errors['sections'][ $section_key ] = true;
404
- $errors['fields'][ $field['id'] ] = $has_validated;
405
- $request[ $field['id'] ] = $this->get_meta_value( $field );
406
-
407
- }
408
- }
409
-
410
- // Auto sanitize.
411
- if ( ! isset( $request[ $field['id'] ] ) || is_null( $request[ $field['id'] ] ) ) {
412
- $request[ $field['id'] ] = '';
413
- }
414
- }
415
- }
416
- }
417
-
418
- $section_key++;
419
- }
420
-
421
- $request = apply_filters( "spf_{$this->unique}_save", $request, $post_id, $this );
422
-
423
- do_action( "spf_{$this->unique}_save_before", $request, $post_id, $this );
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
- }
431
- } else {
432
- delete_post_meta( $post_id, $this->unique );
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
- }
440
- } else {
441
- update_post_meta( $post_id, $this->unique, $request );
442
- }
443
-
444
- if ( ! empty( $errors ) ) {
445
- update_post_meta( $post_id, '_spf_errors', $errors );
446
- }
447
- }
448
-
449
- do_action( "spf_{$this->unique}_saved", $request, $post_id, $this );
450
-
451
- do_action( "spf_{$this->unique}_save_after", $request, $post_id, $this );
452
-
453
- }
454
- }
455
- }
456
- }
457
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/wpcfree-metabox/classes/options.class.php DELETED
@@ -1,820 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access directly.
3
- /**
4
- *
5
- * Options Class
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
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' => '',
78
-
79
- // menu settings.
80
- 'menu_title' => '',
81
- 'menu_slug' => '',
82
- 'menu_type' => 'menu',
83
- 'menu_capability' => 'manage_options',
84
- 'menu_icon' => null,
85
- 'menu_position' => null,
86
- 'menu_hidden' => false,
87
- 'menu_parent' => '',
88
-
89
- // menu extras.
90
- 'show_bar_menu' => true,
91
- 'show_sub_menu' => true,
92
- 'show_network_menu' => true,
93
- 'show_in_customizer' => false,
94
-
95
- 'show_search' => true,
96
- 'show_reset_all' => true,
97
- 'show_reset_section' => true,
98
- 'show_footer' => true,
99
- 'show_all_options' => true,
100
- 'sticky_header' => true,
101
- 'save_defaults' => true,
102
- 'ajax_save' => true,
103
-
104
- // admin bar menu settings.
105
- 'admin_bar_menu_icon' => '',
106
- 'admin_bar_menu_priority' => 80,
107
-
108
- // footer.
109
- 'footer_text' => '',
110
- 'footer_after' => '',
111
- 'footer_credit' => '',
112
-
113
- // database model.
114
- 'database' => '', // options, transient, theme_mod, network.
115
- 'transient_time' => 0,
116
-
117
- // contextual help.
118
- 'contextual_help' => array(),
119
- 'contextual_help_sidebar' => '',
120
-
121
- // typography options.
122
- 'enqueue_webfont' => true,
123
- 'async_webfont' => false,
124
-
125
- // others.
126
- 'output_css' => true,
127
-
128
- // theme.
129
- 'theme' => 'dark',
130
-
131
- // external default values.
132
- 'defaults' => array(),
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;
146
- $this->args = apply_filters( "spf_{$this->unique}_args", wp_parse_args( $params['args'], $this->args ), $this );
147
- $this->sections = apply_filters( "spf_{$this->unique}_sections", $params['sections'], $this );
148
-
149
- // run only is admin panel options, avoid performance loss.
150
- $this->pre_tabs = $this->pre_tabs( $this->sections );
151
- $this->pre_fields = $this->pre_fields( $this->sections );
152
- $this->pre_sections = $this->pre_sections( $this->sections );
153
-
154
- $this->get_options();
155
- $this->set_options();
156
- $this->save_defaults();
157
-
158
- add_action( 'admin_menu', array( &$this, 'add_admin_menu' ) );
159
- add_action( 'admin_bar_menu', array( &$this, 'add_admin_bar_menu' ), $this->args['admin_bar_menu_priority'] );
160
- add_action( 'wp_ajax_spf_' . $this->unique . '_ajax_save', array( &$this, 'ajax_save' ) );
161
-
162
- if ( ! empty( $this->args['show_network_menu'] ) ) {
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();
191
- $parents = array();
192
- $count = 100;
193
-
194
- foreach ( $sections as $key => $section ) {
195
- if ( ! empty( $section['parent'] ) ) {
196
- $section['priority'] = ( isset( $section['priority'] ) ) ? $section['priority'] : $count;
197
- $parents[ $section['parent'] ][] = $section;
198
- unset( $sections[ $key ] );
199
- }
200
- $count++;
201
- }
202
-
203
- foreach ( $sections as $key => $section ) {
204
- $section['priority'] = ( isset( $section['priority'] ) ) ? $section['priority'] : $count;
205
- if ( ! empty( $section['id'] ) && ! empty( $parents[ $section['id'] ] ) ) {
206
- $section['subs'] = wp_list_sort( $parents[ $section['id'] ], array( 'priority' => 'ASC' ), 'ASC', true );
207
- }
208
- $result[] = $section;
209
- $count++;
210
- }
211
-
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();
224
-
225
- foreach ( $sections as $key => $section ) {
226
- if ( ! empty( $section['fields'] ) ) {
227
- foreach ( $section['fields'] as $field ) {
228
- $result[] = $field;
229
- }
230
- }
231
- }
232
-
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();
245
-
246
- foreach ( $this->pre_tabs as $tab ) {
247
- if ( ! empty( $tab['subs'] ) ) {
248
- foreach ( $tab['subs'] as $sub ) {
249
- $result[] = $sub;
250
- }
251
- }
252
- if ( empty( $tab['subs'] ) ) {
253
- $result[] = $tab;
254
- }
255
- }
256
-
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'] ) ) {
269
-
270
- global $submenu;
271
-
272
- $menu_slug = $this->args['menu_slug'];
273
- $menu_icon = ( ! empty( $this->args['admin_bar_menu_icon'] ) ) ? '<span class="spf-ab-icon ab-icon ' . $this->args['admin_bar_menu_icon'] . '"></span>' : '';
274
-
275
- $wp_admin_bar->add_node(
276
- array(
277
- 'id' => $menu_slug,
278
- 'title' => $menu_icon . $this->args['menu_title'],
279
- 'href' => ( is_network_admin() ) ? network_admin_url( 'admin.php?page=' . $menu_slug ) : admin_url( 'admin.php?page=' . $menu_slug ),
280
- )
281
- );
282
-
283
- if ( ! empty( $submenu[ $menu_slug ] ) ) {
284
- foreach ( $submenu[ $menu_slug ] as $key => $menu ) {
285
- $wp_admin_bar->add_node(
286
- array(
287
- 'parent' => $menu_slug,
288
- 'id' => $menu_slug . '-' . $key,
289
- 'title' => $menu[0],
290
- 'href' => ( is_network_admin() ) ? network_admin_url( 'admin.php?page=' . $menu[2] ) : admin_url( 'admin.php?page=' . $menu[2] ),
291
- )
292
- );
293
- }
294
- }
295
-
296
- if ( ! empty( $this->args['show_network_menu'] ) ) {
297
- $wp_admin_bar->add_node(
298
- array(
299
- 'parent' => 'network-admin',
300
- 'id' => $menu_slug . '-network-admin',
301
- 'title' => $menu_icon . $this->args['menu_title'],
302
- 'href' => network_admin_url( 'admin.php?page=' . $menu_slug ),
303
- )
304
- );
305
- }
306
- }
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
-
325
- wp_send_json_success(
326
- array(
327
- 'success' => true,
328
- 'notice' => $this->notice,
329
- 'errors' => $this->errors,
330
- )
331
- );
332
-
333
- }
334
- }
335
-
336
- wp_send_json_error(
337
- array(
338
- 'success' => false,
339
- 'error' => esc_html__(
340
- 'Error while saving.',
341
- 'wp-carousel-free'
342
- ),
343
- )
344
- );
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'] ] : '';
358
- $default = ( isset( $field['default'] ) ) ? $field['default'] : $default;
359
- $default = ( isset( $options[ $field['id'] ] ) ) ? $options[ $field['id'] ] : $default;
360
-
361
- return $default;
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;
373
-
374
- foreach ( $this->pre_fields as $field ) {
375
- if ( ! empty( $field['id'] ) ) {
376
- $this->options[ $field['id'] ] = $this->get_default( $field, $this->options );
377
- }
378
- }
379
-
380
- if ( $this->args['save_defaults'] && empty( $tmp_options ) ) {
381
- $this->save_options( $this->options );
382
- }
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' ) ) {
394
-
395
- $request = spf_get_var( $this->unique, array() );
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 );
403
- $request = ( is_array( $import_data ) ) ? $import_data : array();
404
-
405
- $this->notice = esc_html__( 'Success. Imported backup options.', 'wp-carousel-free' );
406
-
407
- } elseif ( ! empty( $transient['reset'] ) ) {
408
-
409
- foreach ( $this->pre_fields as $field ) {
410
- if ( ! empty( $field['id'] ) ) {
411
- $request[ $field['id'] ] = $this->get_default( $field );
412
- }
413
- }
414
-
415
- $this->notice = esc_html__( 'Default options restored.', 'wp-carousel-free' );
416
-
417
- } elseif ( ! empty( $transient['reset_section'] ) && ! empty( $section_id ) ) {
418
-
419
- if ( ! empty( $this->pre_sections[ $section_id - 1 ]['fields'] ) ) {
420
-
421
- foreach ( $this->pre_sections[ $section_id - 1 ]['fields'] as $field ) {
422
- if ( ! empty( $field['id'] ) ) {
423
- $request[ $field['id'] ] = $this->get_default( $field );
424
- }
425
- }
426
- }
427
-
428
- $this->notice = esc_html__( 'Default options restored for only this section.', 'wp-carousel-free' );
429
-
430
- } else {
431
-
432
- // Sanitize and validate.
433
- foreach ( $this->pre_fields as $field ) {
434
-
435
- if ( ! empty( $field['id'] ) ) {
436
-
437
- // sanitize.
438
- if ( ! empty( $field['sanitize'] ) ) {
439
-
440
- $sanitize = $field['sanitize'];
441
- $value_sanitize = isset( $request[ $field['id'] ] ) ? $request[ $field['id'] ] : '';
442
- $request[ $field['id'] ] = call_user_func( $sanitize, $value_sanitize );
443
-
444
- }
445
-
446
- // validate.
447
- if ( ! empty( $field['validate'] ) ) {
448
-
449
- $value_validate = isset( $request[ $field['id'] ] ) ? $request[ $field['id'] ] : '';
450
- $has_validated = call_user_func( $field['validate'], $value_validate );
451
-
452
- if ( ! empty( $has_validated ) ) {
453
- $request[ $field['id'] ] = ( isset( $this->options[ $field['id'] ] ) ) ? $this->options[ $field['id'] ] : '';
454
- $this->errors[ $field['id'] ] = $has_validated;
455
- }
456
- }
457
-
458
- // auto sanitize.
459
- if ( ! isset( $request[ $field['id'] ] ) || is_null( $request[ $field['id'] ] ) ) {
460
- $request[ $field['id'] ] = '';
461
- }
462
- }
463
- }
464
- }
465
-
466
- // ignore nonce requests.
467
- if ( isset( $request['_nonce'] ) ) {
468
- unset( $request['_nonce'] ); }
469
-
470
- $request = wp_unslash( $request );
471
-
472
- $request = apply_filters( "spf_{$this->unique}_save", $request, $this );
473
-
474
- do_action( "spf_{$this->unique}_save_before", $request, $this );
475
-
476
- $this->options = $request;
477
-
478
- $this->save_options( $request );
479
-
480
- do_action( "spf_{$this->unique}_save_after", $request, $this );
481
-
482
- if ( empty( $this->notice ) ) {
483
- $this->notice = esc_html__( 'Settings saved.', 'wp-carousel-free' );
484
- }
485
- }
486
-
487
- return true;
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 );
507
- }
508
-
509
- do_action( "spf_{$this->unique}_saved", $request, $this );
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 );
528
- }
529
-
530
- if ( empty( $this->options ) ) {
531
- $this->options = array();
532
- }
533
-
534
- return $this->options;
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
-
551
- } else {
552
-
553
- $menu_page = call_user_func( 'add_menu_page', $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'add_options_html' ), $menu_icon, $menu_position );
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
-
561
- call_user_func( 'add_submenu_page', $menu_slug, $section['title'], $section['title'], $menu_capability, $menu_slug . '#tab=' . $tab_key, '__return_null' );
562
-
563
- if ( ! empty( $section['subs'] ) ) {
564
- $tab_key += ( count( $section['subs'] ) - 1 );
565
- }
566
-
567
- $tab_key++;
568
-
569
- }
570
-
571
- remove_submenu_page( $menu_slug, $menu_slug );
572
-
573
- }
574
-
575
- if ( ! empty( $menu_hidden ) ) {
576
- remove_menu_page( $menu_slug );
577
- }
578
- }
579
-
580
- add_action( 'load-' . $menu_page, array( &$this, 'add_page_on_load' ) );
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'] ) ) {
592
-
593
- $screen = get_current_screen();
594
-
595
- foreach ( $this->args['contextual_help'] as $tab ) {
596
- $screen->add_help_tab( $tab );
597
- }
598
-
599
- if ( ! empty( $this->args['contextual_help_sidebar'] ) ) {
600
- $screen->set_help_sidebar( $this->args['contextual_help_sidebar'] );
601
- }
602
- }
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'] ) {
616
-
617
- if ( ! empty( $sections['fields'] ) ) {
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
- }
625
- }
626
-
627
- if ( ! empty( $sections['subs'] ) ) {
628
- foreach ( $sections['subs'] as $sub ) {
629
- $err = $this->error_check( $sub, $err );
630
- }
631
- }
632
-
633
- if ( ! empty( $sections['id'] ) && array_key_exists( $sections['id'], $this->errors ) ) {
634
- $err = $this->errors[ $sections['id'] ];
635
- }
636
- }
637
-
638
- return $err;
639
- }
640
-
641
- /**
642
- * Option page html output.
643
- *
644
- * @return void
645
- */
646
- public function add_options_html() {
647
-
648
- $has_nav = ( count( $this->pre_tabs ) > 1 ) ? true : false;
649
- $show_buttons = isset( $this->args['show_buttons'] ) ? $this->args['show_buttons'] : true;
650
- $show_all = ( ! $has_nav ) ? ' spf-show-all' : '';
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>';
670
-
671
- echo '<div class="spf-container">';
672
-
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
-
689
- echo '<div class="spf-header-right">';
690
-
691
- echo ( $has_nav && $this->args['show_all_options'] ) ? '<div class="spf-expand-all" title="' . esc_html__( 'show all options', 'wp-carousel-free' ) . '"><i class="fa fa-outdent"></i></div>' : '';
692
-
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>';
700
- }
701
- echo '</div>';
702
-
703
- echo '<div class="clear"></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">';
711
-
712
- echo '<ul>';
713
-
714
- $tab_key = 1;
715
-
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
-
729
- foreach ( $tab['subs'] as $sub ) {
730
-
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
- }
738
-
739
- echo '</ul>';
740
-
741
- echo '</li>';
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
- }
749
- }
750
-
751
- echo '</ul>';
752
-
753
- echo '</div>';
754
-
755
- }
756
-
757
- echo '<div class="spf-content">';
758
-
759
- echo '<div class="spf-sections">';
760
-
761
- $section_key = 1;
762
-
763
- foreach ( $this->pre_sections as $section ) {
764
-
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
-
774
- foreach ( $section['fields'] as $field ) {
775
-
776
- $is_field_error = $this->error_check( $field );
777
-
778
- if ( ! empty( $is_field_error ) ) {
779
- $field['_error'] = $is_field_error;
780
- }
781
-
782
- $value = ( ! empty( $field['id'] ) && isset( $this->options[ $field['id'] ] ) ) ? $this->options[ $field['id'] ] : '';
783
-
784
- SP_WPCF::field( $field, $value, $this->unique, 'options' );
785
-
786
- }
787
- } else {
788
-
789
- echo '<div class="spf-no-option spf-text-muted">' . esc_html__( 'No option provided by developer.', 'wp-carousel-free' ) . '</div>';
790
-
791
- }
792
-
793
- echo '</div>';
794
-
795
- $section_key++;
796
- }
797
-
798
- echo '</div>';
799
-
800
- echo '<div class="clear"></div>';
801
-
802
- echo '</div>';
803
-
804
- echo '<div class="spf-nav-background"></div>';
805
-
806
- echo '</div>';
807
-
808
- echo '</form>';
809
-
810
- echo '</div>';
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
-
818
- }
819
- }
820
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/wpcfree-metabox/classes/setup.class.php DELETED
@@ -1,475 +0,0 @@
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.
79
- do_action( 'spf_init' );
80
-
81
- // set constants.
82
- self::constants();
83
-
84
- // include files.
85
- self::includes();
86
-
87
- add_action( 'after_setup_theme', array( 'SP_WPCF', 'setup' ) );
88
- add_action( 'init', array( 'SP_WPCF', 'setup' ) );
89
- add_action( 'switch_theme', array( 'SP_WPCF', 'setup' ) );
90
- add_action( 'admin_enqueue_scripts', array( 'SP_WPCF', 'add_admin_enqueue_scripts' ), 20 );
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'] ) ) {
103
- foreach ( self::$args['options'] as $key => $value ) {
104
- if ( ! empty( self::$args['sections'][ $key ] ) && ! isset( self::$inited[ $key ] ) ) {
105
-
106
- $params['args'] = $value;
107
- $params['sections'] = self::$args['sections'][ $key ];
108
- self::$inited[ $key ] = true;
109
-
110
- SP_WPCF_Options::instance( $key, $params );
111
-
112
- if ( ! empty( $value['show_in_customizer'] ) ) {
113
- self::$args['customize_options'][ $key ] = ( is_array( $value['show_in_customizer'] ) ) ? $value['show_in_customizer'] : $value;
114
- }
115
- }
116
- }
117
- }
118
-
119
- // setup metaboxes.
120
- $params = array();
121
- if ( ! empty( self::$args['metaboxes'] ) ) {
122
- foreach ( self::$args['metaboxes'] as $key => $value ) {
123
- if ( ! empty( self::$args['sections'][ $key ] ) && ! isset( self::$inited[ $key ] ) ) {
124
-
125
- $params['args'] = $value;
126
- $params['sections'] = self::$args['sections'][ $key ];
127
- self::$inited[ $key ] = true;
128
-
129
- SP_WPCF_Metabox::instance( $key, $params );
130
-
131
- }
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.
181
- $dirname = wp_normalize_path( dirname( dirname( __FILE__ ) ) );
182
- $theme_dir = wp_normalize_path( get_theme_file_path() );
183
- $plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
184
- $located_plugin = ( preg_match( '#' . self::sanitize_dirname( $plugin_dir ) . '#', self::sanitize_dirname( $dirname ) ) ) ? true : false;
185
- $directory = ( $located_plugin ) ? $plugin_dir : $theme_dir;
186
- $directory_uri = ( $located_plugin ) ? WP_PLUGIN_URL : get_theme_file_uri();
187
- $foldername = str_replace( $directory, '', $dirname );
188
-
189
- self::$dir = $dirname;
190
- self::$url = $directory_uri . $foldername;
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' );
205
-
206
- if ( file_exists( get_parent_theme_file_path( $override . '/' . $file ) ) ) {
207
- $path = get_parent_theme_file_path( $override . '/' . $file );
208
- } elseif ( file_exists( get_theme_file_path( $override . '/' . $file ) ) ) {
209
- $path = get_theme_file_path( $override . '/' . $file );
210
- } elseif ( file_exists( self::$dir . '/' . $override . '/' . $file ) ) {
211
- $path = self::$dir . '/' . $override . '/' . $file;
212
- } elseif ( file_exists( self::$dir . '/' . $file ) ) {
213
- $path = self::$dir . '/' . $file;
214
- }
215
-
216
- if ( ! empty( $path ) && ! empty( $file ) && $load ) {
217
-
218
- global $wp_query;
219
-
220
- if ( is_object( $wp_query ) && function_exists( 'load_template' ) ) {
221
-
222
- load_template( $path, true );
223
-
224
- } else {
225
-
226
- require_once $path;
227
-
228
- }
229
- } else {
230
-
231
- return self::$dir . '/' . $file;
232
-
233
- }
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' );
280
-
281
- // includes free version classes.
282
- self::include_plugin_file( 'classes/abstract.class.php' );
283
- self::include_plugin_file( 'classes/fields.class.php' );
284
- self::include_plugin_file( 'classes/options.class.php' );
285
-
286
- // includes premium version classes.
287
- if ( self::$premium ) {
288
- self::include_plugin_file( 'classes/metabox.class.php' );
289
-
290
- }
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'] ) ) {
315
-
316
- foreach ( $sections['fields'] as $field ) {
317
-
318
- if ( ! empty( $field['fields'] ) ) {
319
- self::set_used_fields( $field );
320
- }
321
-
322
- if ( ! empty( $field['type'] ) ) {
323
- self::$fields[ $field['type'] ] = $field;
324
- }
325
- }
326
- }
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
-
362
- wp_localize_script(
363
- 'spf',
364
- 'spf_vars',
365
- array(
366
- 'color_palette' => apply_filters( 'spf_color_palette', array() ),
367
- 'i18n' => array(
368
- 'confirm' => esc_html__( 'Are you sure?', 'wp-carousel-free' ),
369
- 'reset_notification' => esc_html__( 'Restoring options.', 'wp-carousel-free' ),
370
- 'import_notification' => esc_html__( 'Importing options.', 'wp-carousel-free' ),
371
- ),
372
- )
373
- );
374
-
375
- // load admin enqueue scripts and styles.
376
- $enqueued = array();
377
-
378
- if ( ! empty( self::$fields ) ) {
379
- foreach ( self::$fields as $field ) {
380
- if ( ! empty( $field['type'] ) ) {
381
- $classname = 'SP_WPCF_Field_' . $field['type'];
382
- self::maybe_include_field( $field['type'] );
383
- if ( class_exists( $classname ) && method_exists( $classname, 'enqueue' ) ) {
384
- $instance = new $classname( $field );
385
- if ( method_exists( $classname, 'enqueue' ) ) {
386
- $instance->enqueue();
387
- }
388
- unset( $instance );
389
- }
390
- }
391
- }
392
- }
393
-
394
- do_action( 'spf_enqueue' );
395
- } // Check screen ID.
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'];
415
-
416
- $field = array();
417
- $field['content'] = sprintf( esc_html__( 'Ooops! This field type (%s) can not be used here, yet.', 'wp-carousel-free' ), '<strong>' . $field_type . '</strong>' );
418
- $field['type'] = 'notice';
419
- $field['style'] = 'danger';
420
-
421
- }
422
-
423
- $depend = '';
424
- $hidden = '';
425
- $unique = ( ! empty( $unique ) ) ? $unique : '';
426
- $class = ( ! empty( $field['class'] ) ) ? ' ' . $field['class'] : '';
427
- $is_pseudo = ( ! empty( $field['pseudo'] ) ) ? ' spf-pseudo-field' : '';
428
- $field_type = ( ! empty( $field['type'] ) ) ? $field['type'] : '';
429
-
430
- if ( ! empty( $field['dependency'] ) ) {
431
- $hidden = ' hidden';
432
- $depend .= ' data-controller="' . $field['dependency'][0] . '"';
433
- $depend .= ' data-condition="' . $field['dependency'][1] . '"';
434
- $depend .= ' data-value="' . $field['dependency'][2] . '"';
435
- $depend .= ( ! empty( $field['dependency'][3] ) ) ? ' data-depend-global="true"' : '';
436
- }
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">' : '';
448
-
449
- $value = ( ! isset( $value ) && isset( $field['default'] ) ) ? $field['default'] : $value;
450
- $value = ( isset( $field['value'] ) ) ? $field['value'] : $value;
451
-
452
- self::maybe_include_field( $field_type );
453
-
454
- $classname = 'SP_WPCF_Field_' . $field_type;
455
-
456
- if ( class_exists( $classname ) ) {
457
- $instance = new $classname( $field, $value, $unique, $where, $parent );
458
- $instance->render();
459
- } else {
460
- echo '<p>' . esc_html__( 'This field class is not available!', 'wp-carousel-free' ) . '</p>';
461
- }
462
- } else {
463
- echo '<p>' . esc_html__( 'This type is not found!', 'wp-carousel-free' ) . '</p>';
464
- }
465
-
466
- echo ( ! empty( $field['title'] ) ) ? '</div>' : '';
467
- echo '<div class="clear"></div>';
468
- echo '</div>';
469
-
470
- }
471
-
472
- }
473
-
474
- SP_WPCF::init();
475
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/wpcfree-metabox/classes/widgets.class.php DELETED
@@ -1,164 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access directly.
3
- /**
4
- *
5
- * Widgets Class
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
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' => '',
29
- 'width' => '',
30
- 'defaults' => array(),
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();
44
- $control_ops = array();
45
-
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
- }
58
-
59
- if ( ! empty( $this->args['classname'] ) ) {
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
-
67
- parent::__construct( $this->unique, $this->args['title'], $widget_ops, $control_ops );
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'] ] : '';
103
- $default = ( isset( $field['default'] ) ) ? $field['default'] : $default;
104
- $default = ( isset( $options[ $field['id'] ] ) ) ? $options[ $field['id'] ] : $default;
105
-
106
- return $default;
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'] ) ) {
119
-
120
- echo '<div class="spf spf-widgets spf-fields">';
121
-
122
- foreach ( $this->args['fields'] as $field ) {
123
-
124
- $field_value = '';
125
- $field_unique = '';
126
-
127
- if ( ! empty( $field['id'] ) ) {
128
-
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
- }
136
-
137
- SP_WPCF::field( $field, $field_value, $field_unique );
138
-
139
- }
140
-
141
- echo '</div>';
142
-
143
- }
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 );
157
-
158
- do_action( "spf_{$this->unique}_save_before", $new_instance, $this->args, $this );
159
-
160
- return $new_instance;
161
-
162
- }
163
- }
164
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/wpcfree-metabox/fields/button_set/button_set.php DELETED
@@ -1,80 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die;
3
- } // Cannot access directly.
4
- /**
5
- *
6
- * Field: button_set
7
- *
8
- * @since 1.0.0
9
- * @version 1.0.0
10
- */
11
- if ( ! class_exists( 'SP_WPCF_Field_button_set' ) ) {
12
- class SP_WPCF_Field_button_set extends SP_WPCF_Fields {
13
-
14
- /**
15
- * 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(
35
- $this->field,
36
- array(
37
- 'multiple' => false,
38
- 'options' => array(),
39
- )
40
- );
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>';
66
-
67
- }
68
-
69
- echo '</div>';
70
-
71
- }
72
-
73
- echo '<div class="clear"></div>';
74
-
75
- echo wp_kses_post( $this->field_after() );
76
-
77
- }
78
-
79
- }
80
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/wpcfree-metabox/fields/checkbox/checkbox.php DELETED
@@ -1,73 +0,0 @@
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/gallery/gallery.php DELETED
@@ -1,69 +0,0 @@
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
-
50
- $values = explode( ',', $this->value );
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
-
68
- }
69
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/wpcfree-metabox/fields/index.php DELETED
@@ -1 +0,0 @@
1
- <?php /* Silence is golden. */
 
admin/views/wpcfree-metabox/fields/radio/radio.php DELETED
@@ -1,72 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access directly.
3
- /**
4
- *
5
- * Field: radio
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
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(
34
- $this->field,
35
- array(
36
- 'inline' => false,
37
- )
38
- );
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
-
46
- $options = $this->field['options'];
47
- $options = ( is_array( $options ) ) ? $options : array_filter( $this->field_data( $options ) );
48
-
49
- if ( ! empty( $options ) ) {
50
-
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
-
71
- }
72
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/wpcfree-metabox/fields/select/select.php DELETED
@@ -1,99 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access directly.
3
- /**
4
- *
5
- * Field: select
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
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(
34
- $this->field,
35
- array(
36
- 'chosen' => false,
37
- 'multiple' => false,
38
- 'placeholder' => '',
39
- )
40
- );
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
-
48
- $options = ( is_array( $this->field['options'] ) ) ? $this->field['options'] : $this->field_data( $this->field['options'] );
49
- $multiple_name = ( $args['multiple'] ) ? '[]' : '';
50
- $multiple_attr = ( $args['multiple'] ) ? ' multiple="multiple"' : '';
51
- $chosen_rtl = ( is_rtl() ) ? ' chosen-rtl' : '';
52
- $chosen_attr = ( $args['chosen'] ) ? ' class="spf-chosen' . $chosen_rtl . '"' : '';
53
- $placeholder_attr = ( $args['chosen'] && $args['placeholder'] ) ? ' data-placeholder="' . $args['placeholder'] . '"' : '';
54
-
55
- if ( ! empty( $options ) ) {
56
-
57
- echo '<select name="' . $this->field_name( $multiple_name ) . '"' . $multiple_attr . $chosen_attr . $placeholder_attr . $this->field_attributes() . '>';
58
-
59
- if ( $args['placeholder'] && empty( $args['multiple'] ) ) {
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
-
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
-
85
- echo '</select>';
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
-
98
- }
99
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/wpcfree-metabox/fields/selectf/selectf.php CHANGED
File without changes