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

Version Description

  • May 25, 2019 =
  • New: Carousel preloader added.
  • New: Data remove option on uninstall plugin.
  • New: Image width and height attributes added.
  • New: Plugin CSS and JS assets have been minified.
  • Improved: Carousel direction improved for RTL language.
  • Fix: WordPress 5.2.1 compatibility issue.
  • Fix: Border issue for product image.
Download this release

Release Info

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

Code changes from version 2.0.2 to 2.1.0

Files changed (115) hide show
  1. admin/class-wp-carousel-free-admin.php +2 -2
  2. admin/css/wp-carousel-free-admin.css +45 -13
  3. admin/css/wp-carousel-free-admin.min.css +1 -0
  4. admin/js/mce-button.min.js +1 -0
  5. admin/views/help.php +3 -3
  6. admin/views/meta-box/assets/css/sp-custom.css +0 -800
  7. admin/views/meta-box/assets/css/sp-framework-rtl.css +0 -220
  8. admin/views/meta-box/assets/css/sp-framework.css +0 -1850
  9. admin/views/meta-box/assets/css/sp-style.css +0 -113
  10. admin/views/meta-box/assets/images/chosen-sprite.png +0 -0
  11. admin/views/meta-box/assets/js/dependency.js +0 -98
  12. admin/views/meta-box/assets/js/sp-framework.js +0 -645
  13. admin/views/meta-box/assets/js/sp-plugins.js +0 -2405
  14. admin/views/meta-box/assets/js/sp-plugins.min.js +0 -3
  15. admin/views/meta-box/classes/abstract.class.php +0 -23
  16. admin/views/meta-box/classes/framework.class.php +0 -484
  17. admin/views/meta-box/classes/metabox.class.php +0 -296
  18. admin/views/meta-box/classes/options.class.php +0 -522
  19. admin/views/meta-box/config/framework.config.php +0 -76
  20. admin/views/meta-box/config/metabox.config.php +0 -727
  21. admin/views/meta-box/fields/border/border.php +0 -114
  22. admin/views/meta-box/fields/button_set/button_set.php +0 -47
  23. admin/views/meta-box/fields/carousel_type/carousel_type.php +0 -48
  24. admin/views/meta-box/fields/checkbox/checkbox.php +0 -42
  25. admin/views/meta-box/fields/color_picker/color_picker.php +0 -44
  26. admin/views/meta-box/fields/color_set/color_set.php +0 -136
  27. admin/views/meta-box/fields/column/column.php +0 -161
  28. admin/views/meta-box/fields/gallery/gallery.php +0 -58
  29. admin/views/meta-box/fields/image_sizes/image_sizes.php +0 -81
  30. admin/views/meta-box/fields/notice/notice.php +0 -24
  31. admin/views/meta-box/fields/number/number.php +0 -37
  32. admin/views/meta-box/fields/pronotice/pronotice.php +0 -24
  33. admin/views/meta-box/fields/select/select.php +0 -59
  34. admin/views/meta-box/fields/select_typo/select_typo.php +0 -48
  35. admin/views/meta-box/fields/subheading/subheading.php +0 -24
  36. admin/views/meta-box/fields/switcher/switcher.php +0 -25
  37. admin/views/meta-box/fields/textarea/textarea.php +0 -23
  38. admin/views/meta-box/fields/typography_advanced/google-fonts.json +0 -6
  39. admin/views/meta-box/fields/typography_advanced/typography_advanced.php +0 -197
  40. admin/views/meta-box/functions/actions.php +0 -6
  41. admin/views/meta-box/functions/enqueue.php +0 -49
  42. admin/views/meta-box/functions/fallback.php +0 -83
  43. admin/views/meta-box/functions/helpers.php +0 -259
  44. admin/views/meta-box/functions/sanitize.php +0 -132
  45. admin/views/meta-box/functions/validate.php +0 -74
  46. admin/views/meta-box/sp-framework-path.php +0 -381
  47. admin/views/meta-box/sp-framework.php +0 -50
  48. admin/views/metabox-config.php +990 -0
  49. admin/views/option-config.php +129 -0
  50. admin/views/premium.php +1 -1
  51. admin/views/wpcfree-metabox/assets/css/spf-rtl.css +537 -0
  52. admin/views/wpcfree-metabox/assets/css/spf-rtl.min.css +1 -0
  53. admin/views/wpcfree-metabox/assets/css/spf.css +4859 -0
  54. admin/views/wpcfree-metabox/assets/css/spf.min.css +1 -0
  55. admin/views/wpcfree-metabox/assets/images/angle-arrow.png +0 -0
  56. admin/views/wpcfree-metabox/assets/images/bold-arrow.png +0 -0
  57. admin/views/wpcfree-metabox/assets/images/caret-arrow.png +0 -0
  58. admin/views/wpcfree-metabox/assets/images/checkerboard.png +0 -0
  59. admin/views/wpcfree-metabox/assets/images/chevron-arrow.png +0 -0
  60. admin/views/wpcfree-metabox/assets/images/double-arrow.png +0 -0
  61. admin/views/wpcfree-metabox/assets/images/long-arrow.png +0 -0
  62. admin/views/wpcfree-metabox/assets/images/wp-logo.svg +1 -0
  63. admin/views/wpcfree-metabox/assets/images/wp-plugin-logo.svg +1 -0
  64. admin/views/wpcfree-metabox/assets/js/spf-gutenberg-block.js +79 -0
  65. admin/views/wpcfree-metabox/assets/js/spf-gutenberg-block.min.js +1 -0
  66. admin/views/wpcfree-metabox/assets/js/spf-plugins.js +1744 -0
  67. admin/views/wpcfree-metabox/assets/js/spf-plugins.min.js +1 -0
  68. admin/views/wpcfree-metabox/assets/js/spf.js +2504 -0
  69. admin/views/wpcfree-metabox/assets/js/spf.min.js +1 -0
  70. admin/views/wpcfree-metabox/classes/abstract.class.php +115 -0
  71. admin/views/wpcfree-metabox/classes/fields.class.php +261 -0
  72. admin/views/wpcfree-metabox/classes/metabox.class.php +389 -0
  73. admin/views/wpcfree-metabox/classes/options.class.php +713 -0
  74. admin/views/wpcfree-metabox/classes/setup.class.php +382 -0
  75. admin/views/wpcfree-metabox/classes/widgets.class.php +118 -0
  76. admin/views/wpcfree-metabox/fields/backup/backup.php +42 -0
  77. admin/views/wpcfree-metabox/fields/border/border.php +178 -0
  78. admin/views/wpcfree-metabox/fields/button_set/button_set.php +57 -0
  79. admin/views/wpcfree-metabox/fields/carousel_type/carousel_type.php +79 -0
  80. admin/views/wpcfree-metabox/fields/checkbox/checkbox.php +61 -0
  81. admin/views/wpcfree-metabox/fields/code_editor/code_editor.php +57 -0
  82. admin/views/wpcfree-metabox/fields/color/color.php +52 -0
  83. admin/views/wpcfree-metabox/fields/color_group/color_group.php +44 -0
  84. admin/views/wpcfree-metabox/fields/column/column.php +176 -0
  85. admin/views/wpcfree-metabox/fields/gallery/gallery.php +56 -0
  86. admin/views/wpcfree-metabox/fields/heading/heading.php +26 -0
  87. admin/views/wpcfree-metabox/fields/image_sizes/image_sizes.php +113 -0
  88. admin/views/{meta-box → wpcfree-metabox/fields}/index.php +0 -0
  89. admin/views/wpcfree-metabox/fields/media/media.php +83 -0
  90. admin/views/wpcfree-metabox/fields/notice/notice.php +26 -0
  91. admin/views/wpcfree-metabox/fields/radio/radio.php +59 -0
  92. admin/views/wpcfree-metabox/fields/select/select.php +86 -0
  93. admin/views/wpcfree-metabox/fields/selectf/selectf.php +82 -0
  94. admin/views/wpcfree-metabox/fields/shortcode/shortcode.php +26 -0
  95. admin/views/wpcfree-metabox/fields/spacing/spacing.php +161 -0
  96. admin/views/wpcfree-metabox/fields/spinner/spinner.php +75 -0
  97. admin/views/wpcfree-metabox/fields/subheading/subheading.php +24 -0
  98. admin/views/wpcfree-metabox/fields/switcher/switcher.php +42 -0
  99. admin/views/wpcfree-metabox/fields/switcherf/switcherf.php +39 -0
  100. admin/views/wpcfree-metabox/fields/text/text.php +30 -0
  101. admin/views/wpcfree-metabox/fields/typography/typography.php +578 -0
  102. admin/views/wpcfree-metabox/functions/actions.php +254 -0
  103. admin/views/wpcfree-metabox/functions/customize.php +115 -0
  104. admin/views/wpcfree-metabox/functions/deprecated.php +7 -0
  105. admin/views/wpcfree-metabox/functions/helpers.php +106 -0
  106. admin/views/wpcfree-metabox/functions/sanitize.php +28 -0
  107. admin/views/wpcfree-metabox/functions/validate.php +145 -0
  108. admin/views/wpcfree-metabox/index.php +1 -0
  109. includes/class-wp-carousel-free-shortcode.php +36 -21
  110. languages/wp-carousel-free.pot +699 -408
  111. public/class-wp-carousel-free-public.php +8 -7
  112. public/css/bx_loader.gif +0 -0
  113. public/css/slick.min.css +1 -0
  114. public/css/wp-carousel-free-public.css +4 -10
  115. public/css/wp-carousel-free-public.min.css +1 -1
admin/class-wp-carousel-free-admin.php CHANGED
@@ -70,7 +70,7 @@ class WP_Carousel_Free_Admin {
70
  * @param string $version The version of the plugin.
71
  */
72
  public function __construct( $plugin_name, $version ) {
73
- $this->suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
74
  $this->plugin_name = $plugin_name;
75
  $this->version = $version;
76
  }
@@ -83,7 +83,7 @@ class WP_Carousel_Free_Admin {
83
  */
84
  public function enqueue_admin_styles() {
85
  wp_enqueue_style( 'font-awesome', WPCAROUSELF_URL . 'public/css/font-awesome.min.css', array(), $this->version, 'all' );
86
- wp_enqueue_style( $this->plugin_name . 'admin', WPCAROUSELF_URL . 'admin/css/wp-carousel-free-admin.css', array(), $this->version, 'all' );
87
  }
88
 
89
  /**
70
  * @param string $version The version of the plugin.
71
  */
72
  public function __construct( $plugin_name, $version ) {
73
+ $this->suffix = defined( 'WP_DEBUG' ) && WP_DEBUG ? '' : '.min';
74
  $this->plugin_name = $plugin_name;
75
  $this->version = $version;
76
  }
83
  */
84
  public function enqueue_admin_styles() {
85
  wp_enqueue_style( 'font-awesome', WPCAROUSELF_URL . 'public/css/font-awesome.min.css', array(), $this->version, 'all' );
86
+ wp_enqueue_style( $this->plugin_name . 'admin', WPCAROUSELF_URL . 'admin/css/wp-carousel-free-admin' . $this->suffix . '.css', array(), $this->version, 'all' );
87
  }
88
 
89
  /**
admin/css/wp-carousel-free-admin.css CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  #adminmenu .menu-icon-sp_wp_carousel .wp-menu-image img {
2
  width: 22px;
3
  padding: 7px 0;
@@ -12,9 +15,6 @@
12
 
13
 
14
  /* Help Page */
15
- .sp-wpcp-text-center{
16
- text-align: center;
17
- }
18
  .sp-wpcp-help .wp-badge{
19
  border: none;
20
  background: url(../img/wpcp-icon-256.png) right no-repeat;
@@ -23,18 +23,27 @@
23
  height: auto;
24
  top: -75px;
25
  }
26
- .about-wrap.sp-wpcf-upgrade [class$="-col"] .col+.col{
27
- margin-left: 0;
 
 
 
28
  }
29
- .about-wrap.sp-wpcf-upgrade .about-text{
30
- min-height: 60px;
 
 
31
  }
32
- .about-wrap.sp-wpcf-upgrade hr {
33
- order: 0;
34
- height: 0;
35
- margin: 0;
36
- border-top: 1px solid rgba(0,0,0,.1);
 
 
 
37
  }
 
38
  .sp-wpcf-upgrade .headline-feature.feature-video,
39
  .sp-wpcp-help .headline-feature.feature-video {
40
  position: relative;
@@ -104,6 +113,15 @@
104
  top: 0px;
105
  padding-right: 8px;
106
  }
 
 
 
 
 
 
 
 
 
107
  .sp-wpcf-upgrade .feature-section .sp-wpc-feature{
108
  background-color: #fff;
109
  padding: 20px 20px;
@@ -222,12 +240,26 @@
222
  display: inline-block;
223
  }
224
  /* Responsive CSS */
 
 
 
 
 
 
 
 
 
 
 
225
  @media (max-width: 960px) {
226
  .sp-wpc-help .sp-wpc-upgrade-sticky-footer {
227
  width: calc(100%);
228
  }
229
  }
230
- @media (max-width: 500px) {
 
 
 
231
  .sp-wpcf-upgrade .wp-badge {
232
  background-position-x: center;
233
  }
1
+ .text-center {
2
+ text-align: center;
3
+ }
4
  #adminmenu .menu-icon-sp_wp_carousel .wp-menu-image img {
5
  width: 22px;
6
  padding: 7px 0;
15
 
16
 
17
  /* Help Page */
 
 
 
18
  .sp-wpcp-help .wp-badge{
19
  border: none;
20
  background: url(../img/wpcp-icon-256.png) right no-repeat;
23
  height: auto;
24
  top: -75px;
25
  }
26
+ .about-wrap.sp-wpcp-help [class$="-col"],
27
+ .about-wrap.sp-wpcf-upgrade [class$="-col"] {
28
+ display: flex;
29
+ justify-content: space-between;
30
+ flex-wrap: wrap;
31
  }
32
+ .about-wrap.sp-wpcf-upgrade [class$="-col"] .col,
33
+ .about-wrap.sp-wpcp-help [class$="-col"] .col {
34
+ flex: 1;
35
+ align-self: flex-start;
36
  }
37
+ .about-wrap.sp-wpcp-help .feature-section .col {
38
+ margin-top: 40px;
39
+ }
40
+ .about-wrap.sp-wpcf-upgrade [class$="-col"] .col+.col {
41
+ margin-left: 0;
42
+ }
43
+ .about-wrap.sp-wpcp-help [class$="-col"] .col+.col {
44
+ margin-left: 20px;
45
  }
46
+
47
  .sp-wpcf-upgrade .headline-feature.feature-video,
48
  .sp-wpcp-help .headline-feature.feature-video {
49
  position: relative;
113
  top: 0px;
114
  padding-right: 8px;
115
  }
116
+ .about-wrap.sp-wpcf-upgrade .about-text{
117
+ min-height: 60px;
118
+ }
119
+ .about-wrap.sp-wpcf-upgrade hr {
120
+ order: 0;
121
+ height: 0;
122
+ margin: 0;
123
+ border-top: 1px solid rgba(0,0,0,.1);
124
+ }
125
  .sp-wpcf-upgrade .feature-section .sp-wpc-feature{
126
  background-color: #fff;
127
  padding: 20px 20px;
240
  display: inline-block;
241
  }
242
  /* Responsive CSS */
243
+ @media screen and (max-width: 782px) {
244
+ .about-wrap .three-col .col {
245
+ min-width: 48%!important;
246
+ max-width: 48%!important;
247
+ margin-left: 0!important;
248
+ }
249
+ .about-wrap.sp-wpcp-help .feature-section .col {
250
+ margin-top: 20px;
251
+ }
252
+ }
253
+
254
  @media (max-width: 960px) {
255
  .sp-wpc-help .sp-wpc-upgrade-sticky-footer {
256
  width: calc(100%);
257
  }
258
  }
259
+ @media only screen and (max-width: 500px) {
260
+ .about-wrap .three-col .col {
261
+ min-width: 100%!important;
262
+ }
263
  .sp-wpcf-upgrade .wp-badge {
264
  background-position-x: center;
265
  }
admin/css/wp-carousel-free-admin.min.css ADDED
@@ -0,0 +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}.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}@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}}
admin/js/mce-button.min.js ADDED
@@ -0,0 +1 @@
 
1
+ tinymce.PluginManager.add("sp_wpcp_mce_button",function(editor,url){editor.addButton("sp_wpcp_mce_button",{text:!1,icon:!1,image:url+"/icon32.png",tooltip:"WP Carousel",onclick:function(){editor.windowManager.open({title:"Insert Shortcode",width:400,height:100,body:[{type:"listbox",name:"listboxName",label:"Select Carousel",values:editor.settings.spWPCPCarouselList}],onsubmit:function(e){editor.insertContent('[sp_wpcarousel id="'+e.data.listboxName+'"]')}})}})});
admin/views/help.php CHANGED
@@ -80,7 +80,7 @@ This video will help you get started with the plugin.', 'wp-carousel-free' ) . '
80
 
81
  <div class="feature-section three-col">
82
  <div class="col">
83
- <div class="sp-wpcp-feature sp-wpcp-text-center">
84
  <i class="sp-wpcp-font-icon fa-life-ring"></i>
85
  <h3>' . esc_html__( 'Need any Assistance?', 'wp-carousel-free' ) . '</h3>
86
  <p>' . esc_html__( 'Our Expert Support Team is always ready to help you out promptly.', 'wp-carousel-free' ) . '</p>
@@ -88,7 +88,7 @@ This video will help you get started with the plugin.', 'wp-carousel-free' ) . '
88
  </div>
89
  </div>
90
  <div class="col">
91
- <div class="sp-wpcp-feature sp-wpcp-text-center">
92
  <i class="sp-wpcp-font-icon fa-file-text"></i>
93
  <h3>' . esc_html__( 'Looking for Documentation?', 'wp-carousel-free' ) . '</h3>
94
  <p>' . esc_html__( 'We have detailed documentation on every aspects of WordPress Carousel.', 'wp-carousel-free' ) . '</p>
@@ -96,7 +96,7 @@ This video will help you get started with the plugin.', 'wp-carousel-free' ) . '
96
  </div>
97
  </div>
98
  <div class="col">
99
- <div class="sp-wpcp-feature sp-wpcp-text-center">
100
  <i class="sp-wpcp-font-icon fa-thumbs-up"></i>
101
  <h3>' . esc_html__( 'Like This Plugin?', 'wp-carousel-free' ) . '</h3>
102
  <p>' . esc_html__( 'If you like WordPress Carousel, please leave us a 5 star rating.', 'wp-carousel-free' ) . '</p>
80
 
81
  <div class="feature-section three-col">
82
  <div class="col">
83
+ <div class="sp-wpcp-feature text-center">
84
  <i class="sp-wpcp-font-icon fa-life-ring"></i>
85
  <h3>' . esc_html__( 'Need any Assistance?', 'wp-carousel-free' ) . '</h3>
86
  <p>' . esc_html__( 'Our Expert Support Team is always ready to help you out promptly.', 'wp-carousel-free' ) . '</p>
88
  </div>
89
  </div>
90
  <div class="col">
91
+ <div class="sp-wpcp-feature text-center">
92
  <i class="sp-wpcp-font-icon fa-file-text"></i>
93
  <h3>' . esc_html__( 'Looking for Documentation?', 'wp-carousel-free' ) . '</h3>
94
  <p>' . esc_html__( 'We have detailed documentation on every aspects of WordPress Carousel.', 'wp-carousel-free' ) . '</p>
96
  </div>
97
  </div>
98
  <div class="col">
99
+ <div class="sp-wpcp-feature text-center">
100
  <i class="sp-wpcp-font-icon fa-thumbs-up"></i>
101
  <h3>' . esc_html__( 'Like This Plugin?', 'wp-carousel-free' ) . '</h3>
102
  <p>' . esc_html__( 'If you like WordPress Carousel, please leave us a 5 star rating.', 'wp-carousel-free' ) . '</p>
admin/views/meta-box/assets/css/sp-custom.css DELETED
@@ -1,800 +0,0 @@
1
- /*--------------------------------------------------------
2
- SP_TP_Framework
3
- --------------------------------------------------------*/
4
- .text-center {
5
- text-align: center;
6
- }
7
- .sp-after-text{
8
- padding-left: 5px;
9
- }
10
-
11
- .js #sp_wpcp_upload_options.postbox .handlediv,
12
- .js #sp_wpcp_upload_options.postbox .hndle {
13
- display: none;
14
- }
15
- .sp-wpcp-framework .sp-wpcp-banner{
16
- background-color: #18AFB9;
17
- padding: 24px 28px;
18
- overflow: hidden;
19
- }
20
- .sp-wpcp-framework .sp-wpcp-logo{
21
- float: left;
22
- }
23
- .sp-wpcp-framework .sp-wpcp-logo img{
24
- display: block;
25
- width: 220px;
26
- }
27
- .sp-wpcp-framework .sp-wpcp-short-links{
28
- float: right;
29
- line-height: 28px;
30
- }
31
- .sp-wpcp-framework .sp-wpcp-short-links a{
32
- color: #ffffff;
33
- text-decoration: none;
34
- margin-left: 16px;
35
- font-size: 15px;
36
- font-weight: 500;
37
- }
38
- .sp-wpcp-framework .sp-wpcp-short-links a i.fa{
39
- margin-right: 7px;
40
- }
41
-
42
-
43
- #sp_wpcp_shortcode_options.postbox {
44
- border: 1px solid #dddddd;
45
- -webkit-box-shadow: none;
46
- -moz-box-shadow: none;
47
- box-shadow: none;
48
- }
49
- #sp_wpcp_upload_options .wpcpro_shortcode,
50
- #sp_wpcp_upload_options .wpcpro_shortcode_divider,
51
- #sp_wpcp_shortcode_options .sp-wpcp-banner,
52
- #sp_wpcp_shortcode_options > .handlediv,
53
- #sp_wpcp_shortcode_options > .hndle.ui-sortable-handle {
54
- display: none;
55
- }
56
-
57
-
58
- .wpcpro_shortcode .wpcpro-col-lg-3 .selectable,
59
- .sp-field-notice .sp-notice.sp-front-end-shortcode .wpcpro-sc-code.selectable{
60
- -webkit-touch-callout: all;
61
- -webkit-user-select: all;
62
- -khtml-user-select: all;
63
- -moz-user-select: all;
64
- -ms-user-select: all;
65
- user-select: all;
66
- }
67
-
68
- .sp-wpcp-framework .sp-content {
69
- margin-left: 0;
70
- border-top: 1px solid #efefef;
71
- }
72
- .sp-wpcp-framework .sp-nav {
73
- position: inherit;
74
- float: none;
75
- width: 100%;
76
- background: #f1f1f1;
77
- -webkit-box-shadow: inset 3px -1px 1px -1px rgba(0,0,0,.04);
78
- -moz-box-shadow: inset 3px -1px 1px -1px rgba(0,0,0,.04);
79
- box-shadow: inset 3px -1px 1px -1px rgba(0,0,0,.04);
80
- }
81
- .sp-wpcp-framework .sp-nav ul {
82
- margin: 0;
83
- }
84
-
85
- .sp-wpcp-framework .sp-nav ul li {
86
- margin-bottom: -1px;
87
- display: inline-block;
88
-
89
- }
90
-
91
- .sp-wpcp-framework .sp-nav-background {
92
- position: inherit;
93
- width: 100%;
94
- background-color: #e3e3e3;
95
- }
96
-
97
- .sp-wpcp-framework .sp-nav ul li a {
98
- background-color: #18AFB9;
99
- border-top: 1px solid #18AFB9;
100
- font-size: 13px;
101
- padding: 16px 15px;
102
- line-height: 1.4;
103
- border-bottom: 1px solid #ddd;
104
- color: #ffffff;
105
- border-right: 1px solid #E2E2E1;
106
- text-transform: uppercase;
107
- font-weight: 600;
108
- margin-bottom: -1px;
109
- }
110
-
111
- .sp-wpcp-framework .sp-nav ul li a.sp-section-active {
112
- border-bottom: 1px solid transparent;
113
- border-top: 1px solid #18AFB9;
114
- background-color: #fff;
115
- box-shadow: 0 3px 0 0 #18AFB9 inset;
116
- }
117
-
118
- .sp-wpcp-framework .sp-nav ul li .sp-section-active {
119
- color: #000;
120
- }
121
-
122
- .sp-wpcp-framework .sp-nav ul li .sp-section-active i {
123
- color: #18AFB9;
124
- }
125
-
126
- .sp-wpcp-framework .sp-nav ul li :after {
127
- display: none;
128
- }
129
-
130
- .sp-element {
131
- padding: 22px 30px;
132
- border-bottom: 1px solid rgba(238, 238, 238, 0.1);
133
- }
134
-
135
- .sp-element:hover {
136
- background-color: transparent;
137
- }
138
-
139
- .sp-element .sp-field-number input {
140
- margin-right: 5px;
141
- }
142
- .sp-element.sp-field-number.sp-column-field .sp-help {
143
- top: initial;
144
- bottom: 4px;
145
- right: 13px;
146
- }
147
- .sp-element.sp-field-number.sp-column-field input {
148
- margin-right: 30px;
149
- }
150
- .sp-tooltip {
151
-
152
- }
153
-
154
- /*
155
- More Plugins
156
- */
157
- .about-wrap .plugin-section .three-col .col{
158
- background: #ffffff;
159
- }
160
- .about-wrap .plugin-section .three-col .col .sp-wpcp-plugin{
161
- border: 1px solid #ddd;
162
- }
163
- .about-wrap .plugin-section .three-col .col .sp-wpcp-plugin .sp-wpcp-plugin-content{
164
- padding-left: 20px;
165
- padding-right: 20px;
166
- padding-bottom: 20px
167
- }
168
- .about-wrap .plugin-section .three-col .col .sp-wpcp-plugin .sp-wpcp-plugin-content h3{
169
- margin-top: 20px;
170
- margin-bottom: 8px;
171
- font-weight: 500;
172
- }
173
-
174
- .about-wrap .plugin-section .three-col .col .sp-wpcp-plugin .sp-wpcp-plugin-content p{
175
- margin-top: 0;
176
- }
177
-
178
- .about-wrap .plugin-section .sp-plugin-section-title h2{
179
- font-size: 2.2em;
180
- color: #32373c;
181
- font-weight: 400;
182
- }
183
-
184
- .about-wrap .plugin-section .sp-plugin-section-title h4{
185
- font-weight: 400;
186
- text-align: center;
187
- font-size: 18px;
188
- color: #555d66;
189
- margin-top: 15px;
190
- margin-bottom: 40px;
191
- }
192
-
193
- /**
194
- Advanced Typography Field*/
195
- .sp-divider {
196
- width: 100%;
197
- display: block;
198
- height: 10px;
199
- }
200
-
201
- .sp-wpcp-framework .sp-font-preview {
202
- padding: 10px;
203
- border: 1px solid #e6e6e6;
204
- color: #7b7b7b;
205
- margin-top: 20px;
206
- background-color: #ececec;
207
- font-size: 16px;
208
- }
209
- #sp-tab-sp_wpcp_shortcode_option_4 .sp-field-typography_advanced .sp-element {
210
- display: inline-block;
211
- padding: 0 5px 0 0;
212
- margin: 0;
213
- line-height: 1.5;
214
- color: #999;
215
- }
216
- .sp_wpcp_margin_field .sp-font-left,
217
- .sp_wpcp_margin_field .sp-font-top,
218
- .sp_wpcp_margin_field .sp-font-bottom,
219
- .sp_wpcp_margin_field .sp-font-right{
220
- margin-right: 30px;
221
- }
222
- .sp_wpcp_margin_field .sp-font-left:before,
223
- .sp_wpcp_margin_field .sp-font-top:before,
224
- .sp_wpcp_margin_field .sp-font-bottom:before,
225
- .sp_wpcp_margin_field .sp-font-right:before {
226
- content: "px";
227
- position: absolute;
228
- top: 19px;
229
- right: -20px;
230
- height: 34px;
231
- width: 29px;
232
- line-height: 34px;
233
- text-align: center;
234
- background-color: #f5f5f5;
235
- display: block;
236
- border: 1px solid #ddd;
237
- border-left: none;
238
- }
239
- #sp-tab-sp_wpcp_shortcode_option_4 .sp-field-number.sp-font-size:before,
240
- #sp-tab-sp_wpcp_shortcode_option_4 .sp-field-number.sp-font-height:before {
241
- content: "px";
242
- position: absolute;
243
- top: 20px;
244
- right: -20px;
245
- height: 34px;
246
- width: 29px;
247
- line-height: 34px;
248
- text-align: center;
249
- background-color: #f5f5f5;
250
- display: block;
251
- border: 1px solid #ddd;
252
- border-left: none;
253
- }
254
- #sp-tab-sp_wpcp_shortcode_option_4 .sp-field-number.sp-font-size {
255
- margin-right: 25px !important;
256
- }
257
-
258
- /*ShortCode Area*/
259
- .sp-metabox-framework .wpcpro_shortcode{
260
- display: inline-flex;
261
- width:100%;
262
- background-color: #fffdfd;
263
- }
264
- .wpcpro_shortcode .wpcpro-col-lg-3 {
265
- border-right: 1px solid #dddddd;
266
- width: 33.33%;
267
- }
268
- .wpcpro_shortcode .wpcpro-col-lg-3 .wpcpro_shortcode_content{
269
- padding: 20px 16px;
270
- }
271
-
272
- .wpcpro_shortcode .wpcpro-col-lg-3 .wpcpro_shortcode_content .wpcpro-sc-code{
273
- background-color: rgba(82, 179, 217, 0.11);
274
- padding: 10px 15px;
275
- display: inline-block;
276
- }
277
-
278
- .wpcpro_shortcode .wpcpro-col-lg-3:last-child {
279
- border-right: none;
280
- width: 66.66%;
281
- }
282
-
283
- .wpcpro_shortcode .wpcpro-col-lg-3 .wpcpro-shortcode-title {
284
- font-weight: 500;
285
- font-size: 14px !important;
286
- padding-top: 0 !important;
287
- color: #4c5158;
288
- margin-right: 5px;
289
- }
290
-
291
- .wpcpro_shortcode .wpcpro-col-lg-3 .back-image {
292
- max-width: 100%;
293
- display: block;
294
- margin: 0 auto;
295
- }
296
-
297
- .wpcpro_shortcode .wpcpro-col-lg-3 textarea {
298
- border-color: transparent;
299
- box-shadow: none;
300
- background-color: #eee;
301
- padding: 4px 6px;
302
- resize: none;
303
- text-align: center;
304
- max-width: 100%;
305
- }
306
-
307
- .wpcpro_shortcode_divider {
308
- height: 20px;
309
- background: #f1f1f1;
310
- border-top: 1px solid #dddddd;
311
- }
312
-
313
- .sp-wpcp-framework .sp-content .sp-section-title {
314
- background-color: #18AFB9;
315
- }
316
- .chosen-container-multi .chosen-drop .result-selected {
317
- display: none;
318
- }
319
- .sp-field-switcher .sp-text-desc {
320
- margin-left:0;
321
- }
322
-
323
- /* Rating */
324
- .sp-wpcp-client-rating{
325
- float: left;
326
- }
327
- .sp-wpcp-client-rating:not(:checked) > input {
328
- visibility:hidden;
329
- display: none;
330
- width:0;
331
- height:0;
332
- float: right;;
333
- top: 100%;
334
- clip: rect(0,0,0,0);
335
- margin: 0;
336
- padding: 0;
337
- border:10px #fff solid;
338
- }
339
-
340
- .sp-wpcp-client-rating:not(:checked) > label {
341
- float: right;
342
- display: block;
343
- padding: 0;
344
- margin: 0;
345
- cursor: pointer;
346
- font-size: 150%;
347
- line-height: 1.2;
348
- color: #d4d4d4;
349
- width: 1em;
350
- }
351
-
352
- .sp-wpcp-client-rating > input:checked ~ label {
353
- color: #f3bb00;
354
- }
355
-
356
- .sp-wpcp-client-rating:not(:checked) > label:hover,
357
- .sp-wpcp-client-rating:not(:checked) > label:hover ~ label {
358
- color: #de7202;
359
- }
360
-
361
- .sp-wpcp-client-rating > input:checked + label:hover,
362
- .sp-wpcp-client-rating > input:checked + label:hover ~ label,
363
- .sp-wpcp-client-rating > input:checked ~ label:hover,
364
- .sp-wpcp-client-rating > input:checked ~ label:hover ~ label,
365
- .sp-wpcp-client-rating > label:hover ~ input:checked ~ label {
366
- color: #de7202;
367
- }
368
-
369
- /* Settings */
370
- h1.sp-option-framework-page-title{
371
- font-size: 23px;
372
- font-weight: 400;
373
- margin: 0;
374
- padding: 18px 0 0;
375
- line-height: 29px;
376
- }
377
- .sp-wpcp-framework.sp-option-framework{
378
- border: 1px solid #cecece;
379
- }
380
- .sp-wpcp-framework.sp-option-framework .sp-field-sorter .sp-modules{
381
- width: 100%;
382
- }
383
- .sp-wpcp-framework.sp-option-framework .sp-header {
384
- background-color: #f2f2f2;
385
- border-bottom: 1px solid #cecece;
386
- padding: 22px 28px;
387
- }
388
- .sp-wpcp-framework.sp-option-framework .sp-header h2{
389
- float: left;
390
- margin: 0;
391
- font-size: 22px;
392
- color: #444444;
393
- font-weight: 600;
394
- line-height: 35px;
395
- }
396
- .sp-wpcp-framework.sp-option-framework .sp-header fieldset input{
397
- text-shadow: 0 0 0;
398
- border: 0;
399
- border-radius: 0;
400
- padding: 3px 15px;
401
- height: auto;
402
- -webkit-transition: all .4s;
403
- -moz-transition: all .4s;
404
- -ms-transition: all .4s;
405
- -o-transition: all .4s;
406
- transition: all .4s;
407
- }
408
- .sp-wpcp-framework.sp-option-framework .sp-header fieldset input.button-primary{
409
- box-shadow: 0 3px 0 #169ca5;
410
- background-color: #18AFB9;
411
- color: #ffffff;
412
- }
413
- .sp-wpcp-framework.sp-option-framework .sp-header fieldset input.button-primary:hover {
414
- box-shadow: 0 3px 0 #1784af;
415
- background-color: #21a1d4;
416
- color: #ffffff;
417
- }
418
- .sp-wpcp-framework.sp-option-framework .sp-header fieldset input.sp-restore{
419
- box-shadow: 0 3px 0 #666666;
420
- background-color: #888888;
421
- color: #ffffff;
422
- margin-left: 8px;
423
- }
424
- .sp-wpcp-framework.sp-option-framework .sp-header fieldset input.sp-restore:hover {
425
- box-shadow: 0 3px 0 #4a4949;
426
- background-color: #6b6a6a;
427
- color: #ffffff;
428
- }
429
- .sp-wpcp-framework.sp-option-framework .sp-content {
430
- margin-left: 225px;
431
- border-top: 0 solid;
432
- }
433
- .sp-wpcp-framework.sp-option-framework .sp-nav-background{
434
- position: absolute;
435
- width: 225px;
436
- background-color: #dddddd;
437
- border-right: 1px solid #cecece;
438
- }
439
- .sp-wpcp-framework.sp-option-framework .sp-nav{
440
- position: relative;
441
- float: left;
442
- width: 225px;
443
- background: transparent;
444
- -webkit-box-shadow: 0 0 0 0;
445
- -moz-box-shadow: 0 0 0 0;
446
- box-shadow: 0 0 0 0;
447
- }
448
- .sp-wpcp-framework.sp-option-framework .sp-nav ul li {
449
- margin-bottom: 0;
450
- display: list-item;
451
- }
452
- .sp-wpcp-framework.sp-option-framework .sp-nav ul li a{
453
- border-top: 0;
454
- border-right: 0;
455
- border-bottom: 1px solid #cecece;
456
- background-color: #efefef;
457
- margin-bottom: 0;
458
- color: #464646;
459
- padding: 15px 15px;
460
- }
461
- .sp-wpcp-framework.sp-option-framework .sp-nav ul li a.sp-section-active{
462
- box-shadow: 3px 0 0 0 #18AFB9 inset;
463
- background-color: #ffffff;
464
- color: #18AFB9;
465
- }
466
- .sp-wpcp-framework.sp-option-framework .sp-nav ul ul:before{
467
- background-color: transparent;
468
- }
469
- .sp-wpcp-framework.sp-option-framework .sp-nav ul ul{
470
- border-bottom: 1px solid #cecece;
471
- }
472
- .sp-wpcp-framework.sp-option-framework .sp-nav ul ul li a{
473
- background-color: #f8fdff;
474
- padding: 13px 15px 13px 24px;
475
- }
476
-
477
- /* Notification Message */
478
- #wp-pending_testimonial_message-wrap{
479
- float: left;
480
- width: 100%;
481
- }
482
- #wp-pending_testimonial_message-wrap #pending_testimonial_message_ifr{
483
- min-height: 300px;
484
- }
485
-
486
- .sp-field-notice .sp-notice.sp-front-end-shortcode{
487
- font-size: 14px;
488
- border-bottom: 1px solid #e8e8e8;
489
- }
490
- .sp-field-notice .sp-notice.sp-front-end-shortcode .wpcpro-sc-code{
491
- background-color: rgba(82, 179, 217, 0.11);
492
- padding: 8px 12px;
493
- display: inline-block;
494
- margin-left: 8px;
495
- }
496
-
497
- /**
498
- Slider Field
499
- */
500
- .sp-field-slider input {
501
- display: inline-block;
502
- width: 40px;
503
- background: #fff;
504
- }
505
-
506
- .sp-field-slider input[type=slider]:before {
507
- width: 35px;
508
- height: 35px;
509
- display: block;
510
- background: red;
511
- content: "%";
512
- position: absolute;
513
- right: 0;
514
- top: 0;
515
- float: right;
516
- margin-right: -20px;
517
- color: #fff;
518
- }
519
-
520
- .sp-slider {
521
- display: inline-block;
522
- margin: 0 8% 0 0;
523
- width: 50%;
524
- vertical-align: super;
525
- }
526
-
527
- .sp-field-slider .ui-slider {
528
- position: relative;
529
- width: 100%;
530
- height: 6px;
531
- background: #E8E8E8;
532
- }
533
-
534
- .sp-field-slider .ui-slider-range {
535
- background: #111;
536
- height: 6px;
537
- }
538
-
539
- .sp-field-slider .ui-slider-handle {
540
- height: 18px;
541
- width: 18px;
542
- background: #ff512f;
543
- position: absolute;
544
- top: -6px;
545
- border-radius: 100%;
546
- cursor: pointer;
547
- }
548
-
549
- /*
550
- ButtonSet field and Carousel Type field.
551
- */
552
- .sp-field-button-set label input,
553
- .sp-field-carousel-type label input {
554
- display:none;
555
- }
556
- .sp-field-button-set label span {
557
- background: linear-gradient(to bottom, white, #eeeeee);
558
- padding: 7px 12px;
559
- margin: 0;
560
- vertical-align: middle;
561
- border: solid 1px #ccc;
562
- border-radius: 0;
563
- cursor: pointer;
564
- border-right: none;
565
- }
566
-
567
- .sp-field-button-set label input ~ span:hover {
568
- background: #fff;
569
- }
570
- .sp-field-button-set label:first-child span {
571
- border-radius: 4px 0 0 4px;
572
- margin-right: -1px;
573
- }
574
- .sp-field-button-set label:last-child span {
575
- border-radius: 0 4px 4px 0;
576
- border-right: solid 1px #ccc;
577
- }
578
- .sp-field-button-set label input:checked ~ span {
579
- background: #18AFB9;
580
- border-color: rgb(21, 157, 167);
581
- color: #fff;
582
- cursor: default;
583
- box-shadow: none;
584
- }
585
-
586
- /*
587
- Carousel Type
588
- */
589
- .sp-field-carousel-type label span {
590
- background: #e8ecef;
591
- color: #7b8898;
592
- display: block;
593
- margin-right: 10px;
594
- vertical-align: middle;
595
- border: solid 1px #e8ecef;
596
- border-radius: 2px;
597
- cursor: pointer;
598
- text-align: center;
599
- width: 120px;
600
- height: 80px;
601
- box-shadow: inset 0 0 0px 5px #fff;
602
- position: relative;
603
- }
604
- .sp-field-carousel-type label span strong{
605
- position: absolute;
606
- top: 5px;
607
- right: 6px;
608
- background: #cbd6df;
609
- padding: 0px 5px;
610
- font-size: 10px;
611
- }
612
- .sp-field-carousel-type label span i{
613
- font-size: 30px;
614
- width: 32px;
615
- height: 30px;
616
- margin-top: 14px;
617
- }
618
- .sp-field-carousel-type label span p {
619
- margin-top: 5px;
620
- font-weight: 500;
621
- }
622
-
623
- .sp-field-carousel-type label input:checked ~ span {
624
- border-color: rgb(55, 209, 230);
625
- cursor: default;
626
- box-shadow: inset 0 0 0px 5px #fff, 0px 0px 10px 0px rgb(55, 209, 230);
627
- }
628
- /* Advanced Background Field */
629
- .sp-background-preview {
630
- height: 250px;
631
- width: 100%;
632
- }
633
- .sp_wpcp_adv_background_field .sp-element{
634
- display: inline-block;
635
- }
636
- .sp_wpcp_adv_background_field .sp-element .wp-picker-container,
637
- .sp_wpcp_adv_background_field .sp-element.sp-field-upload,
638
- .sp_wpcp_adv_background_field .sp-element.sp-field-select_typo select {
639
- margin-top: 5px;
640
- }
641
- .sp_wpcp_adv_background_field .sp-element.sp-field-upload{
642
- padding-left: 0;
643
- }
644
- .sp_wpcp_adv_background_field .sp-field-color_picker{
645
- display:block;
646
- }
647
- /*
648
- Image Height Field
649
- */
650
- .sp_wpcp_image_height_field .sp-height-css {
651
- margin-right: 20px;
652
- }
653
- .sp_wpcp_image_height_field .sp-height-css .sp-after-text{
654
- padding-left: 0;
655
- }
656
- @media (min-width: 1400px) {
657
- .sp-metabox-framework .sp-slider {
658
- width: 35%;
659
- }
660
- }
661
- @media (max-width: 1200px) {
662
- .sp-metabox-framework .wpcpro_shortcode{
663
- display: block;
664
- }
665
- .wpcpro_shortcode .wpcpro-col-lg-3 {
666
- width: 100%;
667
- display: block;
668
- border-bottom: 1px solid #e5e5e5;
669
- padding-bottom:15px;
670
- border-right:none;
671
- }
672
-
673
- .wpcpro_shortcode .wpcpro-col-lg-3:last-child {
674
- border-bottom: none;
675
- padding-bottom:0;
676
- }
677
- }
678
- @media only screen and (max-width: 782px) {
679
- .sp-wpcp-framework.sp-option-framework .sp-content {
680
- margin-left: 0;
681
- }
682
- .sp-wpcp-framework.sp-option-framework .sp-header h2{
683
- float: none;
684
- }
685
- }
686
-
687
- /* WPCP CSS */
688
- .sp-field-carousel_type > .sp-title {
689
- font-size:15px;
690
- }
691
- .sp-field-carousel_type > .sp-fieldset,
692
- .sp-field-background_adv.wpcp_carousel_content_bg > .sp-fieldset,
693
- .wpcp-gallery-filed-wrapper > .sp-fieldset{
694
- margin-left: 0;
695
- margin-top: 30px;
696
- }
697
- .wpcp-video-field-wrapper > .sp-fieldset,
698
- .sp-field-group.wpcp_carousel_content_wrapper .sp-fieldset {
699
- margin-left: 0;
700
- margin-top: 18px;
701
- }
702
- .sp-field-group.wpcp-video-field-wrapper,
703
- .sp-field-group.wpcp_carousel_content_wrapper {
704
- padding-top: 0;
705
- }
706
- .sp-field-group.wpcp-video-field-wrapper .sp-groups.sp-accordion .sp-group:first-of-type,
707
- .sp-field-group.wpcp_carousel_content_wrapper .sp-groups.sp-accordion .sp-group:first-of-type{
708
- margin-top: 29px;
709
- }
710
- .sp-field-group .sp-element.sp-field-wysiwyg.wpcp_carousel_content_source .sp-fieldset {
711
- margin-top: 0;
712
- }
713
- .wpcp-gallery-filed-wrapper .sp-fieldset .button i{
714
- font-size: 24px;
715
- margin-bottom: 10px;
716
- }
717
- .wpcp-gallery-filed-wrapper .button{
718
- width: 110px;
719
- height: 110px;
720
- text-align: center;
721
- line-height: 15px;
722
- color: #fff;
723
- border: none;
724
- border-radius: 2px;
725
- display: flex;
726
- justify-content: center;
727
- flex-direction: column;
728
- font-weight: 600;
729
- }
730
- .wpcp-gallery-filed-wrapper .sp-fieldset .button.button-primary.sp-add {
731
- background: #4eb631;
732
- box-shadow: none;
733
- text-shadow: none;
734
- }
735
- .wpcp-gallery-filed-wrapper .sp-fieldset .button.sp-edit{
736
- background: #6a7885;
737
- }
738
- .wpcp-gallery-filed-wrapper .sp-fieldset .button.sp-warning-primary.sp-remove {
739
- background: #c44533;
740
- }
741
- .wpcp-gallery-filed-wrapper .sp-fieldset a,
742
- .wpcp-gallery-filed-wrapper .sp-fieldset li {
743
- float:left;
744
- }
745
- .wpcp-gallery-filed-wrapper .sp-fieldset a:hover,
746
- .wpcp-gallery-filed-wrapper .sp-fieldset a:focus {
747
- color:#fff;
748
- }
749
-
750
- .wpcp_carousel_content_source .sp-title{
751
- display:none;
752
- }
753
- .wpcp-video-field-wrapper .sp-field-wysiwyg .sp-fieldset,
754
- .wpcp_carousel_content_source .sp-fieldset{
755
- margin-left:0;
756
- }
757
- .wpcp_carousel_content_bg .sp-title{
758
- border: 1px solid #e5e5e5;
759
- background: #fafafa;
760
- line-height: 38px;
761
- padding-left: 15px;
762
- width: 100%;
763
- margin-bottom: 15px;
764
- }
765
-
766
- /* Group Remove Button */
767
- .wpcp_carousel_content_wrapper.sp-field-group .sp-group h4 .video-type {
768
- display: none;
769
- }
770
- .sp-groups .sp-remove-group {
771
- float: right;
772
- font-size: 22px;
773
- line-height: 22px;
774
- color: #d9534f;
775
- margin-top:-3px;
776
- }
777
- .sp-groups .sp-remove-group:hover {
778
- color: #c51f1a;
779
- }
780
-
781
- .sp-field-group .sp-add-group {
782
- margin-top: 10px;
783
- }
784
- /**
785
- Pro Notice
786
- **/
787
- .sp-element.sp-field-pronotice {
788
- font-size: 15px;
789
- margin: 22px 30px;
790
- color: #2f2f2f;
791
- background: #f9f9f9;
792
- -webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.18);
793
- box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.18);
794
- padding: 10px 12px;
795
- border-left: 3px solid #f90000;
796
- }
797
- .sp-element.sp-field-pronotice a{
798
- text-decoration: none;
799
- font-weight: 500;
800
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/assets/css/sp-framework-rtl.css DELETED
@@ -1,220 +0,0 @@
1
- .sp-wpcp-framework {
2
- margin-left: 20px;
3
- margin-right: 0;
4
- }
5
- .sp-wpcp-framework .sp-header h1 {
6
- float: right;
7
- }
8
- .sp-wpcp-framework .sp-header fieldset {
9
- float: left;
10
- }
11
- .sp-wpcp-framework .sp-nav {
12
- float: right;
13
- }
14
- .sp-wpcp-framework .sp-nav ul {
15
- clear: right;
16
- }
17
- .sp-wpcp-framework .sp-nav ul li .sp-section-active:after {
18
- right: auto;
19
- left: 0;
20
- border-left-color: #fff;
21
- border-right-color: transparent;
22
- }
23
- .sp-wpcp-framework .sp-nav ul li .sp-arrow:after {
24
- content: "\f053";
25
- right: auto;
26
- left: 10px;
27
- }
28
- .sp-wpcp-framework .sp-nav ul li.sp-tab-active .sp-arrow:after {
29
- -moz-transform: rotate(-90deg);
30
- -ms-transform: rotate(-90deg);
31
- -webkit-transform: rotate(-90deg);
32
- transform: rotate(-90deg);
33
- }
34
- .sp-wpcp-framework .sp-nav ul ul li a {
35
- padding-right: 25px;
36
- padding-left: 15px;
37
- }
38
- .sp-wpcp-framework .sp-nav ul ul:before {
39
- left: auto;
40
- right: 15px;
41
- }
42
- .sp-wpcp-framework .sp-nav .sp-icon {
43
- margin-left: 5px;
44
- margin-right: 0;
45
- }
46
- .sp-wpcp-framework .sp-nav-background {
47
- left: auto;
48
- right: 0;
49
- }
50
- .sp-wpcp-framework .sp-content {
51
- margin-left: 0;
52
- margin-right: 225px;
53
- }
54
- .sp-wpcp-framework .sp-content .sp-sections {
55
- float: right;
56
- }
57
- .sp-wpcp-framework .sp-show-all .sp-content {
58
- margin-right: 0;
59
- overflow: hidden;
60
- }
61
- .sp-wpcp-framework .sp-expand-all {
62
- right: auto;
63
- left: 40px;
64
- }
65
- .sp-wpcp-framework .sp-footer {
66
- text-align: left;
67
- }
68
-
69
- .sp-metabox-framework {
70
- margin: -6px -12px -12px -12px;
71
- }
72
- .sp-metabox-framework .sp-content .sp-section-title {
73
- padding: 20px;
74
- }
75
-
76
- .sp-element .sp-title {
77
- float: right;
78
- }
79
- .sp-element .sp-fieldset {
80
- margin-left: 0;
81
- margin-right: 30%;
82
- }
83
-
84
- .sp-pseudo-field {
85
- padding: 0 0 0 5px !important;
86
- }
87
-
88
- .sp-field-number em {
89
- margin-left: 0;
90
- margin-right: 5px;
91
- }
92
-
93
- .sp-field-typography select,
94
- .sp-field-typography .chosen-container {
95
- margin-right: 0;
96
- margin-left: 5px;
97
- }
98
-
99
- .sp-field-checkbox .horizontal li,
100
- .sp-field-radio .horizontal li {
101
- margin-right: 0;
102
- margin-left: 15px;
103
- }
104
-
105
- .sp-field-switcher label {
106
- float: right;
107
- }
108
- .sp-field-switcher .sp-text-desc {
109
- float: right;
110
- margin-left: 0;
111
- margin-right: 5px;
112
- }
113
-
114
- .sp-field-color_picker .sp-alpha-slider {
115
- margin-left: 0;
116
- margin-right: 2px;
117
- }
118
- .sp-field-color_picker .sp-alpha-slider .ui-slider-handle {
119
- margin: 0 -11px;
120
- }
121
- .sp-field-color_picker .sp-alpha-slider-offset {
122
- background-position: center right;
123
- }
124
- .sp-field-color_picker .sp-alpha-text {
125
- right: auto;
126
- left: 10px;
127
- }
128
-
129
- .sp-field-group .ui-accordion-icons {
130
- padding-left: 0;
131
- padding-right: 30px;
132
- }
133
- .sp-field-group .ui-accordion-header-icon {
134
- left: auto;
135
- right: .5em;
136
- }
137
- .sp-field-group .dashicons-arrow-right:before {
138
- content: "\f141";
139
- }
140
-
141
- .sp-help {
142
- right: auto;
143
- left: 5px;
144
- }
145
-
146
- .sp-field-icon .button {
147
- margin-right: 0;
148
- margin-left: 5px;
149
- }
150
- .sp-field-icon .sp-icon-preview i {
151
- margin-right: 0;
152
- margin-left: 5px;
153
- }
154
-
155
- .sp-field-gallery ul li {
156
- margin-right: 0;
157
- margin-left: 5px;
158
- }
159
- .sp-field-gallery .button {
160
- margin-right: 0;
161
- margin-left: 5px;
162
- }
163
-
164
- .sp-field-sorter .sp-modules {
165
- float: right;
166
- margin-right: 0;
167
- margin-left: 10px;
168
- }
169
-
170
- .sp-taxonomy-add-fields .sp-fieldset {
171
- margin-right: 0;
172
- }
173
- .sp-taxonomy-add-fields .sp-help {
174
- left: -5px;
175
- right: auto;
176
- }
177
-
178
- .sp-taxonomy-edit-fields .sp-fieldset {
179
- margin-left: 0;
180
- margin-right: 225px;
181
- }
182
- .sp-taxonomy-edit-fields .sp-help {
183
- right: auto;
184
- left: -5px;
185
- }
186
-
187
- #sp-save-ajax {
188
- right: auto;
189
- left: 5px;
190
- }
191
-
192
- .sp-dialog .sp-element {
193
- padding-right: 15px;
194
- padding-left: 30px;
195
- }
196
- .sp-dialog .sp-shortcode-clone .sp-remove-clone {
197
- right: auto;
198
- left: 5px;
199
- }
200
-
201
- #customize-controls .sp-element .sp-fieldset,
202
- .widget-content .sp-element .sp-fieldset,
203
- #side-sortables .sp-element .sp-fieldset {
204
- margin-right: 0;
205
- }
206
-
207
- @media only screen and (max-width: 1200px) {
208
- .sp-metabox-framework .sp-element .sp-fieldset {
209
- margin-left: 0;
210
- }
211
- }
212
- @media only screen and (max-width: 782px) {
213
- .sp-wpcp-framework .sp-fieldset,
214
- .sp-wpcp-framework .sp-content {
215
- margin-right: 0;
216
- }
217
- }
218
- .ui-dialog {
219
- right: auto;
220
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/assets/css/sp-framework.css DELETED
@@ -1,1850 +0,0 @@
1
-
2
- /* @group Base */
3
- .sp-wpcp-framework .chosen-container {
4
- position: relative;
5
- display: inline-block;
6
- vertical-align: middle;
7
- font-size: 13px;
8
- zoom: 1;
9
- *display: inline;
10
- -webkit-user-select: none;
11
- -moz-user-select: none;
12
- user-select: none;
13
- }
14
-
15
- .sp-wpcp-framework .chosen-container * {
16
- -webkit-box-sizing: border-box;
17
- -moz-box-sizing: border-box;
18
- box-sizing: border-box;
19
- }
20
-
21
- .sp-wpcp-framework .chosen-container .chosen-drop {
22
- position: absolute;
23
- top: 100%;
24
- left: -9999px;
25
- z-index: 1010;
26
- width: 100%;
27
- border: 1px solid #aaa;
28
- border-top: 0;
29
- background: #fff;
30
- box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
31
- }
32
-
33
- .sp-wpcp-framework .chosen-container.chosen-with-drop .chosen-drop {
34
- left: 0;
35
- }
36
-
37
- .sp-wpcp-framework .chosen-container a {
38
- cursor: pointer;
39
- }
40
-
41
- .sp-wpcp-framework .chosen-container .search-choice .group-name,
42
- .sp-wpcp-framework .chosen-container .chosen-single .group-name {
43
- margin-right: 4px;
44
- overflow: hidden;
45
- white-space: nowrap;
46
- text-overflow: ellipsis;
47
- font-weight: normal;
48
- color: #999999;
49
- }
50
-
51
- .sp-wpcp-framework .chosen-container .search-choice .group-name:after,
52
- .sp-wpcp-framework .chosen-container .chosen-single .group-name:after {
53
- content: ":";
54
- padding-left: 2px;
55
- vertical-align: top;
56
- }
57
-
58
- /* @end */
59
- /* @group Single Chosen */
60
- .sp-wpcp-framework .chosen-container-single .chosen-single {
61
- position: relative;
62
- display: block;
63
- overflow: hidden;
64
- padding: 0 0 0 8px;
65
- height: 25px;
66
- border: 1px solid #aaa;
67
- border-radius: 5px;
68
- background-color: #fff;
69
- background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4));
70
- background: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
71
- background: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
72
- background: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
73
- background: linear-gradient(to bottom, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
74
- background-clip: padding-box;
75
- box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1);
76
- color: #444;
77
- text-decoration: none;
78
- white-space: nowrap;
79
- line-height: 24px;
80
- }
81
-
82
- .sp-wpcp-framework .chosen-container-single .chosen-default {
83
- color: #999;
84
- }
85
-
86
- .sp-wpcp-framework .chosen-container-single .chosen-single span {
87
- display: block;
88
- overflow: hidden;
89
- margin-right: 26px;
90
- text-overflow: ellipsis;
91
- white-space: nowrap;
92
- }
93
-
94
- .sp-wpcp-framework .chosen-container-single .chosen-single-with-deselect span {
95
- margin-right: 38px;
96
- }
97
-
98
- .sp-wpcp-framework .chosen-container-single .chosen-single abbr {
99
- position: absolute;
100
- top: 6px;
101
- right: 26px;
102
- display: block;
103
- width: 12px;
104
- height: 12px;
105
- background: url("../images/chosen-sprite.png") -42px 1px no-repeat;
106
- font-size: 1px;
107
- }
108
-
109
- .sp-wpcp-framework .chosen-container-single .chosen-single abbr:hover {
110
- background-position: -42px -10px;
111
- }
112
-
113
- .sp-wpcp-framework .chosen-container-single.chosen-disabled .chosen-single abbr:hover {
114
- background-position: -42px -10px;
115
- }
116
-
117
- .sp-wpcp-framework .chosen-container-single .chosen-single div {
118
- position: absolute;
119
- top: 0;
120
- right: 0;
121
- display: block;
122
- width: 18px;
123
- height: 100%;
124
- }
125
-
126
- .sp-wpcp-framework .chosen-container-single .chosen-single div b {
127
- display: block;
128
- width: 100%;
129
- height: 100%;
130
- background: url("../images/chosen-sprite.png") no-repeat 0px 2px;
131
- }
132
-
133
- .sp-wpcp-framework .chosen-container-single .chosen-search {
134
- position: relative;
135
- z-index: 1010;
136
- margin: 0;
137
- padding: 3px 4px;
138
- white-space: nowrap;
139
- }
140
-
141
- .sp-wpcp-framework .chosen-container-single .chosen-search input[type="text"] {
142
- margin: 1px 0;
143
- padding: 4px 20px 4px 5px;
144
- width: 100%;
145
- height: auto;
146
- outline: 0;
147
- border: 1px solid #aaa;
148
- background: white url("../images/chosen-sprite.png") no-repeat 100% -20px;
149
- background: url("../images/chosen-sprite.png") no-repeat 100% -20px;
150
- font-size: 1em;
151
- font-family: sans-serif;
152
- line-height: normal;
153
- border-radius: 0;
154
- }
155
-
156
- .sp-wpcp-framework .chosen-container-single .chosen-drop {
157
- margin-top: -1px;
158
- border-radius: 0 0 4px 4px;
159
- background-clip: padding-box;
160
- }
161
-
162
- .sp-wpcp-framework .chosen-container-single.chosen-container-single-nosearch .chosen-search {
163
- position: absolute;
164
- left: -9999px;
165
- }
166
-
167
- /* @end */
168
- /* @group Results */
169
- .sp-wpcp-framework .chosen-container .chosen-results {
170
- color: #444;
171
- position: relative;
172
- overflow-x: hidden;
173
- overflow-y: auto;
174
- margin: 0 4px 4px 0;
175
- padding: 0 0 0 4px;
176
- max-height: 240px;
177
- -webkit-overflow-scrolling: touch;
178
- }
179
-
180
- .sp-wpcp-framework .chosen-container .chosen-results li {
181
- display: none;
182
- margin: 0;
183
- padding: 5px 6px;
184
- list-style: none;
185
- line-height: 15px;
186
- word-wrap: break-word;
187
- -webkit-touch-callout: none;
188
- }
189
-
190
- .sp-wpcp-framework .chosen-container .chosen-results li.active-result {
191
- display: list-item;
192
- cursor: pointer;
193
- }
194
-
195
- .sp-wpcp-framework .chosen-container .chosen-results li.disabled-result {
196
- display: list-item;
197
- color: #ccc;
198
- cursor: default;
199
- }
200
-
201
- .sp-wpcp-framework .chosen-container .chosen-results li.highlighted {
202
- background-color: #3875d7;
203
- background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
204
- background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%);
205
- background-image: -moz-linear-gradient(#3875d7 20%, #2a62bc 90%);
206
- background-image: -o-linear-gradient(#3875d7 20%, #2a62bc 90%);
207
- background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
208
- color: #fff;
209
- }
210
-
211
- .sp-wpcp-framework .chosen-container .chosen-results li.no-results {
212
- color: #777;
213
- display: list-item;
214
- background: #f4f4f4;
215
- }
216
-
217
- .sp-wpcp-framework .chosen-container .chosen-results li.group-result {
218
- display: list-item;
219
- font-weight: bold;
220
- cursor: default;
221
- }
222
-
223
- .sp-wpcp-framework .chosen-container .chosen-results li.group-option {
224
- padding-left: 15px;
225
- }
226
-
227
- .sp-wpcp-framework .chosen-container .chosen-results li em {
228
- font-style: normal;
229
- text-decoration: underline;
230
- }
231
-
232
- /* @end */
233
- /* @group Multi Chosen */
234
- .sp-wpcp-framework .chosen-container-multi .chosen-choices {
235
- position: relative;
236
- overflow: hidden;
237
- margin: 0;
238
- padding: 0 5px;
239
- width: 100%;
240
- height: auto !important;
241
- height: 1%;
242
- border: 1px solid #aaa;
243
- background-color: #fff;
244
- background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
245
- background-image: -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%);
246
- background-image: -moz-linear-gradient(#eeeeee 1%, #ffffff 15%);
247
- background-image: -o-linear-gradient(#eeeeee 1%, #ffffff 15%);
248
- background-image: linear-gradient(#eeeeee 1%, #ffffff 15%);
249
- cursor: text;
250
- }
251
-
252
- .sp-wpcp-framework .chosen-container-multi .chosen-choices li {
253
- float: left;
254
- list-style: none;
255
- }
256
-
257
- .sp-wpcp-framework .chosen-container-multi .chosen-choices li.search-field {
258
- margin: 0;
259
- padding: 0;
260
- white-space: nowrap;
261
- }
262
-
263
- .sp-wpcp-framework .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
264
- margin: 1px 0;
265
- padding: 0;
266
- height: 25px;
267
- outline: 0;
268
- border: 0 !important;
269
- background: transparent !important;
270
- box-shadow: none;
271
- color: #999;
272
- font-size: 100%;
273
- font-family: sans-serif;
274
- line-height: normal;
275
- border-radius: 0;
276
- }
277
-
278
- .sp-wpcp-framework .chosen-container-multi .chosen-choices li.search-choice {
279
- position: relative;
280
- margin: 3px 5px 3px 0;
281
- padding: 3px 20px 3px 5px;
282
- border: 1px solid #aaa;
283
- max-width: 100%;
284
- border-radius: 3px;
285
- background-color: #eeeeee;
286
- background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
287
- background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
288
- background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
289
- background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
290
- background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
291
- background-size: 100% 19px;
292
- background-repeat: repeat-x;
293
- background-clip: padding-box;
294
- box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
295
- color: #333;
296
- line-height: 13px;
297
- cursor: default;
298
- }
299
-
300
- .sp-wpcp-framework .chosen-container-multi .chosen-choices li.search-choice span {
301
- word-wrap: break-word;
302
- }
303
-
304
- .sp-wpcp-framework .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
305
- position: absolute;
306
- top: 4px;
307
- right: 3px;
308
- display: block;
309
- width: 12px;
310
- height: 12px;
311
- background: url("../images/chosen-sprite.png") -42px 1px no-repeat;
312
- font-size: 1px;
313
- }
314
-
315
- .sp-wpcp-framework .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
316
- background-position: -42px -10px;
317
- }
318
-
319
- .sp-wpcp-framework .chosen-container-multi .chosen-choices li.search-choice-disabled {
320
- padding-right: 5px;
321
- border: 1px solid #ccc;
322
- background-color: #e4e4e4;
323
- background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
324
- background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
325
- background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
326
- background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
327
- background-image: linear-gradient(to bottom, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
328
- color: #666;
329
- }
330
-
331
- .sp-wpcp-framework .chosen-container-multi .chosen-choices li.search-choice-focus {
332
- background: #d4d4d4;
333
- }
334
-
335
- .sp-wpcp-framework .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
336
- background-position: -42px -10px;
337
- }
338
-
339
- .sp-wpcp-framework .chosen-container-multi .chosen-results {
340
- margin: 0;
341
- padding: 0;
342
- }
343
-
344
- .sp-wpcp-framework .chosen-container-multi .chosen-drop .result-selected {
345
- display: list-item;
346
- color: #ccc;
347
- cursor: default;
348
- }
349
-
350
- /* @end */
351
- /* @group Active */
352
- .sp-wpcp-framework .chosen-container-active .chosen-single {
353
- border: 1px solid #5897fb;
354
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
355
- }
356
-
357
- .sp-wpcp-framework .chosen-container-active.chosen-with-drop .chosen-single {
358
- border: 1px solid #aaa;
359
- -moz-border-radius-bottomright: 0;
360
- border-bottom-right-radius: 0;
361
- -moz-border-radius-bottomleft: 0;
362
- border-bottom-left-radius: 0;
363
- background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff));
364
- background-image: -webkit-linear-gradient(#eeeeee 20%, #ffffff 80%);
365
- background-image: -moz-linear-gradient(#eeeeee 20%, #ffffff 80%);
366
- background-image: -o-linear-gradient(#eeeeee 20%, #ffffff 80%);
367
- background-image: linear-gradient(#eeeeee 20%, #ffffff 80%);
368
- box-shadow: 0 1px 0 #fff inset;
369
- }
370
-
371
- .sp-wpcp-framework .chosen-container-active.chosen-with-drop .chosen-single div {
372
- border-left: none;
373
- background: transparent;
374
- }
375
-
376
- .sp-wpcp-framework .chosen-container-active.chosen-with-drop .chosen-single div b {
377
- background-position: -18px 2px;
378
- }
379
-
380
- .sp-wpcp-framework .chosen-container-active .chosen-choices {
381
- border: 1px solid #5897fb;
382
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
383
- }
384
-
385
- .sp-wpcp-framework .chosen-container-active .chosen-choices li.search-field input[type="text"] {
386
- color: #222 !important;
387
- }
388
-
389
- /* @end */
390
- /* @group Disabled Support */
391
- .sp-wpcp-framework .chosen-disabled {
392
- opacity: 0.5 !important;
393
- cursor: default;
394
- }
395
-
396
- .sp-wpcp-framework .chosen-disabled .chosen-single {
397
- cursor: default;
398
- }
399
-
400
- .sp-wpcp-framework .chosen-disabled .chosen-choices .search-choice .search-choice-close {
401
- cursor: default;
402
- }
403
-
404
- /* @end */
405
- /* @group Right to Left */
406
- .sp-wpcp-framework .chosen-rtl {
407
- text-align: right;
408
- }
409
-
410
- .sp-wpcp-framework .chosen-rtl .chosen-single {
411
- overflow: visible;
412
- padding: 0 8px 0 0;
413
- }
414
-
415
- .sp-wpcp-framework .chosen-rtl .chosen-single span {
416
- margin-right: 0;
417
- margin-left: 26px;
418
- direction: rtl;
419
- }
420
-
421
- .sp-wpcp-framework .chosen-rtl .chosen-single-with-deselect span {
422
- margin-left: 38px;
423
- }
424
-
425
- .sp-wpcp-framework .chosen-rtl .chosen-single div {
426
- right: auto;
427
- left: 3px;
428
- }
429
-
430
- .sp-wpcp-framework .chosen-rtl .chosen-single abbr {
431
- right: auto;
432
- left: 26px;
433
- }
434
-
435
- .sp-wpcp-framework .chosen-rtl .chosen-choices li {
436
- float: right;
437
- }
438
-
439
- .sp-wpcp-framework .chosen-rtl .chosen-choices li.search-field input[type="text"] {
440
- direction: rtl;
441
- }
442
-
443
- .sp-wpcp-framework .chosen-rtl .chosen-choices li.search-choice {
444
- margin: 3px 5px 3px 0;
445
- padding: 3px 5px 3px 19px;
446
- }
447
-
448
- .sp-wpcp-framework .chosen-rtl .chosen-choices li.search-choice .search-choice-close {
449
- right: auto;
450
- left: 4px;
451
- }
452
-
453
- .sp-wpcp-framework .chosen-rtl.chosen-container-single-nosearch .chosen-search,
454
- .sp-wpcp-framework .chosen-rtl .chosen-drop {
455
- left: 9999px;
456
- }
457
-
458
- .sp-wpcp-framework .chosen-rtl.chosen-container-single .chosen-results {
459
- margin: 0 0 4px 4px;
460
- padding: 0 4px 0 0;
461
- }
462
-
463
- .sp-wpcp-framework .chosen-rtl .chosen-results li.group-option {
464
- padding-right: 15px;
465
- padding-left: 0;
466
- }
467
-
468
- .sp-wpcp-framework .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
469
- border-right: none;
470
- }
471
-
472
- .sp-wpcp-framework .chosen-rtl .chosen-search input[type="text"] {
473
- padding: 4px 5px 4px 20px;
474
- background: white url("../images/chosen-sprite.png") no-repeat -30px -20px;
475
- background: url("../images/chosen-sprite.png") no-repeat -30px -20px;
476
- direction: rtl;
477
- }
478
-
479
- .sp-wpcp-framework .chosen-rtl.chosen-container-single .chosen-single div b {
480
- background-position: 6px 2px;
481
- }
482
-
483
- .sp-wpcp-framework .chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
484
- background-position: -12px 2px;
485
- }
486
-
487
- /* @end */
488
- /* @group Retina compatibility */
489
- @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) {
490
- .sp-wpcp-framework .chosen-rtl .chosen-search input[type="text"],
491
- .sp-wpcp-framework .chosen-container-single .chosen-single abbr,
492
- .sp-wpcp-framework .chosen-container-single .chosen-single div b,
493
- .sp-wpcp-framework .chosen-container-single .chosen-search input[type="text"],
494
- .sp-wpcp-framework .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
495
- .sp-wpcp-framework .chosen-container .chosen-results-scroll-down span,
496
- .sp-wpcp-framework .chosen-container .chosen-results-scroll-up span {
497
- background-image: url("../images/chosen-sprite@2x.png") !important;
498
- background-size: 52px 37px !important;
499
- background-repeat: no-repeat !important;
500
- }
501
- }
502
- /* @end */
503
- .sp-wpcp-framework {
504
- position: relative;
505
- margin-top: 20px;
506
- margin-right: 20px;
507
- }
508
- .sp-wpcp-framework label {
509
- padding: 0;
510
- margin: 0;
511
- display: inline-block;
512
- }
513
- .sp-wpcp-framework .sp-settings-error {
514
- margin: 0 0 15px 0;
515
- }
516
- .sp-wpcp-framework .sp-header {
517
- background-color: #2684a6;
518
- padding: 24px 28px;
519
- overflow: hidden;
520
- }
521
- .sp-wpcp-framework .sp-header fieldset {
522
- float: right;
523
- }
524
- .sp-wpcp-framework .sp-header fieldset input {
525
- margin: 0 2px;
526
- line-height: 26px;
527
- }
528
- .sp-wpcp-framework .sp-body {
529
- position: relative;
530
- background-color: #fff;
531
- }
532
- .sp-wpcp-framework .sp-nav {
533
- display: block;
534
- position: relative;
535
- z-index: 10;
536
- float: left;
537
- width: 225px;
538
- }
539
- .sp-wpcp-framework .sp-nav ul {
540
- clear: left;
541
- margin: 0;
542
- list-style-type: none;
543
- }
544
- .sp-wpcp-framework .sp-nav ul li {
545
- margin-bottom: 0;
546
- }
547
- .sp-wpcp-framework .sp-nav ul li a {
548
- font-size: 13px;
549
- position: relative;
550
- display: block;
551
- padding: 15px;
552
- text-decoration: none;
553
- color: #999;
554
- background-color: #222;
555
- border-bottom: 1px solid #2f2f2f;
556
- -moz-transition: all 0.2s ease-out;
557
- -o-transition: all 0.2s ease-out;
558
- -webkit-transition: all 0.2s ease-out;
559
- transition: all 0.2s ease-out;
560
- }
561
- .sp-wpcp-framework .sp-nav ul li a:focus {
562
- outline: none;
563
- -moz-box-shadow: none;
564
- -webkit-box-shadow: none;
565
- box-shadow: none;
566
- }
567
- .sp-wpcp-framework .sp-nav ul li .sp-section-active {
568
- color: #fff;
569
- background-color: #111;
570
- }
571
- .sp-wpcp-framework .sp-nav ul li .sp-section-active:after {
572
- content: " ";
573
- position: absolute;
574
- right: 0;
575
- top: 50%;
576
- height: 0;
577
- width: 0;
578
- pointer-events: none;
579
- border: solid transparent;
580
- border-right-color: #fff;
581
- border-width: 4px;
582
- margin-top: -4px;
583
- }
584
- .sp-wpcp-framework .sp-nav ul li .sp-arrow:after {
585
- content: "\f054";
586
- display: inline-block;
587
- font-family: "FontAwesome";
588
- font-size: 9px;
589
- line-height: 1;
590
- position: absolute;
591
- right: 10px;
592
- top: 50%;
593
- margin-top: -4px;
594
- -moz-transform: rotate(0);
595
- -ms-transform: rotate(0);
596
- -webkit-transform: rotate(0);
597
- transform: rotate(0);
598
- -moz-transition: -moz-transform 0.2s;
599
- -o-transition: -o-transform 0.2s;
600
- -webkit-transition: -webkit-transform 0.2s;
601
- transition: transform 0.2s;
602
- }
603
- .sp-wpcp-framework .sp-nav ul li.sp-tab-active .sp-arrow:after {
604
- -moz-transform: rotate(90deg);
605
- -ms-transform: rotate(90deg);
606
- -webkit-transform: rotate(90deg);
607
- transform: rotate(90deg);
608
- }
609
- .sp-wpcp-framework .sp-nav ul ul {
610
- display: none;
611
- position: relative;
612
- border-bottom: 1px solid #2f2f2f;
613
- position: relative;
614
- }
615
- .sp-wpcp-framework .sp-nav ul ul li a {
616
- font-size: 12px;
617
- padding: 13px 15px 13px 25px;
618
- background-color: #191919;
619
- border-bottom: 1px solid #222;
620
- }
621
- .sp-wpcp-framework .sp-nav ul ul li .sp-section-active {
622
- background-color: #101010;
623
- }
624
- .sp-wpcp-framework .sp-nav ul ul li:last-child a {
625
- border-bottom: 0;
626
- }
627
- .sp-wpcp-framework .sp-nav ul ul:before {
628
- content: '';
629
- position: absolute;
630
- top: 0;
631
- left: 15px;
632
- z-index: 1;
633
- width: 1px;
634
- height: 100%;
635
- background-color: rgba(34, 34, 34, 0.75);
636
- }
637
- .sp-wpcp-framework .sp-nav .sp-icon {
638
- width: 20px;
639
- margin-right: 5px;
640
- font-size: 14px;
641
- text-align: center;
642
- }
643
- .sp-wpcp-framework .sp-nav .sp-separator {
644
- color: #fff;
645
- font-weight: 600;
646
- text-transform: uppercase;
647
- padding: 30px 15px 15px 15px;
648
- border-bottom: 1px dashed #2f2f2f;
649
- }
650
- .sp-wpcp-framework .sp-nav-background {
651
- position: absolute;
652
- top: 0;
653
- left: 0;
654
- bottom: 0;
655
- z-index: 9;
656
- width: 225px;
657
- background-color: #222;
658
- }
659
- .sp-wpcp-framework .sp-content {
660
- position: relative;
661
- margin-left: 225px;
662
- }
663
- .sp-wpcp-framework .sp-content .sp-sections {
664
- float: left;
665
- width: 100%;
666
- }
667
- .sp-wpcp-framework .sp-content .sp-section-title {
668
- display: none;
669
- padding: 20px 30px;
670
- background-color: #5bc0de;
671
- }
672
- .sp-wpcp-framework .sp-content .sp-section-title h3 {
673
- color: #fff;
674
- margin: 0;
675
- padding: 0 !important;
676
- font-weight: bold;
677
- text-transform: uppercase;
678
- text-shadow: 1px 1px 0 rgba(68, 167, 197, 0.5);
679
- }
680
- .sp-wpcp-framework .sp-content .sp-section {
681
- display: none;
682
- }
683
- .sp-wpcp-framework .sp-footer {
684
- padding: 20px;
685
- color: #555;
686
- text-align: right;
687
- font-size: 11px;
688
- background-color: #050505;
689
- -moz-border-radius: 0 0 2px 2px;
690
- -webkit-border-radius: 0;
691
- border-radius: 0 0 2px 2px;
692
- }
693
- .sp-wpcp-framework .sp-show-all .sp-nav-background,
694
- .sp-wpcp-framework .sp-show-all .sp-nav {
695
- display: none;
696
- }
697
- .sp-wpcp-framework .sp-show-all .sp-content {
698
- margin-left: 0;
699
- }
700
- .sp-wpcp-framework .sp-show-all .sp-section-title,
701
- .sp-wpcp-framework .sp-show-all .sp-section {
702
- display: block !important;
703
- }
704
- .sp-wpcp-framework .sp-expand-all {
705
- position: absolute;
706
- right: 40px;
707
- bottom: 5px;
708
- z-index: 1;
709
- color: #555;
710
- font-size: 11px;
711
- font-weight: 500;
712
- text-decoration: none;
713
- }
714
- .sp-wpcp-framework .sp-expand-all:hover {
715
- color: #fff;
716
- }
717
- .sp-wpcp-framework .sp-expand-all:focus {
718
- -moz-box-shadow: none;
719
- -webkit-box-shadow: none;
720
- box-shadow: none;
721
- }
722
- .sp-wpcp-framework .sp-element:last-child {
723
- border-bottom: 0 !important;
724
- }
725
-
726
- .sp-metabox-framework {
727
- margin: -6px -12px -12px -12px;
728
- }
729
- .sp-metabox-framework .sp-content .sp-section-title {
730
- padding: 20px;
731
- }
732
-
733
- .sp-element {
734
- position: relative;
735
- padding: 30px;
736
- border-bottom: 1px solid #eee;
737
- }
738
- .sp-element:hover {
739
- background-color: #f9f9f9;
740
- }
741
- .sp-element p:last-child {
742
- margin-bottom: 0 !important;
743
- }
744
- .sp-element:after, .sp-element:before {
745
- content: " ";
746
- display: table;
747
- }
748
- .sp-element:after {
749
- clear: both;
750
- }
751
- .sp-element h4 {
752
- margin-top: 0;
753
- }
754
- .sp-element .sp-title {
755
- position: relative;
756
- width: 25%;
757
- float: left;
758
- }
759
- .sp-element .sp-title h4 {
760
- margin: 0;
761
- color: #23282d;
762
- }
763
- .sp-element .sp-fieldset {
764
- margin-left: 30%;
765
- }
766
- .sp-option-framework .sp-element .sp-fieldset {
767
- margin-left: 25%;
768
- }
769
- .sp-element pre {
770
- clear: both;
771
- color: #ccc;
772
- background-color: #222;
773
- padding: 15px;
774
- overflow: auto;
775
- -moz-border-radius: 2px;
776
- -webkit-border-radius: 2px;
777
- border-radius: 2px;
778
- }
779
- .sp-element pre strong {
780
- color: #ffbc00;
781
- }
782
-
783
- .sp-pseudo-field {
784
- padding: 0 5px 0 0 !important;
785
- border: 0;
786
- display: inline-block;
787
- }
788
-
789
- .sp-field-text input {
790
- width: 340px;
791
- max-width: 100%;
792
- }
793
-
794
- .sp-field-textarea textarea {
795
- width: 100%;
796
- max-width: 100%;
797
- min-height: 125px;
798
- }
799
- .sp-field-textarea .sp-shortcode {
800
- margin-bottom: 10px;
801
- }
802
-
803
- .sp-field-wysiwyg textarea {
804
- width: 100%;
805
- max-width: 100%;
806
- min-height: 125px;
807
- }
808
- .sp-field-wysiwyg .wp-editor-container {
809
- clear: none;
810
- }
811
-
812
- .sp-field-number input {
813
- width: 70px;
814
- }
815
- .sp-field-number em {
816
- margin-left: 5px;
817
- color: #bbb;
818
- }
819
-
820
- .sp-field-select select {
821
- max-width: 100%;
822
- }
823
-
824
- .sp-field-typography select,
825
- .sp-field-typography .chosen-container {
826
- margin-right: 5px;
827
- }
828
- .sp-field-typography .sp-typo-variant {
829
- min-width: 90px;
830
- }
831
-
832
- .sp-field-checkbox ul,
833
- .sp-field-radio ul {
834
- margin: 0;
835
- padding: 0;
836
- list-style-type: none;
837
- overflow-y: auto;
838
- max-height: 305px;
839
- }
840
- .sp-field-checkbox .horizontal li,
841
- .sp-field-radio .horizontal li {
842
- display: inline-block;
843
- margin-right: 15px;
844
- margin-bottom: 15px;
845
- }
846
- .sp-field-checkbox input[type="radio"]:checked:before,
847
- .sp-field-radio input[type="radio"]:checked:before {
848
- line-height: 10px;
849
- }
850
-
851
- .sp-field-switcher label {
852
- display: block;
853
- float: left;
854
- cursor: pointer;
855
- position: relative;
856
- width: 62px;
857
- height: 26px;
858
- padding: 0;
859
- margin: 0;
860
- overflow: hidden;
861
- -moz-border-radius: 20px;
862
- -webkit-border-radius: 20px;
863
- border-radius: 20px;
864
- }
865
- .sp-field-switcher label span {
866
- position: absolute;
867
- top: 4px;
868
- left: 4px;
869
- width: 18px;
870
- height: 18px;
871
- background-color: #fff;
872
- -moz-border-radius: 16px;
873
- -webkit-border-radius: 16px;
874
- border-radius: 16px;
875
- -moz-transition: left 0.15s ease-out;
876
- -o-transition: left 0.15s ease-out;
877
- -webkit-transition: left 0.15s ease-out;
878
- transition: left 0.15s ease-out;
879
- }
880
- .sp-field-switcher label input {
881
- position: absolute;
882
- top: 0;
883
- left: 0;
884
- opacity: 0;
885
- }
886
- .sp-field-switcher label input:checked ~ em {
887
- background: #4fb845;
888
- }
889
- .sp-field-switcher label input:checked ~ em:before {
890
- opacity: 0;
891
- }
892
- .sp-field-switcher label input:checked ~ em:after {
893
- opacity: 1;
894
- }
895
- .sp-field-switcher label input:checked ~ span {
896
- left: 40px;
897
- }
898
- .sp-field-switcher label em {
899
- position: relative;
900
- display: block;
901
- height: inherit;
902
- font-size: 11px;
903
- line-height: 26px;
904
- font-weight: 500;
905
- font-style: normal;
906
- text-transform: uppercase;
907
- color: #fff;
908
- background-color: #ed6f6f;
909
- -moz-transition: background 0.15s ease-out;
910
- -o-transition: background 0.15s ease-out;
911
- -webkit-transition: background 0.15s ease-out;
912
- transition: background 0.15s ease-out;
913
- }
914
- .sp-field-switcher label em:before, .sp-field-switcher label em:after {
915
- position: absolute;
916
- -moz-transition: opacity 0.15s ease-out;
917
- -o-transition: opacity 0.15s ease-out;
918
- -webkit-transition: opacity 0.15s ease-out;
919
- transition: opacity 0.15s ease-out;
920
- }
921
- .sp-field-switcher label em:before {
922
- content: attr(data-off);
923
- right: 14px;
924
- }
925
- .sp-field-switcher label em:after {
926
- content: attr(data-on);
927
- left: 14px;
928
- opacity: 0;
929
- }
930
- .sp-field-switcher .sp-text-desc {
931
- float: left;
932
- margin-left: 5px;
933
- margin-top: 0;
934
- padding-top: 4px;
935
- }
936
-
937
- .sp-field-image_select label {
938
- display: inline-block;
939
- margin: 5px;
940
- }
941
- .sp-field-image_select label img {
942
- max-width: 100%;
943
- vertical-align: bottom;
944
- background-color: #fff;
945
- border: 2px solid #eee;
946
- opacity: 0.75;
947
- -moz-transition: all 0.15s ease-out;
948
- -o-transition: all 0.15s ease-out;
949
- -webkit-transition: all 0.15s ease-out;
950
- transition: all 0.15s ease-out;
951
- }
952
- .sp-field-image_select label img[alt=readmore_one_view],
953
- .sp-field-image_select label img[alt=readmore_two_view],
954
- .sp-field-image_select label img[alt=readmore_three_view],
955
- .sp-field-image_select label img[alt=readmore_four_view],
956
- .sp-field-image_select label img[alt=readmore_five_view],
957
- .sp-field-image_select label img[alt=readmore_six_view]{
958
- border: 0px solid;
959
- opacity: 1;
960
- }
961
- .sp-field-image_select input {
962
- display: none;
963
- }
964
- .sp-field-image_select input:checked ~ img {
965
- border-color: #52b3d9;
966
- opacity: 1;
967
- }
968
-
969
- .sp-field-upload input {
970
- width: 420px;
971
- max-width: 100%;
972
- }
973
-
974
- .sp-field-background .sp-field-color_picker {
975
- position: relative;
976
- top: 10px;
977
- }
978
-
979
- .sp-field-color_picker .sp-alpha-wrap {
980
- display: none;
981
- position: relative;
982
- top: -1px;
983
- width: 235px;
984
- padding: 9px 10px;
985
- border: 1px solid #dfdfdf;
986
- border-top: none;
987
- background-color: #fff;
988
- }
989
- .sp-field-color_picker .sp-alpha-slider {
990
- position: absolute;
991
- width: 190px;
992
- margin-left: 2px;
993
- height: 18px;
994
- }
995
- .sp-field-color_picker .sp-alpha-slider .ui-slider-handle {
996
- position: absolute;
997
- top: -3px;
998
- bottom: -3px;
999
- z-index: 5;
1000
- border-color: #aaa;
1001
- border-style: solid;
1002
- border-width: 4px 3px;
1003
- width: 10px;
1004
- height: 16px;
1005
- margin: 0 -5px;
1006
- background: none;
1007
- cursor: ew-resize;
1008
- opacity: 0.9;
1009
- -moz-border-radius: 4px;
1010
- -webkit-border-radius: 4px;
1011
- border-radius: 4px;
1012
- -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
1013
- -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
1014
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
1015
- }
1016
- .sp-field-color_picker .sp-alpha-slider .ui-slider-handle:before {
1017
- content: " ";
1018
- position: absolute;
1019
- left: -2px;
1020
- right: -2px;
1021
- top: -3px;
1022
- bottom: -3px;
1023
- border: 2px solid #fff;
1024
- -moz-border-radius: 3px;
1025
- -webkit-border-radius: 3px;
1026
- border-radius: 3px;
1027
- }
1028
- .sp-field-color_picker .sp-alpha-slider-offset {
1029
- height: 18px;
1030
- width: 200px;
1031
- background: url(../images/checkerboard.png) repeat-y center left scroll #fff;
1032
- -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.4) inset;
1033
- -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.4) inset;
1034
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.4) inset;
1035
- -moz-border-radius: 2px;
1036
- -webkit-border-radius: 2px;
1037
- border-radius: 2px;
1038
- }
1039
- .sp-field-color_picker .sp-alpha-text {
1040
- position: absolute;
1041
- top: 12px;
1042
- right: 10px;
1043
- width: 30px;
1044
- font-size: 12px;
1045
- line-height: 12px;
1046
- text-align: center;
1047
- color: #999;
1048
- }
1049
-
1050
- .sp-field-backup textarea {
1051
- width: 100%;
1052
- min-height: 200px;
1053
- margin-bottom: 5px;
1054
- }
1055
- .sp-field-backup small {
1056
- display: inline-block;
1057
- margin: 5px;
1058
- }
1059
- .sp-field-backup hr {
1060
- margin: 30px 0;
1061
- }
1062
-
1063
- .sp-field-fieldset .sp-inner {
1064
- border: 1px solid #eee;
1065
- background-color: #fff;
1066
- }
1067
- .sp-field-fieldset .sp-element {
1068
- padding: 20px;
1069
- }
1070
-
1071
- .sp-field-group .sp-element {
1072
- padding: 20px;
1073
- }
1074
- .sp-field-group .sp-group {
1075
- display: none;
1076
- position: relative;
1077
- margin-bottom: 5px;
1078
- }
1079
- .sp-field-group .sp-group h4 {
1080
- font-size: 1em;
1081
- }
1082
- .sp-field-group .sp-group-content {
1083
- border: 1px solid #e5e5e5;
1084
- background: #fff;
1085
- }
1086
- .sp-field-group .sp-group-title {
1087
- border: 1px solid #e5e5e5;
1088
- background: #fafafa;
1089
- -moz-transition: border-color 0.15s;
1090
- -o-transition: border-color 0.15s;
1091
- -webkit-transition: border-color 0.15s;
1092
- transition: border-color 0.15s;
1093
- }
1094
- .sp-group-title.ui-accordion-header-active,
1095
- .sp-field-group .sp-group-title:active,
1096
- .sp-field-group .sp-group-title:hover,
1097
- .sp-field-group .sp-group-title:focus {
1098
- outline: none;
1099
- border: 1px solid #d3d8dc;
1100
- background: #e8ecef;
1101
- }
1102
- .sp-field-group .sp-group-title {
1103
- display: block;
1104
- cursor: pointer;
1105
- position: relative;
1106
- margin: 0;
1107
- padding: 15px;
1108
- min-height: 0;
1109
- font-size: 100%;
1110
- }
1111
- .sp-field-group .sp-group-content {
1112
- padding: 0;
1113
- border-top: 0;
1114
- }
1115
- .sp-field-group .widget-placeholder {
1116
- margin-bottom: 8px;
1117
- }
1118
- .sp-field-group .ui-accordion .sp-group {
1119
- display: block;
1120
- }
1121
- .sp-field-group .ui-accordion-icons {
1122
- padding-left: 30px;
1123
- }
1124
- .sp-field-group .ui-accordion-header-icon {
1125
- position: absolute;
1126
- left: .5em;
1127
- top: 50%;
1128
- margin-top: -10px;
1129
- text-indent: 0;
1130
- color: #bbb;
1131
- }
1132
- .sp-field-group .ui-sortable-helper .sp-group-content {
1133
- display: none !important;
1134
- }
1135
-
1136
- .sp-help {
1137
- position: absolute;
1138
- top: 5px;
1139
- right: 5px;
1140
- padding: 5px;
1141
- font-size: 14px;
1142
- color: #aaa;
1143
- }
1144
-
1145
- .sp-field-heading {
1146
- font-size: 1.5em;
1147
- font-weight: bold;
1148
- color: #23282d;
1149
- background-color: #f5f5f5 !important;
1150
- }
1151
-
1152
- .sp-field-subheading {
1153
- font-size: 14px;
1154
- font-weight: bold;
1155
- padding-top: 17px;
1156
- padding-bottom: 17px;
1157
- color: #23282d;
1158
- background-color: #f7f7f7 !important;
1159
- }
1160
-
1161
- .sp-field-notice {
1162
- padding: 0 !important;
1163
- border: 0 !important;
1164
- margin-top: -1px;
1165
- }
1166
- .sp-field-notice .sp-notice {
1167
- font-size: 12px;
1168
- padding: 17px 30px;
1169
- border-top: 1px solid transparent;
1170
- border-bottom: 1px solid transparent;
1171
- }
1172
- .sp-field-notice .sp-success {
1173
- color: #3c763d;
1174
- border-color: #d6e9c6;
1175
- background-color: #dff0d8;
1176
- }
1177
- .sp-field-notice .sp-info {
1178
- color: #31708f;
1179
- border-color: #bce8f1;
1180
- background-color: #d9edf7;
1181
- }
1182
- .sp-field-notice .sp-warning {
1183
- color: #8a6d3b;
1184
- border-color: #faebcc;
1185
- background-color: #fcf8e3;
1186
- }
1187
- .sp-field-notice .sp-danger {
1188
- border-color: #ebccd1;
1189
- background-color: #f2dede;
1190
- }
1191
- .sp-field-notice .sp-danger,
1192
- .sp-danger {
1193
- color: #a94442;
1194
- }
1195
-
1196
- .sp-field-icon input {
1197
- display: none;
1198
- }
1199
- .sp-field-icon .button {
1200
- margin-right: 5px;
1201
- }
1202
- .sp-field-icon .sp-icon-preview i {
1203
- display: inline-block;
1204
- font-size: 14px;
1205
- width: 30px;
1206
- height: 26px;
1207
- line-height: 26px;
1208
- margin-right: 5px;
1209
- text-align: center;
1210
- vertical-align: top;
1211
- color: #555;
1212
- border: 1px solid #ccc;
1213
- background-color: #f7f7f7;
1214
- -moz-border-radius: 3px;
1215
- -webkit-border-radius: 3px;
1216
- border-radius: 3px;
1217
- -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1218
- -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1219
- box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1220
- }
1221
-
1222
- .sp-field-image input {
1223
- display: none;
1224
- }
1225
- .sp-field-image .sp-preview {
1226
- display: inline-block;
1227
- position: relative;
1228
- padding: 4px;
1229
- min-width: 44px;
1230
- min-height: 22px;
1231
- margin-bottom: 10px;
1232
- border: 1px solid #ccc;
1233
- background-color: #f9f9f9;
1234
- -moz-border-radius: 2px;
1235
- -webkit-border-radius: 2px;
1236
- border-radius: 2px;
1237
- -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1238
- -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1239
- box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1240
- }
1241
- .sp-field-image .sp-preview img {
1242
- max-height: 90px;
1243
- display: inline-block;
1244
- vertical-align: middle;
1245
- }
1246
- .sp-field-image .sp-remove {
1247
- position: absolute;
1248
- top: 4px;
1249
- right: 4px;
1250
- width: 22px;
1251
- height: 22px;
1252
- font-size: 11px;
1253
- line-height: 22px;
1254
- text-align: center;
1255
- cursor: pointer;
1256
- color: #fff;
1257
- background-color: #e14d43;
1258
- opacity: 0.8;
1259
- -moz-border-radius: 2px;
1260
- -webkit-border-radius: 2px;
1261
- border-radius: 2px;
1262
- -moz-transition: opacity 0.2s;
1263
- -o-transition: opacity 0.2s;
1264
- -webkit-transition: opacity 0.2s;
1265
- transition: opacity 0.2s;
1266
- }
1267
- .sp-field-image .sp-remove:hover {
1268
- opacity: 1;
1269
- }
1270
-
1271
- .sp-field-gallery input {
1272
- display: none;
1273
- }
1274
- .sp-field-gallery ul {
1275
- margin: 0;
1276
- padding: 0;
1277
- list-style-type: none;
1278
- }
1279
- .sp-field-gallery ul.sp-gallery-images li {
1280
- display: inline-block;
1281
- position: relative;
1282
- padding: 4px;
1283
- margin: 0 5px 10px 0;
1284
- border: 1px solid #ccc;
1285
- background-color: #f9f9f9;
1286
- -moz-border-radius: 2px;
1287
- -webkit-border-radius: 2px;
1288
- border-radius: 2px;
1289
- -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1290
- -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1291
- box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1292
- }
1293
- .sp-field-gallery ul.sp-gallery-images li img {
1294
- max-height: 100px;
1295
- display: inline-block;
1296
- vertical-align: middle;
1297
- }
1298
- .sp-field-gallery .button {
1299
- margin-right: 5px;
1300
- margin-bottom: 5px;
1301
- }
1302
-
1303
- .sp-field-sorter .ui-sortable-placeholder {
1304
- height: 20px;
1305
- border: 1px dashed #f1c40f;
1306
- background-color: #fffae4;
1307
- }
1308
- .sp-field-sorter .sp-modules {
1309
- float: left;
1310
- width: 50%;
1311
- }
1312
- .sp-field-sorter .sp-enabled {
1313
- margin-right: 15px;
1314
- }
1315
- .sp-field-sorter .sp-disabled,
1316
- .sp-field-sorter .sp-enabled {
1317
- padding: 5px 15px;
1318
- border: 1px dashed #ddd;
1319
- background-color: #fff;
1320
- }
1321
- .sp-field-sorter .sp-disabled li {
1322
- -moz-transition: opacity 0.15s;
1323
- -o-transition: opacity 0.15s;
1324
- -webkit-transition: opacity 0.15s;
1325
- transition: opacity 0.15s;
1326
- opacity: 0.5;
1327
- }
1328
- .sp-field-sorter .sp-disabled .ui-sortable-helper {
1329
- opacity: 1;
1330
- }
1331
- .sp-field-sorter h3 {
1332
- font-size: 14px;
1333
- margin: 0 0 15px 0;
1334
- }
1335
- .sp-field-sorter ul {
1336
- list-style-type: none;
1337
- margin: 0;
1338
- padding: 0;
1339
- min-height: 62px;
1340
- }
1341
- .sp-field-sorter ul li {
1342
- margin: 10px 0;
1343
- padding: 10px 15px;
1344
- cursor: move;
1345
- font-weight: bold;
1346
- text-align: center;
1347
- border: 1px solid #e5e5e5;
1348
- background-color: #fafafa;
1349
- -moz-transition: border-color 0.15s;
1350
- -o-transition: border-color 0.15s;
1351
- -webkit-transition: border-color 0.15s;
1352
- transition: border-color 0.15s;
1353
- }
1354
- .sp-field-sorter ul li:hover {
1355
- border-color: #bbb;
1356
- }
1357
-
1358
- .sp-taxonomy {
1359
- margin: 0;
1360
- }
1361
- .sp-taxonomy > .sp-element {
1362
- border-bottom: 0;
1363
- }
1364
- .sp-taxonomy > .sp-element:hover {
1365
- background: none;
1366
- }
1367
- .sp-taxonomy > .sp-field-heading {
1368
- font-size: 1.1em;
1369
- padding: 20px !important;
1370
- border: 1px solid #ddd;
1371
- }
1372
- .sp-taxonomy > .sp-field-subheading {
1373
- font-size: 12px;
1374
- padding: 15px !important;
1375
- border: 1px solid #ddd;
1376
- }
1377
- .sp-taxonomy > .sp-field-notice .sp-notice {
1378
- padding: 15px;
1379
- border-left-width: 1px;
1380
- border-left-style: solid;
1381
- border-right-width: 1px;
1382
- border-right-style: solid;
1383
- }
1384
-
1385
- .sp-taxonomy-add-fields > .sp-element {
1386
- padding: 8px 0;
1387
- margin: 0 0 10px;
1388
- }
1389
- .sp-taxonomy-add-fields > .sp-element > .sp-title {
1390
- float: none;
1391
- width: 100%;
1392
- padding: 2px 2px 4px 0;
1393
- }
1394
- .sp-taxonomy-add-fields > .sp-element > .sp-title h4 {
1395
- font-size: 12px;
1396
- font-weight: normal;
1397
- }
1398
- .sp-taxonomy-add-fields > .sp-element > .sp-fieldset {
1399
- margin-left: 0;
1400
- }
1401
- .sp-taxonomy-add-fields > .sp-element > .sp-fieldset > .sp-help {
1402
- right: -5px;
1403
- }
1404
-
1405
- .sp-taxonomy-edit-fields > .sp-element {
1406
- padding: 20px 0;
1407
- border-bottom: 0;
1408
- }
1409
- .sp-taxonomy-edit-fields > .sp-element > .sp-title {
1410
- width: 225px;
1411
- }
1412
- .sp-taxonomy-edit-fields > .sp-element > .sp-title h4 {
1413
- font-size: 14px;
1414
- font-weight: 600;
1415
- line-height: 1.3;
1416
- display: inline-block;
1417
- vertical-align: middle;
1418
- }
1419
- .sp-taxonomy-edit-fields > .sp-element > .sp-fieldset {
1420
- margin-left: 225px;
1421
- }
1422
- .sp-taxonomy-edit-fields > .sp-element > .sp-fieldset > .sp-help {
1423
- top: -5px;
1424
- right: -5px;
1425
- }
1426
- .sp-taxonomy-edit-fields > .sp-field-notice {
1427
- margin: 20px 0;
1428
- }
1429
- .sp-taxonomy-edit-fields > .sp-field-subheading,
1430
- .sp-taxonomy-edit-fields > .sp-field-heading {
1431
- margin: 20px 0;
1432
- border: 1px solid #ddd;
1433
- }
1434
-
1435
- .sp-warning-primary {
1436
- color: #fff;
1437
- border-color: #d02c21 #ba281e #ba281e;
1438
- background: #e14d43;
1439
- -moz-box-shadow: 0 1px 0 #ba281e;
1440
- -webkit-box-shadow: 0 1px 0 #ba281e;
1441
- box-shadow: 0 1px 0 #ba281e;
1442
- text-shadow: 0 -1px 1px #ba281e, 1px 0 1px #ba281e, 0 1px 1px #ba281e, -1px 0 1px;
1443
- text-shadow: 0 -1px 1px #ba281e, 1px 0 1px #ba281e, 0 1px 1px #ba281e, -1px 0 1px #ba281e;
1444
- }
1445
- .sp-warning-primary:hover, .sp-warning-primary:focus {
1446
- border-color: #ba281e;
1447
- background: #e35950;
1448
- -moz-box-shadow: 0 1px 0 #ba281e;
1449
- -webkit-box-shadow: 0 1px 0 #ba281e;
1450
- box-shadow: 0 1px 0 #ba281e;
1451
- }
1452
- .sp-warning-primary:active {
1453
- border-color: #ba281e;
1454
- background: #d02c21;
1455
- -moz-box-shadow: inset 0 2px 0 #ba281e;
1456
- -webkit-box-shadow: inset 0 2px 0 #ba281e;
1457
- box-shadow: inset 0 2px 0 #ba281e;
1458
- }
1459
-
1460
- .sp-text-desc {
1461
- font-style: italic;
1462
- font-weight: 400;
1463
- margin-top: 10px;
1464
- color: #999;
1465
- }
1466
-
1467
- .sp-text-success {
1468
- color: #2b542c;
1469
- }
1470
-
1471
- .sp-text-info {
1472
- color: #31708f;
1473
- }
1474
-
1475
- .sp-text-warning {
1476
- color: #d02c21;
1477
- }
1478
-
1479
- .sp-text-muted {
1480
- color: #aaa;
1481
- }
1482
-
1483
- .sp-text-left {
1484
- text-align: left;
1485
- }
1486
-
1487
- .sp-text-center {
1488
- text-align: center;
1489
- }
1490
-
1491
- .sp-text-right {
1492
- text-align: right;
1493
- }
1494
-
1495
- .sp-block-left {
1496
- float: left;
1497
- }
1498
-
1499
- .sp-block-right {
1500
- float: right;
1501
- }
1502
-
1503
- .sp-text-highlight {
1504
- padding: 2px 4px;
1505
- font-size: 90%;
1506
- color: #c7254e;
1507
- background-color: #f9f2f4;
1508
- -moz-border-radius: 2px;
1509
- -webkit-border-radius: 2px;
1510
- border-radius: 2px;
1511
- }
1512
-
1513
- .sp-text-highlight-gray {
1514
- padding: 2px 4px;
1515
- font-size: 90%;
1516
- background-color: #f0f0f0;
1517
- -moz-border-radius: 2px;
1518
- -webkit-border-radius: 2px;
1519
- border-radius: 2px;
1520
- }
1521
-
1522
- #sp-save-ajax {
1523
- display: none;
1524
- position: relative;
1525
- top: 4px;
1526
- right: 5px;
1527
- font-size: 12px;
1528
- padding: 3px 8px;
1529
- color: #fff;
1530
- background-color: #27ae60;
1531
- -moz-border-radius: 2px;
1532
- -webkit-border-radius: 2px;
1533
- border-radius: 2px;
1534
- }
1535
-
1536
- .sp-tooltip {
1537
- position: absolute;
1538
- z-index: 100103;
1539
- display: block;
1540
- visibility: visible;
1541
- font-size: 12px;
1542
- line-height: 1.4;
1543
- opacity: 0;
1544
- -moz-transition: opacity 0.15s linear;
1545
- -o-transition: opacity 0.15s linear;
1546
- -webkit-transition: opacity 0.15s linear;
1547
- transition: opacity 0.15s linear;
1548
- }
1549
- .sp-tooltip.in {
1550
- opacity: 1;
1551
- }
1552
-
1553
- .sp-tooltip-inner {
1554
- max-width: 200px;
1555
- padding: 6px 12px;
1556
- color: #fff;
1557
- text-align: center;
1558
- text-decoration: none;
1559
- background-color: #000;
1560
- background-color: rgba(0, 0, 0, 0.85);
1561
- -moz-border-radius: 4px;
1562
- -webkit-border-radius: 4px;
1563
- border-radius: 4px;
1564
- }
1565
-
1566
- .sp-dialog {
1567
- display: none;
1568
- padding: 0;
1569
- }
1570
- .sp-dialog .sp-dialog-header {
1571
- width: 100%;
1572
- padding: 16px 0;
1573
- background-color: #f5f5f5;
1574
- border-bottom: 1px solid #eee;
1575
- }
1576
- .sp-dialog .sp-dialog-header select,
1577
- .sp-dialog .sp-dialog-header .chosen-container {
1578
- display: block;
1579
- margin: 0 auto;
1580
- width: 250px !important;
1581
- }
1582
- .sp-dialog .sp-element {
1583
- padding: 15px 30px 15px 15px;
1584
- }
1585
- .sp-dialog .sp-insert-button {
1586
- text-align: center;
1587
- width: 100%;
1588
- padding: 16px 0;
1589
- background-color: #f5f5f5;
1590
- border-top: 1px solid #eee;
1591
- }
1592
- .sp-dialog .sp-dialog-load {
1593
- min-height: 250px;
1594
- overflow: hidden;
1595
- overflow-y: auto;
1596
- }
1597
- .sp-dialog .sp-clone-button {
1598
- margin: 10px 0;
1599
- text-align: center;
1600
- }
1601
- .sp-dialog .sp-shortcode-clone {
1602
- position: relative;
1603
- border-top: 1px dashed #5cb85c;
1604
- }
1605
- .sp-dialog .sp-shortcode-clone .sp-remove-clone {
1606
- display: none;
1607
- position: absolute;
1608
- right: 5px;
1609
- top: 5px;
1610
- z-index: 1;
1611
- padding: 5px;
1612
- color: #ed6f6f;
1613
- font-size: 14px;
1614
- }
1615
- .sp-dialog .sp-shortcode-clone .sp-remove-clone:hover {
1616
- text-decoration: none;
1617
- color: #e74242;
1618
- }
1619
- .sp-dialog a:active, .sp-dialog a:focus {
1620
- outline: none;
1621
- -moz-box-shadow: none;
1622
- -webkit-box-shadow: none;
1623
- box-shadow: none;
1624
- }
1625
- .sp-dialog h4 {
1626
- font-size: 13px;
1627
- }
1628
- .sp-dialog h4 small {
1629
- font-style: italic;
1630
- font-weight: 400;
1631
- color: #aaa;
1632
- }
1633
-
1634
- #sp-icon-dialog .sp-icon-search {
1635
- width: 250px;
1636
- height: 40px;
1637
- line-height: 40px;
1638
- }
1639
- #sp-icon-dialog a {
1640
- display: inline-block;
1641
- padding: 5px;
1642
- cursor: pointer;
1643
- }
1644
- #sp-icon-dialog a .sp-icon {
1645
- position: relative;
1646
- padding: 5px;
1647
- display: inline-block;
1648
- font-size: 14px;
1649
- width: 30px;
1650
- height: 26px;
1651
- line-height: 26px;
1652
- text-align: center;
1653
- vertical-align: top;
1654
- color: #555;
1655
- border: 1px solid #ccc;
1656
- background-color: #f7f7f7;
1657
- -moz-border-radius: 3px;
1658
- -webkit-border-radius: 3px;
1659
- border-radius: 3px;
1660
- -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1661
- -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1662
- box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1663
- }
1664
- #sp-icon-dialog a:hover .sp-icon {
1665
- color: #fff;
1666
- border-color: #222;
1667
- background-color: #222;
1668
- }
1669
- #sp-icon-dialog .sp-icon-loading {
1670
- color: #999;
1671
- text-align: center;
1672
- margin-top: 10px;
1673
- }
1674
- #sp-icon-dialog .sp-icon-title {
1675
- padding: 15px;
1676
- margin: 10px 0;
1677
- text-align: center;
1678
- text-transform: uppercase;
1679
- border-top: 1px solid #eee;
1680
- border-bottom: 1px solid #eee;
1681
- background-color: #fafafa;
1682
- }
1683
- #sp-icon-dialog .sp-icon-title:first-child {
1684
- margin-top: 0;
1685
- border-top: 0;
1686
- }
1687
-
1688
- .sp-shortcode-scrolling,
1689
- .sp-icon-scrolling {
1690
- overflow: hidden;
1691
- height: 100%;
1692
- }
1693
- .sp-shortcode-scrolling .wp-full-overlay,
1694
- .sp-icon-scrolling .wp-full-overlay {
1695
- z-index: 1;
1696
- }
1697
-
1698
- #side-sortables .sp-content .sp-section-title {
1699
- padding: 12px;
1700
- }
1701
- #side-sortables .sp-element {
1702
- padding: 12px;
1703
- }
1704
- #side-sortables .sp-element .sp-title {
1705
- float: none;
1706
- width: 100%;
1707
- margin-bottom: 10px;
1708
- }
1709
- #side-sortables .sp-element .sp-fieldset {
1710
- margin-left: 0;
1711
- }
1712
- #side-sortables .sp-field-upload input {
1713
- width: 185px;
1714
- }
1715
- #side-sortables .sp-field-notice .sp-notice {
1716
- padding: 12px;
1717
- }
1718
-
1719
- .widget-content .sp-element {
1720
- position: relative;
1721
- top: -1px;
1722
- margin-right: -15px;
1723
- margin-left: -15px;
1724
- padding: 12px 15px;
1725
- }
1726
- .widget-content .sp-element:last-child {
1727
- margin-bottom: 15px;
1728
- }
1729
- .widget-content .sp-element .sp-title {
1730
- float: none;
1731
- width: 100%;
1732
- margin-bottom: 5px;
1733
- }
1734
- .widget-content .sp-element .sp-fieldset {
1735
- margin-left: 0;
1736
- }
1737
- .widget-content .sp-field-text input {
1738
- width: 100%;
1739
- }
1740
- .widget-content .sp-field-upload input {
1741
- width: 330px;
1742
- }
1743
- .widget-content .sp-field-notice .sp-notice {
1744
- padding: 15px;
1745
- }
1746
-
1747
- #customize-controls .customize-control-sp_field {
1748
- position: relative;
1749
- top: -10px;
1750
- margin-bottom: 0;
1751
- }
1752
- #customize-controls .customize-control-sp_field:last-child {
1753
- margin-bottom: -25px;
1754
- }
1755
- #customize-controls .customize-control-sp_field:last-child .sp-element {
1756
- border-bottom: none;
1757
- }
1758
- #customize-controls .customize-control-sp_field .chosen-container.chosen-with-drop .chosen-drop {
1759
- position: relative;
1760
- }
1761
- #customize-controls .sp-element {
1762
- margin-right: -20px;
1763
- margin-left: -20px;
1764
- padding: 12px 15px;
1765
- }
1766
- #customize-controls .sp-element .sp-title {
1767
- float: none;
1768
- width: 100%;
1769
- margin-bottom: 10px;
1770
- }
1771
- #customize-controls .sp-element .sp-title h4 {
1772
- font-size: 14px;
1773
- font-weight: 600;
1774
- color: inherit;
1775
- }
1776
- #customize-controls .sp-element .sp-fieldset {
1777
- margin-left: 0;
1778
- }
1779
- #customize-controls .widget-content .sp-element {
1780
- margin-right: -10px;
1781
- margin-left: -10px;
1782
- padding: 10px 12px;
1783
- }
1784
- #customize-controls .sp-field-select select {
1785
- width: 100%;
1786
- }
1787
- #customize-controls .sp-field-upload input {
1788
- width: 175px;
1789
- margin-right: 5px;
1790
- }
1791
- #customize-controls .sp-field-heading {
1792
- color: inherit;
1793
- font-size: 14px;
1794
- line-height: 1em;
1795
- }
1796
- #customize-controls .sp-field-subheading {
1797
- color: inherit;
1798
- font-size: 11px;
1799
- }
1800
- #customize-controls .sp-text-desc {
1801
- margin-top: 4px;
1802
- font-size: 12px;
1803
- }
1804
- #customize-controls .sp-field-content,
1805
- #customize-controls .sp-field-notice .sp-notice {
1806
- padding: 15px;
1807
- }
1808
-
1809
- @media only screen and (max-width: 1200px) {
1810
- .sp-metabox-framework .sp-element .sp-title {
1811
- float: none;
1812
- width: 100%;
1813
- margin-bottom: 10px;
1814
- }
1815
- .sp-metabox-framework .sp-element .sp-fieldset {
1816
- margin-left: 0;
1817
- }
1818
- }
1819
- @media only screen and (max-width: 782px) {
1820
- .sp-wpcp-framework .sp-header {
1821
- text-align: center;
1822
- }
1823
- .sp-wpcp-framework .sp-header h1 {
1824
- width: 100%;
1825
- margin-bottom: 10px;
1826
- }
1827
- .sp-wpcp-framework .sp-header fieldset {
1828
- float: none;
1829
- }
1830
- .sp-wpcp-framework .sp-expand-all,
1831
- .sp-wpcp-framework .sp-nav-background,
1832
- .sp-wpcp-framework .sp-nav {
1833
- display: none;
1834
- }
1835
- .sp-wpcp-framework .sp-content {
1836
- margin-left: 0;
1837
- }
1838
- .sp-wpcp-framework .sp-section-title,
1839
- .sp-wpcp-framework .sp-section {
1840
- display: block !important;
1841
- }
1842
- .sp-wpcp-framework .sp-element .sp-title {
1843
- float: none;
1844
- width: 100%;
1845
- margin-bottom: 10px;
1846
- }
1847
- .sp-wpcp-framework .sp-element .sp-fieldset {
1848
- margin-left: 0;
1849
- }
1850
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/assets/css/sp-style.css DELETED
@@ -1,113 +0,0 @@
1
- .sp-element .chosen-container-single .chosen-single,
2
- .sp-element .chosen-container-active.chosen-with-drop .chosen-single{
3
- background-image: none;
4
- -webkit-box-shadow: none;
5
- box-shadow: none;
6
- background: #fff;
7
- border-color: #d1d1d1;
8
- border-radius: 1px;
9
- height: 36px;
10
- line-height: 34px;
11
- padding-left: 12px;
12
- }
13
- .sp-element .chosen-container-single .chosen-single div{
14
- top: 7px;
15
- }
16
- .sp-element .chosen-container .chosen-results {
17
- padding: 0;
18
- margin: 0;
19
- border-top: 1px solid #d1d1d1;
20
- }
21
- .sp-element .chosen-container .chosen-results li {
22
- padding: 10px 14px;
23
- }
24
- .sp-element li.highlighted,
25
- .sp-element .chosen-container .chosen-results li.highlighted{
26
- background-color: #52b3d9;
27
- background-image: none;
28
- }
29
- .sp-element .chosen-container .chosen-drop{
30
- border-color: #d1d1d1;
31
- }
32
- .sp-element.sp-field-number input{
33
- background: #fff;
34
- border-color: #d1d1d1;
35
- height: 36px;
36
- line-height: 34px;
37
- padding-left: 12px;
38
- }
39
- .sp-element .chosen-container-multi .chosen-drop .result-selected{
40
- display: none;
41
- }
42
- .sp-element .chosen-container-multi .chosen-choices{
43
- background: #fff;
44
- border-color: #d1d1d1;
45
- border-radius: 1px;
46
- line-height: 34px;
47
- box-shadow: 0 0 0;
48
- }
49
- .sp-element .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
50
- top: 9px;
51
- transition: inherit;
52
- }
53
- .sp-element .chosen-container-multi .chosen-choices li.search-choice {
54
- margin: 5px 0 0 5px;
55
- border: 0;
56
- background: #e5e5e5;
57
- padding: 8px 22px 8px 8px;
58
- -webkit-box-shadow: none;
59
- box-shadow: none;
60
- }
61
- .sp-element input[type="text"] {
62
- padding: 8px 12px!important;
63
- min-height: 36px;
64
- }
65
- .sp-field-upload .sp-add {
66
- height: 35px;
67
- line-height: 2.5;
68
- }
69
- .sp-element .wp-picker-container input[type=text].wp-color-picker{
70
- width: 76px;
71
- padding: 7px 8px!important;
72
- min-height: 32px;
73
- }
74
- .sp-element .chosen-container-multi .chosen-choices{
75
- padding: 0;
76
- }
77
-
78
- .sp-wpcp-select-wrapper{
79
- position: relative;
80
- }
81
-
82
- .sp-wpcp-select-wrapper:after{
83
- content: " ";
84
- position: absolute;
85
- right: 21px;
86
- bottom: 19px;
87
- z-index: 2;
88
- pointer-events: none;
89
- width: 0;
90
- height: 0;
91
- border-style: solid;
92
- border-width: 5.9px 3px 0 3px;
93
- border-color: #828282 transparent transparent transparent;
94
- pointer-events: none;
95
- }
96
-
97
- .sp-field-background_adv .sp-field-select_typo select,
98
- .sp-element select.sp-wpcp-select-css{
99
- max-width: 100%;
100
- -webkit-appearance: none;
101
- -moz-appearance: none;
102
- appearance: none;
103
- padding: 0 30px 0 12px;
104
- border: 1px solid #d1d1d1;
105
- border-radius: 1px;
106
- line-height: 34px;
107
- height: 36px;
108
- background: #fff;
109
- margin: 0 5px 4px 0;
110
- background-image: none;
111
- -webkit-box-shadow: none;
112
- box-shadow: none;
113
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/assets/images/chosen-sprite.png DELETED
Binary file
admin/views/meta-box/assets/js/dependency.js DELETED
@@ -1,98 +0,0 @@
1
- /*! Copyright 2012, Ben Lin (http://dreamerslab.com/)
2
- * Licensed under the MIT License (LICENSE.txt).
3
- *
4
- * Version: 1.0.16
5
- *
6
- * Requires: jQuery >= 1.2.3
7
- */
8
- ( function ( $ ){
9
- $.fn.addBack = $.fn.addBack || $.fn.andSelf;
10
-
11
- $.fn.extend({
12
-
13
- actual : function ( method, options ){
14
- // check if the jQuery method exist
15
- if( !this[ method ]){
16
- throw '$.actual => The jQuery method "' + method + '" you called does not exist';
17
- }
18
-
19
- var defaults = {
20
- absolute : false,
21
- clone : false,
22
- includeMargin : false
23
- };
24
-
25
- var configs = $.extend( defaults, options );
26
-
27
- var $target = this.eq( 0 );
28
- var fix, restore;
29
-
30
- if( configs.clone === true ){
31
- fix = function (){
32
- var style = 'position: absolute !important; top: -1000 !important; ';
33
-
34
- // this is useful with css3pie
35
- $target = $target.
36
- clone().
37
- attr( 'style', style ).
38
- appendTo( 'body' );
39
- };
40
-
41
- restore = function (){
42
- // remove DOM element after getting the width
43
- $target.remove();
44
- };
45
- }else{
46
- var tmp = [];
47
- var style = '';
48
- var $hidden;
49
-
50
- fix = function (){
51
- // get all hidden parents
52
- $hidden = $target.parents().addBack().filter( ':hidden' );
53
- style += 'visibility: hidden !important; display: block !important; ';
54
-
55
- if( configs.absolute === true ) style += 'position: absolute !important; ';
56
-
57
- // save the origin style props
58
- // set the hidden el css to be got the actual value later
59
- $hidden.each( function (){
60
- // Save original style. If no style was set, attr() returns undefined
61
- var $this = $( this );
62
- var thisStyle = $this.attr( 'style' );
63
-
64
- tmp.push( thisStyle );
65
- // Retain as much of the original style as possible, if there is one
66
- $this.attr( 'style', thisStyle ? thisStyle + ';' + style : style );
67
- });
68
- };
69
-
70
- restore = function (){
71
- // restore origin style values
72
- $hidden.each( function ( i ){
73
- var $this = $( this );
74
- var _tmp = tmp[ i ];
75
-
76
- if( _tmp === undefined ){
77
- $this.removeAttr( 'style' );
78
- }else{
79
- $this.attr( 'style', _tmp );
80
- }
81
- });
82
- };
83
- }
84
-
85
- fix();
86
- // get the actual value with user specific methed
87
- // it can be 'width', 'height', 'outerWidth', 'innerWidth'... etc
88
- // configs.includeMargin only works for 'outerWidth' and 'outerHeight'
89
- var actual = /(outer)/.test( method ) ?
90
- $target[ method ]( configs.includeMargin ) :
91
- $target[ method ]();
92
-
93
- restore();
94
- // IMPORTANT, this plugin only return the value of the first element
95
- return actual;
96
- }
97
- });
98
- })( jQuery );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/assets/js/sp-framework.js DELETED
@@ -1,645 +0,0 @@
1
- /**
2
- *
3
- * -----------------------------------------------------------
4
- *
5
- * ShapedPlugin Framework
6
- * A Lightweight and easy-to-use WordPress Options Framework
7
- *
8
- * Copyright 2017 www.shapedplugin.com
9
- *
10
- * -----------------------------------------------------------
11
- *
12
- */
13
- ;
14
- (function ($, window, document, undefined) {
15
- 'use strict';
16
-
17
- $.SPFRAMEWORK = $.SPFRAMEWORK || {};
18
-
19
- // caching selector
20
- var $sp_body = $('body');
21
-
22
- // caching variables
23
- var sp_is_rtl = $sp_body.hasClass('rtl');
24
-
25
- // ======================================================
26
- // SPFRAMEWORK TAB NAVIGATION
27
- // ------------------------------------------------------
28
- $.fn.SPFRAMEWORK_TAB_NAVIGATION = function () {
29
- return this.each(function () {
30
-
31
- var $this = $(this),
32
- $nav = $this.find('.sp-nav'),
33
- $reset = $this.find('.sp-reset'),
34
- $expand = $this.find('.sp-expand-all');
35
-
36
- $nav.find('ul:first a').on('click', function (e) {
37
-
38
- e.preventDefault();
39
-
40
- var $el = $(this),
41
- $next = $el.next(),
42
- $target = $el.data('section');
43
-
44
- if ($next.is('ul')) {
45
-
46
- $next.slideToggle('fast');
47
- $el.closest('li').toggleClass('sp-tab-active');
48
-
49
- } else {
50
-
51
- $('#sp-tab-' + $target).fadeIn('fast').siblings().hide();
52
- $nav.find('a').removeClass('sp-section-active');
53
- $el.addClass('sp-section-active');
54
- $reset.val($target);
55
-
56
- }
57
-
58
- });
59
-
60
- $expand.on('click', function (e) {
61
- e.preventDefault();
62
- $this.find('.sp-body').toggleClass('sp-show-all');
63
- $(this).find('.fa').toggleClass('fa-eye-slash').toggleClass('fa-eye');
64
- });
65
-
66
- });
67
- };
68
- // ======================================================
69
-
70
- // ======================================================
71
- // SPFRAMEWORK DEPENDENCY
72
- // ------------------------------------------------------
73
- $.SPFRAMEWORK.DEPENDENCY = function (el, param) {
74
-
75
- // Access to jQuery and DOM versions of element
76
- var base = this;
77
- base.$el = $(el);
78
- base.el = el;
79
-
80
- base.init = function () {
81
-
82
- base.ruleset = $.deps.createRuleset();
83
-
84
- // required for shortcode attrs
85
- var cfg = {
86
- show: function (el) {
87
- el.removeClass('hidden');
88
- },
89
- hide: function (el) {
90
- el.addClass('hidden');
91
- },
92
- log: false,
93
- checkTargets: false
94
- };
95
-
96
- if (param !== undefined) {
97
- base.depSub();
98
- } else {
99
- base.depRoot();
100
- }
101
-
102
- $.deps.enable(base.$el, base.ruleset, cfg);
103
-
104
- };
105
-
106
- base.depRoot = function () {
107
-
108
- base.$el.each(function () {
109
-
110
- $(this).find('[data-controller]').each(function () {
111
-
112
- var $this = $(this),
113
- _controller = $this.data('controller').split('|'),
114
- _condition = $this.data('condition').split('|'),
115
- _value = $this.data('value').toString().split('|'),
116
- _rules = base.ruleset;
117
-
118
- $.each(_controller, function (index, element) {
119
-
120
- var value = _value[index] || '',
121
- condition = _condition[index] || _condition[0];
122
-
123
- _rules = _rules.createRule('[data-depend-id="' + element + '"]', condition, value);
124
- _rules.include($this);
125
-
126
- });
127
-
128
- });
129
-
130
- });
131
-
132
- };
133
-
134
- base.depSub = function () {
135
-
136
- base.$el.each(function () {
137
-
138
- $(this).find('[data-sub-controller]').each(function () {
139
-
140
- var $this = $(this),
141
- _controller = $this.data('sub-controller').split('|'),
142
- _condition = $this.data('sub-condition').split('|'),
143
- _value = $this.data('sub-value').toString().split('|'),
144
- _rules = base.ruleset;
145
-
146
- $.each(_controller, function (index, element) {
147
-
148
- var value = _value[index] || '',
149
- condition = _condition[index] || _condition[0];
150
-
151
- _rules = _rules.createRule('[data-sub-depend-id="' + element + '"]', condition, value);
152
- _rules.include($this);
153
-
154
- });
155
-
156
- });
157
-
158
- });
159
-
160
- };
161
-
162
-
163
- base.init();
164
- };
165
-
166
- $.fn.SPFRAMEWORK_DEPENDENCY = function (param) {
167
- return this.each(function () {
168
- new $.SPFRAMEWORK.DEPENDENCY(this, param);
169
- });
170
- };
171
- // ======================================================
172
-
173
- // ======================================================
174
- // SPFRAMEWORK CHOSEN
175
- // ------------------------------------------------------
176
- $.fn.SPFRAMEWORK_CHOSEN = function () {
177
- return this.each(function () {
178
- $(this).chosen({
179
- allow_single_deselect: true,
180
- disable_search_threshold: 15,
181
- width: parseFloat($(this).actual('width') + 25) + 'px'
182
- });
183
- });
184
- };
185
- // ======================================================
186
-
187
- // ======================================================
188
-
189
- // ======================================================
190
- // SPFRAMEWORK BUTTON SET -- SHAMIM
191
- // ------------------------------------------------------
192
- $.fn.SPFRAMEWORK_BUTTON_SET = function () {
193
- return this.each(function () {
194
-
195
- $(this).find('label').on('click', function () {
196
- $(this).siblings().find('input').prop('checked', false);
197
- });
198
-
199
- });
200
- };
201
- // ======================================================
202
-
203
- // ======================================================
204
- // SPFRAMEWORK CAROUSEL TYPE -- SHAMIM
205
- // ------------------------------------------------------
206
- $.fn.SPFRAMEWORK_CAROUSEL_TYPE = function () {
207
- return this.each(function () {
208
-
209
- $(this).find('label').on('click', function () {
210
- $(this).siblings().find('input').prop('checked', false);
211
- });
212
-
213
- });
214
- };
215
- // ======================================================
216
-
217
- // ======================================================
218
- // SPFRAMEWORK IMAGE GALLERY
219
- // ------------------------------------------------------
220
- $.fn.SPFRAMEWORK_IMAGE_GALLERY = function () {
221
- return this.each(function () {
222
- var $this = $(this),
223
- $edit = $this.find('.sp-edit'),
224
- $remove = $this.find('.sp-remove'),
225
- // $list = $this.find('ul'),
226
- $list = $this.find('ul.sp-gallery-images'),
227
- $input = $this.find('input'),
228
- $img = $this.find('img'),
229
- wp_media_frame,
230
- wp_media_click;
231
-
232
- $this.on('click', '.sp-add, .sp-edit', function (e) {
233
-
234
- var $el = $(this),
235
- what = ($el.hasClass('sp-edit')) ? 'edit' : 'add',
236
- state = (what === 'edit') ? 'gallery-edit' : 'gallery-library';
237
-
238
- e.preventDefault();
239
-
240
- // Check if the `wp.media.gallery` API exists.
241
- if (typeof wp === 'undefined' || !wp.media || !wp.media.gallery) {
242
- return;
243
- }
244
-
245
- // If the media frame already exists, reopen it.
246
- if (wp_media_frame) {
247
- wp_media_frame.open();
248
- wp_media_frame.setState(state);
249
- return;
250
- }
251
-
252
- // Create the media frame.
253
- wp_media_frame = wp.media({
254
- library: {
255
- type: 'image'
256
- },
257
- frame: 'post',
258
- state: 'gallery',
259
- multiple: true
260
- });
261
-
262
- // Open the media frame.
263
- wp_media_frame.on('open', function () {
264
-
265
- var ids = $input.val();
266
-
267
- if (ids) {
268
-
269
- var get_array = ids.split(',');
270
- var library = wp_media_frame.state('gallery-edit').get('library');
271
-
272
- wp_media_frame.setState(state);
273
-
274
- get_array.forEach(function (id) {
275
- var attachment = wp.media.attachment(id);
276
- library.add(attachment ? [attachment] : []);
277
- });
278
-
279
- }
280
- });
281
-
282
- // When an image is selected, run a callback.
283
- wp_media_frame.on('update', function () {
284
-
285
- var inner = '';
286
- var ids = [];
287
- var images = wp_media_frame.state().get('library');
288
-
289
- images.each(function (attachment) {
290
-
291
- var attributes = attachment.attributes;
292
- var thumbnail = (typeof attributes.sizes.thumbnail !== 'undefined') ? attributes.sizes.thumbnail.url : attributes.url;
293
-
294
- inner += '<li><img src="' + thumbnail + '"></li>';
295
- ids.push(attributes.id);
296
-
297
- });
298
-
299
- $input.val(ids).trigger('change');
300
- $list.html('').append(inner);
301
- $remove.removeClass('hidden');
302
- $edit.removeClass('hidden');
303
-
304
- });
305
-
306
- // Finally, open the modal.
307
- wp_media_frame.open();
308
- wp_media_click = what;
309
-
310
- });
311
-
312
- // Remove image
313
- $remove.on('click', function (e) {
314
- e.preventDefault();
315
- $list.html('');
316
- $input.val('').trigger('change');
317
- $remove.addClass('hidden');
318
- $edit.addClass('hidden');
319
- });
320
-
321
- });
322
-
323
- };
324
- // ======================================================
325
-
326
-
327
- // ======================================================
328
- // SPFRAMEWORK RESET CONFIRM
329
- // ------------------------------------------------------
330
- $.fn.SPFRAMEWORK_CONFIRM = function () {
331
- return this.each(function () {
332
- $(this).on('click', function (e) {
333
- if (!confirm('Are you sure?')) {
334
- e.preventDefault();
335
- }
336
- });
337
- });
338
- };
339
- // ======================================================
340
-
341
- // ======================================================
342
- // SPFRAMEWORK SAVE OPTIONS
343
- // ------------------------------------------------------
344
- $.fn.SPFRAMEWORK_SAVE = function () {
345
- return this.each(function () {
346
-
347
- var $this = $(this),
348
- $text = $this.data('save'),
349
- $value = $this.val(),
350
- $ajax = $('#sp-save-ajax');
351
-
352
- $(document).on('keydown', function (event) {
353
- if (event.ctrlKey || event.metaKey) {
354
- if (String.fromCharCode(event.which).toLowerCase() === 's') {
355
- event.preventDefault();
356
- $this.trigger('click');
357
- }
358
- }
359
- });
360
-
361
- $this.on('click', function (e) {
362
-
363
- if ($ajax.length) {
364
-
365
- if (typeof tinyMCE === 'object') {
366
- tinyMCE.triggerSave();
367
- }
368
-
369
- $this.prop('disabled', true).attr('value', $text);
370
-
371
- var serializedOptions = $('#sp_framework_form').serialize();
372
-
373
- $.post('options.php', serializedOptions).error(function () {
374
- alert('Error, Please try again.');
375
- }).success(function () {
376
- $this.prop('disabled', false).attr('value', $value);
377
- $ajax.hide().fadeIn().delay(250).fadeOut();
378
- });
379
-
380
- e.preventDefault();
381
-
382
- } else {
383
-
384
- $this.addClass('disabled').attr('value', $text);
385
-
386
- }
387
-
388
- });
389
-
390
- });
391
- };
392
- // ======================================================
393
-
394
- // ======================================================
395
- // SPFRAMEWORK UI DIALOG OVERLAY HELPER
396
- // ------------------------------------------------------
397
- if (typeof $.widget !== 'undefined' && typeof $.ui !== 'undefined' && typeof $.ui.dialog !== 'undefined') {
398
- $.widget('ui.dialog', $.ui.dialog, {
399
- _createOverlay: function () {
400
- this._super();
401
- if (!this.options.modal) {
402
- return;
403
- }
404
- this._on(this.overlay, {
405
- click: 'close'
406
- });
407
- }
408
- });
409
- }
410
-
411
- // ======================================================
412
- // SPFRAMEWORK COLORPICKER
413
- // ------------------------------------------------------
414
- if (typeof Color === 'function') {
415
-
416
- // adding alpha support for Automattic Color.js toString function.
417
- Color.fn.toString = function () {
418
-
419
- // check for alpha
420
- if (this._alpha < 1) {
421
- return this.toCSS('rgba', this._alpha).replace(/\s+/g, '');
422
- }
423
-
424
- var hex = parseInt(this._color, 10).toString(16);
425
-
426
- if (this.error) {
427
- return '';
428
- }
429
-
430
- // maybe left pad it
431
- if (hex.length < 6) {
432
- for (var i = 6 - hex.length - 1; i >= 0; i--) {
433
- hex = '0' + hex;
434
- }
435
- }
436
-
437
- return '#' + hex;
438
-
439
- };
440
-
441
- }
442
-
443
- $.SPFRAMEWORK.PARSE_COLOR_VALUE = function (val) {
444
-
445
- var value = val.replace(/\s+/g, ''),
446
- alpha = (value.indexOf('rgba') !== -1) ? parseFloat(value.replace(/^.*,(.+)\)/, '$1') * 100) : 100,
447
- rgba = (alpha < 100) ? true : false;
448
-
449
- return {
450
- value: value,
451
- alpha: alpha,
452
- rgba: rgba
453
- };
454
-
455
- };
456
-
457
- $.fn.SPFRAMEWORK_COLORPICKER = function () {
458
-
459
- return this.each(function () {
460
-
461
- var $this = $(this);
462
-
463
- // check for rgba enabled/disable
464
- if ($this.data('rgba') !== false) {
465
-
466
- // parse value
467
- var picker = $.SPFRAMEWORK.PARSE_COLOR_VALUE($this.val());
468
-
469
- // wpColorPicker core
470
- $this.wpColorPicker({
471
-
472
- // wpColorPicker: clear
473
- clear: function () {
474
- $this.trigger('keyup');
475
- },
476
-
477
- // wpColorPicker: change
478
- change: function (event, ui) {
479
-
480
- var ui_color_value = ui.color.toString();
481
-
482
- // update checkerboard background color
483
- $this.closest('.wp-picker-container').find('.sp-alpha-slider-offset').css('background-color', ui_color_value);
484
- $this.val(ui_color_value).trigger('change');
485
-
486
- },
487
-
488
- // wpColorPicker: create
489
- create: function () {
490
-
491
- // set variables for alpha slider
492
- var a8cIris = $this.data('a8cIris'),
493
- $container = $this.closest('.wp-picker-container'),
494
-
495
- // appending alpha wrapper
496
- $alpha_wrap = $('<div class="sp-alpha-wrap">' +
497
- '<div class="sp-alpha-slider"></div>' +
498
- '<div class="sp-alpha-slider-offset"></div>' +
499
- '<div class="sp-alpha-text"></div>' +
500
- '</div>').appendTo($container.find('.wp-picker-holder')),
501
-
502
- $alpha_slider = $alpha_wrap.find('.sp-alpha-slider'),
503
- $alpha_text = $alpha_wrap.find('.sp-alpha-text'),
504
- $alpha_offset = $alpha_wrap.find('.sp-alpha-slider-offset');
505
-
506
- // alpha slider
507
- $alpha_slider.slider({
508
-
509
- // slider: slide
510
- slide: function (event, ui) {
511
-
512
- var slide_value = parseFloat(ui.value / 100);
513
-
514
- // update iris data alpha && wpColorPicker color option && alpha text
515
- a8cIris._color._alpha = slide_value;
516
- $this.wpColorPicker('color', a8cIris._color.toString());
517
- $alpha_text.text((slide_value < 1 ? slide_value : ''));
518
-
519
- },
520
-
521
- // slider: create
522
- create: function () {
523
-
524
- var slide_value = parseFloat(picker.alpha / 100),
525
- alpha_text_value = slide_value < 1 ? slide_value : '';
526
-
527
- // update alpha text && checkerboard background color
528
- $alpha_text.text(alpha_text_value);
529
- $alpha_offset.css('background-color', picker.value);
530
-
531
- // wpColorPicker clear for update iris data alpha && alpha text && slider color option
532
- $container.on('click', '.wp-picker-clear', function () {
533
-
534
- a8cIris._color._alpha = 1;
535
- $alpha_text.text('');
536
- $alpha_slider.slider('option', 'value', 100).trigger('slide');
537
-
538
- });
539
-
540
- // wpColorPicker default button for update iris data alpha && alpha text && slider color option
541
- $container.on('click', '.wp-picker-default', function () {
542
-
543
- var default_picker = $.SPFRAMEWORK.PARSE_COLOR_VALUE($this.data('default-color')),
544
- default_value = parseFloat(default_picker.alpha / 100),
545
- default_text = default_value < 1 ? default_value : '';
546
-
547
- a8cIris._color._alpha = default_value;
548
- $alpha_text.text(default_text);
549
- $alpha_slider.slider('option', 'value', default_picker.alpha).trigger('slide');
550
-
551
- });
552
-
553
- // show alpha wrapper on click color picker button
554
- $container.on('click', '.wp-color-result', function () {
555
- $alpha_wrap.toggle();
556
- });
557
-
558
- // hide alpha wrapper on click body
559
- $sp_body.on('click.wpcolorpicker', function () {
560
- $alpha_wrap.hide();
561
- });
562
-
563
- },
564
-
565
- // slider: options
566
- value: picker.alpha,
567
- step: 1,
568
- min: 1,
569
- max: 100
570
-
571
- });
572
- }
573
-
574
- });
575
-
576
- } else {
577
-
578
- // wpColorPicker default picker
579
- $this.wpColorPicker({
580
- clear: function () {
581
- $this.trigger('keyup');
582
- },
583
- change: function (event, ui) {
584
- $this.val(ui.color.toString()).trigger('change');
585
- }
586
- });
587
-
588
- }
589
-
590
- });
591
-
592
- };
593
- // ======================================================
594
-
595
- // ======================================================
596
- // ON WIDGET-ADDED RELOAD FRAMEWORK PLUGINS
597
- // ------------------------------------------------------
598
- $.SPFRAMEWORK.WIDGET_RELOAD_PLUGINS = function () {
599
- $(document).on('widget-added widget-updated', function (event, $widget) {
600
- $widget.SPFRAMEWORK_RELOAD_PLUGINS();
601
- $widget.SPFRAMEWORK_DEPENDENCY();
602
- });
603
- };
604
-
605
- // ======================================================
606
- // TOOLTIP HELPER
607
- // ------------------------------------------------------
608
- $.fn.SPFRAMEWORK_TOOLTIP = function () {
609
- return this.each(function () {
610
- var placement = (sp_is_rtl) ? 'right' : 'left';
611
- $(this).sptooltip({
612
- html: true,
613
- placement: placement,
614
- container: 'body'
615
- });
616
- });
617
- };
618
-
619
- // ======================================================
620
- // RELOAD FRAMEWORK PLUGINS
621
- // ------------------------------------------------------
622
- $.fn.SPFRAMEWORK_RELOAD_PLUGINS = function () {
623
- return this.each(function () {
624
- $('.chosen', this).SPFRAMEWORK_CHOSEN();
625
- $('.sp-field-button-set', this).SPFRAMEWORK_BUTTON_SET();
626
- $('.sp-field-carousel-type', this).SPFRAMEWORK_CAROUSEL_TYPE(); //
627
- $('.sp-field-gallery', this).SPFRAMEWORK_IMAGE_GALLERY();
628
- $('.sp-field-color-picker', this).SPFRAMEWORK_COLORPICKER();
629
- $('.sp-help', this).SPFRAMEWORK_TOOLTIP();
630
- });
631
- };
632
-
633
- // ======================================================
634
- // JQUERY DOCUMENT READY
635
- // ------------------------------------------------------
636
- $(document).ready(function () {
637
- $('.sp-wpcp-framework').SPFRAMEWORK_TAB_NAVIGATION();
638
- $('.sp-reset-confirm, .sp-import-backup').SPFRAMEWORK_CONFIRM();
639
- $('body.post-type-sp_wp_carousel, .sp-taxonomy').SPFRAMEWORK_DEPENDENCY();
640
- $('.sp-save').SPFRAMEWORK_SAVE();
641
- $sp_body.SPFRAMEWORK_RELOAD_PLUGINS();
642
- $.SPFRAMEWORK.WIDGET_RELOAD_PLUGINS();
643
- });
644
-
645
- })(jQuery, window, document);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/assets/js/sp-plugins.js DELETED
@@ -1,2405 +0,0 @@
1
- /*!
2
- Chosen, a Select Box Enhancer for jQuery and Prototype
3
- by Patrick Filler for Harvest, http://getharvest.com
4
-
5
- Version 1.4.2
6
- Full source at https://github.com/harvesthq/chosen
7
- Copyright (c) 2011-2015 Harvest http://getharvest.com
8
-
9
- MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
- This file is generated by `grunt build`, do not edit it by hand.
11
- */
12
-
13
- (function() {
14
- var $, AbstractChosen, Chosen, SelectParser, _ref,
15
- __hasProp = {}.hasOwnProperty,
16
- __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; };
17
-
18
- SelectParser = (function() {
19
- function SelectParser() {
20
- this.options_index = 0;
21
- this.parsed = [];
22
- }
23
-
24
- SelectParser.prototype.add_node = function(child) {
25
- if (child.nodeName.toUpperCase() === "OPTGROUP") {
26
- return this.add_group(child);
27
- } else {
28
- return this.add_option(child);
29
- }
30
- };
31
-
32
- SelectParser.prototype.add_group = function(group) {
33
- var group_position, option, _i, _len, _ref, _results;
34
- group_position = this.parsed.length;
35
- this.parsed.push({
36
- array_index: group_position,
37
- group: true,
38
- label: this.escapeExpression(group.label),
39
- title: group.title ? group.title : void 0,
40
- children: 0,
41
- disabled: group.disabled,
42
- classes: group.className
43
- });
44
- _ref = group.childNodes;
45
- _results = [];
46
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
47
- option = _ref[_i];
48
- _results.push(this.add_option(option, group_position, group.disabled));
49
- }
50
- return _results;
51
- };
52
-
53
- SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
54
- if (option.nodeName.toUpperCase() === "OPTION") {
55
- if (option.text !== "") {
56
- if (group_position != null) {
57
- this.parsed[group_position].children += 1;
58
- }
59
- this.parsed.push({
60
- array_index: this.parsed.length,
61
- options_index: this.options_index,
62
- value: option.value,
63
- text: option.text,
64
- html: option.innerHTML,
65
- title: option.title ? option.title : void 0,
66
- selected: option.selected,
67
- disabled: group_disabled === true ? group_disabled : option.disabled,
68
- group_array_index: group_position,
69
- group_label: group_position != null ? this.parsed[group_position].label : null,
70
- classes: option.className,
71
- style: option.style.cssText
72
- });
73
- } else {
74
- this.parsed.push({
75
- array_index: this.parsed.length,
76
- options_index: this.options_index,
77
- empty: true
78
- });
79
- }
80
- return this.options_index += 1;
81
- }
82
- };
83
-
84
- SelectParser.prototype.escapeExpression = function(text) {
85
- var map, unsafe_chars;
86
- if ((text == null) || text === false) {
87
- return "";
88
- }
89
- if (!/[\&\<\>\"\'\`]/.test(text)) {
90
- return text;
91
- }
92
- map = {
93
- "<": "&lt;",
94
- ">": "&gt;",
95
- '"': "&quot;",
96
- "'": "&#x27;",
97
- "`": "&#x60;"
98
- };
99
- unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
100
- return text.replace(unsafe_chars, function(chr) {
101
- return map[chr] || "&amp;";
102
- });
103
- };
104
-
105
- return SelectParser;
106
-
107
- })();
108
-
109
- SelectParser.select_to_array = function(select) {
110
- var child, parser, _i, _len, _ref;
111
- parser = new SelectParser();
112
- _ref = select.childNodes;
113
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
114
- child = _ref[_i];
115
- parser.add_node(child);
116
- }
117
- return parser.parsed;
118
- };
119
-
120
- AbstractChosen = (function() {
121
- function AbstractChosen(form_field, options) {
122
- this.form_field = form_field;
123
- this.options = options != null ? options : {};
124
- if (!AbstractChosen.browser_is_supported()) {
125
- return;
126
- }
127
- this.is_multiple = this.form_field.multiple;
128
- this.set_default_text();
129
- this.set_default_values();
130
- this.setup();
131
- this.set_up_html();
132
- this.register_observers();
133
- this.on_ready();
134
- }
135
-
136
- AbstractChosen.prototype.set_default_values = function() {
137
- var _this = this;
138
- this.click_test_action = function(evt) {
139
- return _this.test_active_click(evt);
140
- };
141
- this.activate_action = function(evt) {
142
- return _this.activate_field(evt);
143
- };
144
- this.active_field = false;
145
- this.mouse_on_container = false;
146
- this.results_showing = false;
147
- this.result_highlighted = null;
148
- this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
149
- this.disable_search_threshold = this.options.disable_search_threshold || 0;
150
- this.disable_search = this.options.disable_search || false;
151
- this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
152
- this.group_search = this.options.group_search != null ? this.options.group_search : true;
153
- this.search_contains = this.options.search_contains || false;
154
- this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
155
- this.max_selected_options = this.options.max_selected_options || Infinity;
156
- this.inherit_select_classes = this.options.inherit_select_classes || false;
157
- this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
158
- this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
159
- return this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
160
- };
161
-
162
- AbstractChosen.prototype.set_default_text = function() {
163
- if (this.form_field.getAttribute("data-placeholder")) {
164
- this.default_text = this.form_field.getAttribute("data-placeholder");
165
- } else if (this.is_multiple) {
166
- this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
167
- } else {
168
- this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
169
- }
170
- return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
171
- };
172
-
173
- AbstractChosen.prototype.choice_label = function(item) {
174
- if (this.include_group_label_in_selected && (item.group_label != null)) {
175
- return "<b class='group-name'>" + item.group_label + "</b>" + item.html;
176
- } else {
177
- return item.html;
178
- }
179
- };
180
-
181
- AbstractChosen.prototype.mouse_enter = function() {
182
- return this.mouse_on_container = true;
183
- };
184
-
185
- AbstractChosen.prototype.mouse_leave = function() {
186
- return this.mouse_on_container = false;
187
- };
188
-
189
- AbstractChosen.prototype.input_focus = function(evt) {
190
- var _this = this;
191
- if (this.is_multiple) {
192
- if (!this.active_field) {
193
- return setTimeout((function() {
194
- return _this.container_mousedown();
195
- }), 50);
196
- }
197
- } else {
198
- if (!this.active_field) {
199
- return this.activate_field();
200
- }
201
- }
202
- };
203
-
204
- AbstractChosen.prototype.input_blur = function(evt) {
205
- var _this = this;
206
- if (!this.mouse_on_container) {
207
- this.active_field = false;
208
- return setTimeout((function() {
209
- return _this.blur_test();
210
- }), 100);
211
- }
212
- };
213
-
214
- AbstractChosen.prototype.results_option_build = function(options) {
215
- var content, data, _i, _len, _ref;
216
- content = '';
217
- _ref = this.results_data;
218
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
219
- data = _ref[_i];
220
- if (data.group) {
221
- content += this.result_add_group(data);
222
- } else {
223
- content += this.result_add_option(data);
224
- }
225
- if (options != null ? options.first : void 0) {
226
- if (data.selected && this.is_multiple) {
227
- this.choice_build(data);
228
- } else if (data.selected && !this.is_multiple) {
229
- this.single_set_selected_text(this.choice_label(data));
230
- }
231
- }
232
- }
233
- return content;
234
- };
235
-
236
- AbstractChosen.prototype.result_add_option = function(option) {
237
- var classes, option_el;
238
- if (!option.search_match) {
239
- return '';
240
- }
241
- if (!this.include_option_in_results(option)) {
242
- return '';
243
- }
244
- classes = [];
245
- if (!option.disabled && !(option.selected && this.is_multiple)) {
246
- classes.push("active-result");
247
- }
248
- if (option.disabled && !(option.selected && this.is_multiple)) {
249
- classes.push("disabled-result");
250
- }
251
- if (option.selected) {
252
- classes.push("result-selected");
253
- }
254
- if (option.group_array_index != null) {
255
- classes.push("group-option");
256
- }
257
- if (option.classes !== "") {
258
- classes.push(option.classes);
259
- }
260
- option_el = document.createElement("li");
261
- option_el.className = classes.join(" ");
262
- option_el.style.cssText = option.style;
263
- option_el.setAttribute("data-option-array-index", option.array_index);
264
- option_el.innerHTML = option.search_text;
265
- if (option.title) {
266
- option_el.title = option.title;
267
- }
268
- return this.outerHTML(option_el);
269
- };
270
-
271
- AbstractChosen.prototype.result_add_group = function(group) {
272
- var classes, group_el;
273
- if (!(group.search_match || group.group_match)) {
274
- return '';
275
- }
276
- if (!(group.active_options > 0)) {
277
- return '';
278
- }
279
- classes = [];
280
- classes.push("group-result");
281
- if (group.classes) {
282
- classes.push(group.classes);
283
- }
284
- group_el = document.createElement("li");
285
- group_el.className = classes.join(" ");
286
- group_el.innerHTML = group.search_text;
287
- if (group.title) {
288
- group_el.title = group.title;
289
- }
290
- return this.outerHTML(group_el);
291
- };
292
-
293
- AbstractChosen.prototype.results_update_field = function() {
294
- this.set_default_text();
295
- if (!this.is_multiple) {
296
- this.results_reset_cleanup();
297
- }
298
- this.result_clear_highlight();
299
- this.results_build();
300
- if (this.results_showing) {
301
- return this.winnow_results();
302
- }
303
- };
304
-
305
- AbstractChosen.prototype.reset_single_select_options = function() {
306
- var result, _i, _len, _ref, _results;
307
- _ref = this.results_data;
308
- _results = [];
309
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
310
- result = _ref[_i];
311
- if (result.selected) {
312
- _results.push(result.selected = false);
313
- } else {
314
- _results.push(void 0);
315
- }
316
- }
317
- return _results;
318
- };
319
-
320
- AbstractChosen.prototype.results_toggle = function() {
321
- if (this.results_showing) {
322
- return this.results_hide();
323
- } else {
324
- return this.results_show();
325
- }
326
- };
327
-
328
- AbstractChosen.prototype.results_search = function(evt) {
329
- if (this.results_showing) {
330
- return this.winnow_results();
331
- } else {
332
- return this.results_show();
333
- }
334
- };
335
-
336
- AbstractChosen.prototype.winnow_results = function() {
337
- var escapedSearchText, option, regex, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
338
- this.no_results_clear();
339
- results = 0;
340
- searchText = this.get_search_text();
341
- escapedSearchText = searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
342
- zregex = new RegExp(escapedSearchText, 'i');
343
- regex = this.get_search_regex(escapedSearchText);
344
- _ref = this.results_data;
345
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
346
- option = _ref[_i];
347
- option.search_match = false;
348
- results_group = null;
349
- if (this.include_option_in_results(option)) {
350
- if (option.group) {
351
- option.group_match = false;
352
- option.active_options = 0;
353
- }
354
- if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
355
- results_group = this.results_data[option.group_array_index];
356
- if (results_group.active_options === 0 && results_group.search_match) {
357
- results += 1;
358
- }
359
- results_group.active_options += 1;
360
- }
361
- option.search_text = option.group ? option.label : option.html;
362
- if (!(option.group && !this.group_search)) {
363
- option.search_match = this.search_string_match(option.search_text, regex);
364
- if (option.search_match && !option.group) {
365
- results += 1;
366
- }
367
- if (option.search_match) {
368
- if (searchText.length) {
369
- startpos = option.search_text.search(zregex);
370
- text = option.search_text.substr(0, startpos + searchText.length) + '</em>' + option.search_text.substr(startpos + searchText.length);
371
- option.search_text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
372
- }
373
- if (results_group != null) {
374
- results_group.group_match = true;
375
- }
376
- } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
377
- option.search_match = true;
378
- }
379
- }
380
- }
381
- }
382
- this.result_clear_highlight();
383
- if (results < 1 && searchText.length) {
384
- this.update_results_content("");
385
- return this.no_results(searchText);
386
- } else {
387
- this.update_results_content(this.results_option_build());
388
- return this.winnow_results_set_highlight();
389
- }
390
- };
391
-
392
- AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
393
- var regex_anchor;
394
- regex_anchor = this.search_contains ? "" : "^";
395
- return new RegExp(regex_anchor + escaped_search_string, 'i');
396
- };
397
-
398
- AbstractChosen.prototype.search_string_match = function(search_string, regex) {
399
- var part, parts, _i, _len;
400
- if (regex.test(search_string)) {
401
- return true;
402
- } else if (this.enable_split_word_search && (search_string.indexOf(" ") >= 0 || search_string.indexOf("[") === 0)) {
403
- parts = search_string.replace(/\[|\]/g, "").split(" ");
404
- if (parts.length) {
405
- for (_i = 0, _len = parts.length; _i < _len; _i++) {
406
- part = parts[_i];
407
- if (regex.test(part)) {
408
- return true;
409
- }
410
- }
411
- }
412
- }
413
- };
414
-
415
- AbstractChosen.prototype.choices_count = function() {
416
- var option, _i, _len, _ref;
417
- if (this.selected_option_count != null) {
418
- return this.selected_option_count;
419
- }
420
- this.selected_option_count = 0;
421
- _ref = this.form_field.options;
422
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
423
- option = _ref[_i];
424
- if (option.selected) {
425
- this.selected_option_count += 1;
426
- }
427
- }
428
- return this.selected_option_count;
429
- };
430
-
431
- AbstractChosen.prototype.choices_click = function(evt) {
432
- evt.preventDefault();
433
- if (!(this.results_showing || this.is_disabled)) {
434
- return this.results_show();
435
- }
436
- };
437
-
438
- AbstractChosen.prototype.keyup_checker = function(evt) {
439
- var stroke, _ref;
440
- stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
441
- this.search_field_scale();
442
- switch (stroke) {
443
- case 8:
444
- if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
445
- return this.keydown_backstroke();
446
- } else if (!this.pending_backstroke) {
447
- this.result_clear_highlight();
448
- return this.results_search();
449
- }
450
- break;
451
- case 13:
452
- evt.preventDefault();
453
- if (this.results_showing) {
454
- return this.result_select(evt);
455
- }
456
- break;
457
- case 27:
458
- if (this.results_showing) {
459
- this.results_hide();
460
- }
461
- return true;
462
- case 9:
463
- case 38:
464
- case 40:
465
- case 16:
466
- case 91:
467
- case 17:
468
- break;
469
- default:
470
- return this.results_search();
471
- }
472
- };
473
-
474
- AbstractChosen.prototype.clipboard_event_checker = function(evt) {
475
- var _this = this;
476
- return setTimeout((function() {
477
- return _this.results_search();
478
- }), 50);
479
- };
480
-
481
- AbstractChosen.prototype.container_width = function() {
482
- if (this.options.width != null) {
483
- return this.options.width;
484
- } else {
485
- return "" + this.form_field.offsetWidth + "px";
486
- }
487
- };
488
-
489
- AbstractChosen.prototype.include_option_in_results = function(option) {
490
- if (this.is_multiple && (!this.display_selected_options && option.selected)) {
491
- return false;
492
- }
493
- if (!this.display_disabled_options && option.disabled) {
494
- return false;
495
- }
496
- if (option.empty) {
497
- return false;
498
- }
499
- return true;
500
- };
501
-
502
- AbstractChosen.prototype.search_results_touchstart = function(evt) {
503
- this.touch_started = true;
504
- return this.search_results_mouseover(evt);
505
- };
506
-
507
- AbstractChosen.prototype.search_results_touchmove = function(evt) {
508
- this.touch_started = false;
509
- return this.search_results_mouseout(evt);
510
- };
511
-
512
- AbstractChosen.prototype.search_results_touchend = function(evt) {
513
- if (this.touch_started) {
514
- return this.search_results_mouseup(evt);
515
- }
516
- };
517
-
518
- AbstractChosen.prototype.outerHTML = function(element) {
519
- var tmp;
520
- if (element.outerHTML) {
521
- return element.outerHTML;
522
- }
523
- tmp = document.createElement("div");
524
- tmp.appendChild(element);
525
- return tmp.innerHTML;
526
- };
527
-
528
- AbstractChosen.browser_is_supported = function() {
529
- if (window.navigator.appName === "Microsoft Internet Explorer") {
530
- return document.documentMode >= 8;
531
- }
532
- if (/iP(od|hone)/i.test(window.navigator.userAgent)) {
533
- return false;
534
- }
535
- if (/Android/i.test(window.navigator.userAgent)) {
536
- if (/Mobile/i.test(window.navigator.userAgent)) {
537
- return false;
538
- }
539
- }
540
- return true;
541
- };
542
-
543
- AbstractChosen.default_multiple_text = "Select Some Options";
544
-
545
- AbstractChosen.default_single_text = "Select an Option";
546
-
547
- AbstractChosen.default_no_result_text = "No results match";
548
-
549
- return AbstractChosen;
550
-
551
- })();
552
-
553
- $ = jQuery;
554
-
555
- $.fn.extend({
556
- chosen: function(options) {
557
- if (!AbstractChosen.browser_is_supported()) {
558
- return this;
559
- }
560
- return this.each(function(input_field) {
561
- var $this, chosen;
562
- $this = $(this);
563
- chosen = $this.data('chosen');
564
- if (options === 'destroy' && chosen instanceof Chosen) {
565
- chosen.destroy();
566
- } else if (!(chosen instanceof Chosen)) {
567
- $this.data('chosen', new Chosen(this, options));
568
- }
569
- });
570
- }
571
- });
572
-
573
- Chosen = (function(_super) {
574
- __extends(Chosen, _super);
575
-
576
- function Chosen() {
577
- _ref = Chosen.__super__.constructor.apply(this, arguments);
578
- return _ref;
579
- }
580
-
581
- Chosen.prototype.setup = function() {
582
- this.form_field_jq = $(this.form_field);
583
- this.current_selectedIndex = this.form_field.selectedIndex;
584
- return this.is_rtl = this.form_field_jq.hasClass("chosen-rtl");
585
- };
586
-
587
- Chosen.prototype.set_up_html = function() {
588
- var container_classes, container_props;
589
- container_classes = ["chosen-container"];
590
- container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
591
- if (this.inherit_select_classes && this.form_field.className) {
592
- container_classes.push(this.form_field.className);
593
- }
594
- if (this.is_rtl) {
595
- container_classes.push("chosen-rtl");
596
- }
597
- container_props = {
598
- 'class': container_classes.join(' '),
599
- 'style': "width: " + (this.container_width()) + ";",
600
- 'title': this.form_field.title
601
- };
602
- if (this.form_field.id.length) {
603
- container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
604
- }
605
- this.container = $("<div />", container_props);
606
- if (this.is_multiple) {
607
- this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>');
608
- } else {
609
- this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>');
610
- }
611
- this.form_field_jq.hide().after(this.container);
612
- this.dropdown = this.container.find('div.chosen-drop').first();
613
- this.search_field = this.container.find('input').first();
614
- this.search_results = this.container.find('ul.chosen-results').first();
615
- this.search_field_scale();
616
- this.search_no_results = this.container.find('li.no-results').first();
617
- if (this.is_multiple) {
618
- this.search_choices = this.container.find('ul.chosen-choices').first();
619
- this.search_container = this.container.find('li.search-field').first();
620
- } else {
621
- this.search_container = this.container.find('div.chosen-search').first();
622
- this.selected_item = this.container.find('.chosen-single').first();
623
- }
624
- this.results_build();
625
- this.set_tab_index();
626
- return this.set_label_behavior();
627
- };
628
-
629
- Chosen.prototype.on_ready = function() {
630
- return this.form_field_jq.trigger("chosen:ready", {
631
- chosen: this
632
- });
633
- };
634
-
635
- Chosen.prototype.register_observers = function() {
636
- var _this = this;
637
- this.container.bind('touchstart.chosen', function(evt) {
638
- _this.container_mousedown(evt);
639
- return evt.preventDefault();
640
- });
641
- this.container.bind('touchend.chosen', function(evt) {
642
- _this.container_mouseup(evt);
643
- return evt.preventDefault();
644
- });
645
- this.container.bind('mousedown.chosen', function(evt) {
646
- _this.container_mousedown(evt);
647
- });
648
- this.container.bind('mouseup.chosen', function(evt) {
649
- _this.container_mouseup(evt);
650
- });
651
- this.container.bind('mouseenter.chosen', function(evt) {
652
- _this.mouse_enter(evt);
653
- });
654
- this.container.bind('mouseleave.chosen', function(evt) {
655
- _this.mouse_leave(evt);
656
- });
657
- this.search_results.bind('mouseup.chosen', function(evt) {
658
- _this.search_results_mouseup(evt);
659
- });
660
- this.search_results.bind('mouseover.chosen', function(evt) {
661
- _this.search_results_mouseover(evt);
662
- });
663
- this.search_results.bind('mouseout.chosen', function(evt) {
664
- _this.search_results_mouseout(evt);
665
- });
666
- this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function(evt) {
667
- _this.search_results_mousewheel(evt);
668
- });
669
- this.search_results.bind('touchstart.chosen', function(evt) {
670
- _this.search_results_touchstart(evt);
671
- });
672
- this.search_results.bind('touchmove.chosen', function(evt) {
673
- _this.search_results_touchmove(evt);
674
- });
675
- this.search_results.bind('touchend.chosen', function(evt) {
676
- _this.search_results_touchend(evt);
677
- });
678
- this.form_field_jq.bind("chosen:updated.chosen", function(evt) {
679
- _this.results_update_field(evt);
680
- });
681
- this.form_field_jq.bind("chosen:activate.chosen", function(evt) {
682
- _this.activate_field(evt);
683
- });
684
- this.form_field_jq.bind("chosen:open.chosen", function(evt) {
685
- _this.container_mousedown(evt);
686
- });
687
- this.form_field_jq.bind("chosen:close.chosen", function(evt) {
688
- _this.input_blur(evt);
689
- });
690
- this.search_field.bind('blur.chosen', function(evt) {
691
- _this.input_blur(evt);
692
- });
693
- this.search_field.bind('keyup.chosen', function(evt) {
694
- _this.keyup_checker(evt);
695
- });
696
- this.search_field.bind('keydown.chosen', function(evt) {
697
- _this.keydown_checker(evt);
698
- });
699
- this.search_field.bind('focus.chosen', function(evt) {
700
- _this.input_focus(evt);
701
- });
702
- this.search_field.bind('cut.chosen', function(evt) {
703
- _this.clipboard_event_checker(evt);
704
- });
705
- this.search_field.bind('paste.chosen', function(evt) {
706
- _this.clipboard_event_checker(evt);
707
- });
708
- if (this.is_multiple) {
709
- return this.search_choices.bind('click.chosen', function(evt) {
710
- _this.choices_click(evt);
711
- });
712
- } else {
713
- return this.container.bind('click.chosen', function(evt) {
714
- evt.preventDefault();
715
- });
716
- }
717
- };
718
-
719
- Chosen.prototype.destroy = function() {
720
- $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
721
- if (this.search_field[0].tabIndex) {
722
- this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
723
- }
724
- this.container.remove();
725
- this.form_field_jq.removeData('chosen');
726
- return this.form_field_jq.show();
727
- };
728
-
729
- Chosen.prototype.search_field_disabled = function() {
730
- this.is_disabled = this.form_field_jq[0].disabled;
731
- if (this.is_disabled) {
732
- this.container.addClass('chosen-disabled');
733
- this.search_field[0].disabled = true;
734
- if (!this.is_multiple) {
735
- this.selected_item.unbind("focus.chosen", this.activate_action);
736
- }
737
- return this.close_field();
738
- } else {
739
- this.container.removeClass('chosen-disabled');
740
- this.search_field[0].disabled = false;
741
- if (!this.is_multiple) {
742
- return this.selected_item.bind("focus.chosen", this.activate_action);
743
- }
744
- }
745
- };
746
-
747
- Chosen.prototype.container_mousedown = function(evt) {
748
- if (!this.is_disabled) {
749
- if (evt && evt.type === "mousedown" && !this.results_showing) {
750
- evt.preventDefault();
751
- }
752
- if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
753
- if (!this.active_field) {
754
- if (this.is_multiple) {
755
- this.search_field.val("");
756
- }
757
- $(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action);
758
- this.results_show();
759
- } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
760
- evt.preventDefault();
761
- this.results_toggle();
762
- }
763
- return this.activate_field();
764
- }
765
- }
766
- };
767
-
768
- Chosen.prototype.container_mouseup = function(evt) {
769
- if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
770
- return this.results_reset(evt);
771
- }
772
- };
773
-
774
- Chosen.prototype.search_results_mousewheel = function(evt) {
775
- var delta;
776
- if (evt.originalEvent) {
777
- delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
778
- }
779
- if (delta != null) {
780
- evt.preventDefault();
781
- if (evt.type === 'DOMMouseScroll') {
782
- delta = delta * 40;
783
- }
784
- return this.search_results.scrollTop(delta + this.search_results.scrollTop());
785
- }
786
- };
787
-
788
- Chosen.prototype.blur_test = function(evt) {
789
- if (!this.active_field && this.container.hasClass("chosen-container-active")) {
790
- return this.close_field();
791
- }
792
- };
793
-
794
- Chosen.prototype.close_field = function() {
795
- $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
796
- this.active_field = false;
797
- this.results_hide();
798
- this.container.removeClass("chosen-container-active");
799
- this.clear_backstroke();
800
- this.show_search_field_default();
801
- return this.search_field_scale();
802
- };
803
-
804
- Chosen.prototype.activate_field = function() {
805
- this.container.addClass("chosen-container-active");
806
- this.active_field = true;
807
- this.search_field.val(this.search_field.val());
808
- return this.search_field.focus();
809
- };
810
-
811
- Chosen.prototype.test_active_click = function(evt) {
812
- var active_container;
813
- active_container = $(evt.target).closest('.chosen-container');
814
- if (active_container.length && this.container[0] === active_container[0]) {
815
- return this.active_field = true;
816
- } else {
817
- return this.close_field();
818
- }
819
- };
820
-
821
- Chosen.prototype.results_build = function() {
822
- this.parsing = true;
823
- this.selected_option_count = null;
824
- this.results_data = SelectParser.select_to_array(this.form_field);
825
- if (this.is_multiple) {
826
- this.search_choices.find("li.search-choice").remove();
827
- } else if (!this.is_multiple) {
828
- this.single_set_selected_text();
829
- if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
830
- this.search_field[0].readOnly = true;
831
- this.container.addClass("chosen-container-single-nosearch");
832
- } else {
833
- this.search_field[0].readOnly = false;
834
- this.container.removeClass("chosen-container-single-nosearch");
835
- }
836
- }
837
- this.update_results_content(this.results_option_build({
838
- first: true
839
- }));
840
- this.search_field_disabled();
841
- this.show_search_field_default();
842
- this.search_field_scale();
843
- return this.parsing = false;
844
- };
845
-
846
- Chosen.prototype.result_do_highlight = function(el) {
847
- var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
848
- if (el.length) {
849
- this.result_clear_highlight();
850
- this.result_highlight = el;
851
- this.result_highlight.addClass("highlighted");
852
- maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
853
- visible_top = this.search_results.scrollTop();
854
- visible_bottom = maxHeight + visible_top;
855
- high_top = this.result_highlight.position().top + this.search_results.scrollTop();
856
- high_bottom = high_top + this.result_highlight.outerHeight();
857
- if (high_bottom >= visible_bottom) {
858
- return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
859
- } else if (high_top < visible_top) {
860
- return this.search_results.scrollTop(high_top);
861
- }
862
- }
863
- };
864
-
865
- Chosen.prototype.result_clear_highlight = function() {
866
- if (this.result_highlight) {
867
- this.result_highlight.removeClass("highlighted");
868
- }
869
- return this.result_highlight = null;
870
- };
871
-
872
- Chosen.prototype.results_show = function() {
873
- if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
874
- this.form_field_jq.trigger("chosen:maxselected", {
875
- chosen: this
876
- });
877
- return false;
878
- }
879
- this.container.addClass("chosen-with-drop");
880
- this.results_showing = true;
881
- this.search_field.focus();
882
- this.search_field.val(this.search_field.val());
883
- this.winnow_results();
884
- return this.form_field_jq.trigger("chosen:showing_dropdown", {
885
- chosen: this
886
- });
887
- };
888
-
889
- Chosen.prototype.update_results_content = function(content) {
890
- return this.search_results.html(content);
891
- };
892
-
893
- Chosen.prototype.results_hide = function() {
894
- if (this.results_showing) {
895
- this.result_clear_highlight();
896
- this.container.removeClass("chosen-with-drop");
897
- this.form_field_jq.trigger("chosen:hiding_dropdown", {
898
- chosen: this
899
- });
900
- }
901
- return this.results_showing = false;
902
- };
903
-
904
- Chosen.prototype.set_tab_index = function(el) {
905
- var ti;
906
- if (this.form_field.tabIndex) {
907
- ti = this.form_field.tabIndex;
908
- this.form_field.tabIndex = -1;
909
- return this.search_field[0].tabIndex = ti;
910
- }
911
- };
912
-
913
- Chosen.prototype.set_label_behavior = function() {
914
- var _this = this;
915
- this.form_field_label = this.form_field_jq.parents("label");
916
- if (!this.form_field_label.length && this.form_field.id.length) {
917
- this.form_field_label = $("label[for='" + this.form_field.id + "']");
918
- }
919
- if (this.form_field_label.length > 0) {
920
- return this.form_field_label.bind('click.chosen', function(evt) {
921
- if (_this.is_multiple) {
922
- return _this.container_mousedown(evt);
923
- } else {
924
- return _this.activate_field();
925
- }
926
- });
927
- }
928
- };
929
-
930
- Chosen.prototype.show_search_field_default = function() {
931
- if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
932
- this.search_field.val(this.default_text);
933
- return this.search_field.addClass("default");
934
- } else {
935
- this.search_field.val("");
936
- return this.search_field.removeClass("default");
937
- }
938
- };
939
-
940
- Chosen.prototype.search_results_mouseup = function(evt) {
941
- var target;
942
- target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
943
- if (target.length) {
944
- this.result_highlight = target;
945
- this.result_select(evt);
946
- return this.search_field.focus();
947
- }
948
- };
949
-
950
- Chosen.prototype.search_results_mouseover = function(evt) {
951
- var target;
952
- target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
953
- if (target) {
954
- return this.result_do_highlight(target);
955
- }
956
- };
957
-
958
- Chosen.prototype.search_results_mouseout = function(evt) {
959
- if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
960
- return this.result_clear_highlight();
961
- }
962
- };
963
-
964
- Chosen.prototype.choice_build = function(item) {
965
- var choice, close_link,
966
- _this = this;
967
- choice = $('<li />', {
968
- "class": "search-choice"
969
- }).html("<span>" + (this.choice_label(item)) + "</span>");
970
- if (item.disabled) {
971
- choice.addClass('search-choice-disabled');
972
- } else {
973
- close_link = $('<a />', {
974
- "class": 'search-choice-close',
975
- 'data-option-array-index': item.array_index
976
- });
977
- close_link.bind('click.chosen', function(evt) {
978
- return _this.choice_destroy_link_click(evt);
979
- });
980
- choice.append(close_link);
981
- }
982
- return this.search_container.before(choice);
983
- };
984
-
985
- Chosen.prototype.choice_destroy_link_click = function(evt) {
986
- evt.preventDefault();
987
- evt.stopPropagation();
988
- if (!this.is_disabled) {
989
- return this.choice_destroy($(evt.target));
990
- }
991
- };
992
-
993
- Chosen.prototype.choice_destroy = function(link) {
994
- if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
995
- this.show_search_field_default();
996
- if (this.is_multiple && this.choices_count() > 0 && this.search_field.val().length < 1) {
997
- this.results_hide();
998
- }
999
- link.parents('li').first().remove();
1000
- return this.search_field_scale();
1001
- }
1002
- };
1003
-
1004
- Chosen.prototype.results_reset = function() {
1005
- this.reset_single_select_options();
1006
- this.form_field.options[0].selected = true;
1007
- this.single_set_selected_text();
1008
- this.show_search_field_default();
1009
- this.results_reset_cleanup();
1010
- this.form_field_jq.trigger("change");
1011
- if (this.active_field) {
1012
- return this.results_hide();
1013
- }
1014
- };
1015
-
1016
- Chosen.prototype.results_reset_cleanup = function() {
1017
- this.current_selectedIndex = this.form_field.selectedIndex;
1018
- return this.selected_item.find("abbr").remove();
1019
- };
1020
-
1021
- Chosen.prototype.result_select = function(evt) {
1022
- var high, item;
1023
- if (this.result_highlight) {
1024
- high = this.result_highlight;
1025
- this.result_clear_highlight();
1026
- if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
1027
- this.form_field_jq.trigger("chosen:maxselected", {
1028
- chosen: this
1029
- });
1030
- return false;
1031
- }
1032
- if (this.is_multiple) {
1033
- high.removeClass("active-result");
1034
- } else {
1035
- this.reset_single_select_options();
1036
- }
1037
- high.addClass("result-selected");
1038
- item = this.results_data[high[0].getAttribute("data-option-array-index")];
1039
- item.selected = true;
1040
- this.form_field.options[item.options_index].selected = true;
1041
- this.selected_option_count = null;
1042
- if (this.is_multiple) {
1043
- this.choice_build(item);
1044
- } else {
1045
- this.single_set_selected_text(this.choice_label(item));
1046
- }
1047
- if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) {
1048
- this.results_hide();
1049
- }
1050
- this.search_field.val("");
1051
- if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
1052
- this.form_field_jq.trigger("change", {
1053
- 'selected': this.form_field.options[item.options_index].value
1054
- });
1055
- }
1056
- this.current_selectedIndex = this.form_field.selectedIndex;
1057
- evt.preventDefault();
1058
- return this.search_field_scale();
1059
- }
1060
- };
1061
-
1062
- Chosen.prototype.single_set_selected_text = function(text) {
1063
- if (text == null) {
1064
- text = this.default_text;
1065
- }
1066
- if (text === this.default_text) {
1067
- this.selected_item.addClass("chosen-default");
1068
- } else {
1069
- this.single_deselect_control_build();
1070
- this.selected_item.removeClass("chosen-default");
1071
- }
1072
- return this.selected_item.find("span").html(text);
1073
- };
1074
-
1075
- Chosen.prototype.result_deselect = function(pos) {
1076
- var result_data;
1077
- result_data = this.results_data[pos];
1078
- if (!this.form_field.options[result_data.options_index].disabled) {
1079
- result_data.selected = false;
1080
- this.form_field.options[result_data.options_index].selected = false;
1081
- this.selected_option_count = null;
1082
- this.result_clear_highlight();
1083
- if (this.results_showing) {
1084
- this.winnow_results();
1085
- }
1086
- this.form_field_jq.trigger("change", {
1087
- deselected: this.form_field.options[result_data.options_index].value
1088
- });
1089
- this.search_field_scale();
1090
- return true;
1091
- } else {
1092
- return false;
1093
- }
1094
- };
1095
-
1096
- Chosen.prototype.single_deselect_control_build = function() {
1097
- if (!this.allow_single_deselect) {
1098
- return;
1099
- }
1100
- if (!this.selected_item.find("abbr").length) {
1101
- this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
1102
- }
1103
- return this.selected_item.addClass("chosen-single-with-deselect");
1104
- };
1105
-
1106
- Chosen.prototype.get_search_text = function() {
1107
- return $('<div/>').text($.trim(this.search_field.val())).html();
1108
- };
1109
-
1110
- Chosen.prototype.winnow_results_set_highlight = function() {
1111
- var do_high, selected_results;
1112
- selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
1113
- do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
1114
- if (do_high != null) {
1115
- return this.result_do_highlight(do_high);
1116
- }
1117
- };
1118
-
1119
- Chosen.prototype.no_results = function(terms) {
1120
- var no_results_html;
1121
- no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
1122
- no_results_html.find("span").first().html(terms);
1123
- this.search_results.append(no_results_html);
1124
- return this.form_field_jq.trigger("chosen:no_results", {
1125
- chosen: this
1126
- });
1127
- };
1128
-
1129
- Chosen.prototype.no_results_clear = function() {
1130
- return this.search_results.find(".no-results").remove();
1131
- };
1132
-
1133
- Chosen.prototype.keydown_arrow = function() {
1134
- var next_sib;
1135
- if (this.results_showing && this.result_highlight) {
1136
- next_sib = this.result_highlight.nextAll("li.active-result").first();
1137
- if (next_sib) {
1138
- return this.result_do_highlight(next_sib);
1139
- }
1140
- } else {
1141
- return this.results_show();
1142
- }
1143
- };
1144
-
1145
- Chosen.prototype.keyup_arrow = function() {
1146
- var prev_sibs;
1147
- if (!this.results_showing && !this.is_multiple) {
1148
- return this.results_show();
1149
- } else if (this.result_highlight) {
1150
- prev_sibs = this.result_highlight.prevAll("li.active-result");
1151
- if (prev_sibs.length) {
1152
- return this.result_do_highlight(prev_sibs.first());
1153
- } else {
1154
- if (this.choices_count() > 0) {
1155
- this.results_hide();
1156
- }
1157
- return this.result_clear_highlight();
1158
- }
1159
- }
1160
- };
1161
-
1162
- Chosen.prototype.keydown_backstroke = function() {
1163
- var next_available_destroy;
1164
- if (this.pending_backstroke) {
1165
- this.choice_destroy(this.pending_backstroke.find("a").first());
1166
- return this.clear_backstroke();
1167
- } else {
1168
- next_available_destroy = this.search_container.siblings("li.search-choice").last();
1169
- if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
1170
- this.pending_backstroke = next_available_destroy;
1171
- if (this.single_backstroke_delete) {
1172
- return this.keydown_backstroke();
1173
- } else {
1174
- return this.pending_backstroke.addClass("search-choice-focus");
1175
- }
1176
- }
1177
- }
1178
- };
1179
-
1180
- Chosen.prototype.clear_backstroke = function() {
1181
- if (this.pending_backstroke) {
1182
- this.pending_backstroke.removeClass("search-choice-focus");
1183
- }
1184
- return this.pending_backstroke = null;
1185
- };
1186
-
1187
- Chosen.prototype.keydown_checker = function(evt) {
1188
- var stroke, _ref1;
1189
- stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
1190
- this.search_field_scale();
1191
- if (stroke !== 8 && this.pending_backstroke) {
1192
- this.clear_backstroke();
1193
- }
1194
- switch (stroke) {
1195
- case 8:
1196
- this.backstroke_length = this.search_field.val().length;
1197
- break;
1198
- case 9:
1199
- if (this.results_showing && !this.is_multiple) {
1200
- this.result_select(evt);
1201
- }
1202
- this.mouse_on_container = false;
1203
- break;
1204
- case 13:
1205
- if (this.results_showing) {
1206
- evt.preventDefault();
1207
- }
1208
- break;
1209
- case 32:
1210
- if (this.disable_search) {
1211
- evt.preventDefault();
1212
- }
1213
- break;
1214
- case 38:
1215
- evt.preventDefault();
1216
- this.keyup_arrow();
1217
- break;
1218
- case 40:
1219
- evt.preventDefault();
1220
- this.keydown_arrow();
1221
- break;
1222
- }
1223
- };
1224
-
1225
- Chosen.prototype.search_field_scale = function() {
1226
- var div, f_width, h, style, style_block, styles, w, _i, _len;
1227
- if (this.is_multiple) {
1228
- h = 0;
1229
- w = 0;
1230
- style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
1231
- styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
1232
- for (_i = 0, _len = styles.length; _i < _len; _i++) {
1233
- style = styles[_i];
1234
- style_block += style + ":" + this.search_field.css(style) + ";";
1235
- }
1236
- div = $('<div />', {
1237
- 'style': style_block
1238
- });
1239
- div.text(this.search_field.val());
1240
- $('body').append(div);
1241
- w = div.width() + 25;
1242
- div.remove();
1243
- f_width = this.container.outerWidth();
1244
- if (w > f_width - 10) {
1245
- w = f_width - 10;
1246
- }
1247
- return this.search_field.css({
1248
- 'width': w + 'px'
1249
- });
1250
- }
1251
- };
1252
-
1253
- return Chosen;
1254
-
1255
- })(AbstractChosen);
1256
-
1257
- }).call(this);
1258
-
1259
- /**
1260
- * jQuery Interdependencies library
1261
- *
1262
- * http://miohtama.github.com/jquery-interdependencies/
1263
- *
1264
- * Copyright 2012-2013 Mikko Ohtamaa, others
1265
- */
1266
-
1267
- /*global console, window*/
1268
-
1269
- (function($) {
1270
-
1271
- "use strict";
1272
-
1273
- /**
1274
- * Microsoft safe helper to spit out our little diagnostics information
1275
- *
1276
- * @ignore
1277
- */
1278
- function log(msg) {
1279
- if(window.console && window.console.log) {
1280
- console.log(msg);
1281
- }
1282
- }
1283
-
1284
-
1285
- /**
1286
- * jQuery.find() workaround for IE7
1287
- *
1288
- * If your selector is an pure tag id (#foo) IE7 finds nothing
1289
- * if you do jQuery.find() in a specific jQuery context.
1290
- *
1291
- * This workaround makes a (false) assumptions
1292
- * ids are always unique across the page.
1293
- *
1294
- * @ignore
1295
- *
1296
- * @param {jQuery} context jQuery context where we look child elements
1297
- * @param {String} selector selector as a string
1298
- * @return {jQuery} context.find() result
1299
- */
1300
- function safeFind(context, selector) {
1301
-
1302
- if(selector[0] == "#") {
1303
-
1304
- // Pseudo-check that this is a simple id selector
1305
- // and not a complex jQuery selector
1306
- if(selector.indexOf(" ") < 0) {
1307
- return $(selector);
1308
- }
1309
- }
1310
-
1311
- return context.find(selector);
1312
- }
1313
-
1314
- /**
1315
- * Sample configuration object which can be passed to {@link jQuery.deps#enable}
1316
- *
1317
- * @class Configuration
1318
- */
1319
- var configExample = {
1320
-
1321
- /**
1322
- * @cfg show Callback function show(elem) for showing elements
1323
- * @type {Function}
1324
- */
1325
- show : null,
1326
-
1327
- /**
1328
- * @cfg hide Callback function hide(elem) for hiding elements
1329
- * @type {Function}
1330
- */
1331
- hide : null,
1332
-
1333
- /**
1334
- * @cfg log Write console.log() output of rule applying
1335
- * @type {Boolean}
1336
- */
1337
- log : false,
1338
-
1339
-
1340
- /**
1341
- * @cfg checkTargets When ruleset is enabled, check that all controllers and controls referred by ruleset exist on the page.
1342
- *
1343
- * @default true
1344
- *
1345
- * @type {Boolean}
1346
- */
1347
- checkTargets : true
1348
-
1349
- };
1350
-
1351
- /**
1352
- * Define one field inter-dependency rule.
1353
- *
1354
- * When condition is true then this input and all
1355
- * its children rules' inputs are visible.
1356
- *
1357
- * Possible condition strings:
1358
- *
1359
- * * **==** Widget value must be equal to given value
1360
- *
1361
- * * **any** Widget value must be any of the values in the given value array
1362
- *
1363
- * * **non-any** Widget value must not be any of the values in the given value array
1364
- *
1365
- * * **!=** Widget value must not be qual to given value
1366
- *
1367
- * * **()** Call value as a function(context, controller, ourWidgetValue) and if it's true then the condition is true
1368
- *
1369
- * * **null** This input does not have any sub-conditions
1370
- *
1371
- *
1372
- *
1373
- */
1374
- function Rule(controller, condition, value) {
1375
- this.init(controller, condition, value);
1376
- }
1377
-
1378
- $.extend(Rule.prototype, {
1379
-
1380
- /**
1381
- * @method constructor
1382
- *
1383
- * @param {String} controller jQuery expression to match the `<input>` source
1384
- *
1385
- * @param {String} condition What input value must be that {@link Rule the rule takes effective}.
1386
- *
1387
- * @param value Matching value of **controller** when widgets become visible
1388
- *
1389
- */
1390
- init : function(controller, condition, value) {
1391
- this.controller = controller;
1392
-
1393
- this.condition = condition;
1394
-
1395
- this.value = value;
1396
-
1397
- // Child rules
1398
- this.rules = [];
1399
-
1400
- // Controls shown/hidden by this rule
1401
- this.controls = [];
1402
- },
1403
-
1404
- /**
1405
- * Evaluation engine
1406
- *
1407
- * @param {String} condition Any of given conditions in Rule class description
1408
- * @param {Object} val1 The base value we compare against
1409
- * @param {Object} val2 Something we got out of input
1410
- * @return {Boolean} true or false
1411
- */
1412
- evalCondition : function(context, control, condition, val1, val2) {
1413
-
1414
- /**
1415
- *
1416
- * ShapedPlugin Framework
1417
- * Added new condition for ShapedPlugin Framework
1418
- *
1419
- * @since 1.0.0
1420
- * @version 1.0.0
1421
- *
1422
- */
1423
- if(condition == "==") {
1424
- return this.checkBoolean(val1) == this.checkBoolean(val2);
1425
- } else if(condition == "!=") {
1426
- return this.checkBoolean(val1) != this.checkBoolean(val2);
1427
- } else if(condition == ">=") {
1428
- return Number(val2) >= Number(val1);
1429
- } else if(condition == "<=") {
1430
- return Number(val2) <= Number(val1);
1431
- } else if(condition == ">") {
1432
- return Number(val2) > Number(val1);
1433
- } else if(condition == "<") {
1434
- return Number(val2) < Number(val1);
1435
- } else if(condition == "()") {
1436
- return window[val1](context, control, val2); // FIXED: function method
1437
- } else if(condition == "any") {
1438
- return $.inArray(val2, val1.split(',')) > -1;
1439
- } else if(condition == "not-any") {
1440
- return $.inArray(val2, val1.split(',')) == -1;
1441
- } else {
1442
- throw new Error("Unknown condition:" + condition);
1443
- }
1444
-
1445
- },
1446
-
1447
- /**
1448
- *
1449
- * ShapedPlugin Framework
1450
- * Added Boolean value type checker
1451
- *
1452
- * @since 1.0.0
1453
- * @version 1.0.0
1454
- *
1455
- */
1456
- checkBoolean: function(value) {
1457
-
1458
- switch(value) {
1459
-
1460
- case true:
1461
- case 'true':
1462
- case 1:
1463
- case '1':
1464
- //case 'on':
1465
- //case 'yes':
1466
- value = true;
1467
- break;
1468
-
1469
- case false:
1470
- case 'false':
1471
- case 0:
1472
- case '0':
1473
- //case 'off':
1474
- //case 'no':
1475
- value = false;
1476
- break;
1477
-
1478
- }
1479
-
1480
- return value;
1481
- },
1482
-
1483
- /**
1484
- * Evaluate the condition of this rule in given jQuery context.
1485
- *
1486
- * The widget value is extracted using getControlValue()
1487
- *
1488
- * @param {jQuery} context The jQuery selection in which this rule is evaluated.
1489
- *
1490
- */
1491
- checkCondition : function(context, cfg) {
1492
-
1493
- // We do not have condition set, we are always true
1494
- if(!this.condition) {
1495
- return true;
1496
- }
1497
-
1498
- var control = context.find(this.controller);
1499
- if(control.size() === 0 && cfg.log) {
1500
- log("Evaling condition: Could not find controller input " + this.controller);
1501
- }
1502
-
1503
- var val = this.getControlValue(context, control);
1504
- if(cfg.log && val === undefined) {
1505
- log("Evaling condition: Could not exctract value from input " + this.controller);
1506
- }
1507
-
1508
- if(val === undefined) {
1509
- return false;
1510
- }
1511
-
1512
- val = this.normalizeValue(control, this.value, val);
1513
-
1514
- return this.evalCondition(context, control, this.condition, this.value, val);
1515
- },
1516
-
1517
- /**
1518
- * Make sure that what we read from input field is comparable against Javascript primitives
1519
- *
1520
- */
1521
- normalizeValue : function(control, baseValue, val) {
1522
-
1523
- if(typeof baseValue == "number") {
1524
- // Make sure we compare numbers against numbers
1525
- return parseFloat(val);
1526
- }
1527
-
1528
- return val;
1529
- },
1530
-
1531
- /**
1532
- * Read value from a diffent HTML controls.
1533
- *
1534
- * Handle, text, checkbox, radio, select.
1535
- *
1536
- */
1537
- getControlValue : function(context, control) {
1538
-
1539
- /**
1540
- *
1541
- * ShapedPlugin Framework
1542
- * Added multiple checkbox value control
1543
- *
1544
- * @since 1.0.0
1545
- * @version 1.0.0
1546
- *
1547
- */
1548
- if( ( control.attr("type") == "radio" || control.attr("type") == "checkbox" ) && control.size() > 1 ) {
1549
- return control.filter(":checked").val();
1550
- }
1551
-
1552
- // Handle individual checkboxes & radio
1553
- if ( control.attr("type") == "checkbox" || control.attr("type") == "radio" ) {
1554
- return control.is(":checked");
1555
- }
1556
-
1557
- return control.val();
1558
-
1559
- },
1560
-
1561
- /**
1562
- * Create a sub-rule.
1563
- *
1564
- * Example:
1565
- *
1566
- * var masterSwitch = ruleset.createRule("#mechanicalThrombectomyDevice")
1567
- * var twoAttempts = masterSwitch.createRule("#numberOfAttempts", "==", 2);
1568
- *
1569
- * @return Rule instance
1570
- */
1571
- createRule : function(controller, condition, value) {
1572
- var rule = new Rule(controller, condition, value);
1573
- this.rules.push(rule);
1574
- return rule;
1575
- },
1576
-
1577
- /**
1578
- * Include a control in this rule.
1579
- *
1580
- * @param {String} input jQuery expression to match the input within ruleset context
1581
- */
1582
- include : function(input) {
1583
-
1584
- if(!input) {
1585
- throw new Error("Must give an input selector");
1586
- }
1587
-
1588
- this.controls.push(input);
1589
- },
1590
-
1591
- /**
1592
- * Apply this rule to all controls in the given context
1593
- *
1594
- * @param {jQuery} context jQuery selection within we operate
1595
- * @param {Object} cfg {@link Configuration} object or undefined
1596
- * @param {Object} enforced Recursive rule enforcer: undefined to evaluate condition, true show always, false hide always
1597
- *
1598
- */
1599
- applyRule : function(context, cfg, enforced) {
1600
-
1601
- var result;
1602
-
1603
- if(enforced === undefined) {
1604
- result = this.checkCondition(context, cfg);
1605
- } else {
1606
- result = enforced;
1607
- }
1608
-
1609
- if(cfg.log) {
1610
- log("Applying rule on " + this.controller + "==" + this.value + " enforced:" + enforced + " result:" + result);
1611
- }
1612
-
1613
- if(cfg.log && !this.controls.length) {
1614
- log("Zero length controls slipped through");
1615
- }
1616
-
1617
- // Get show/hide callback functions
1618
-
1619
- var show = cfg.show || function(control) {
1620
- control.show();
1621
- };
1622
-
1623
- var hide = cfg.hide || function(control) {
1624
- control.hide();
1625
- };
1626
-
1627
-
1628
- // Resolve controls from ids to jQuery selections
1629
- // we are controlling in this context
1630
- var controls = $.map(this.controls, function(elem, idx) {
1631
- var control = context.find(elem);
1632
- if(cfg.log && control.size() === 0) {
1633
- log("Could not find element:" + elem);
1634
- }
1635
- return control;
1636
- });
1637
-
1638
- if(result) {
1639
-
1640
- $(controls).each(function() {
1641
-
1642
-
1643
- // Some friendly debug info
1644
- if(cfg.log && $(this).size() === 0) {
1645
- log("Control selection is empty when showing");
1646
- log(this);
1647
- }
1648
-
1649
- show(this);
1650
- });
1651
-
1652
- // Evaluate all child rules
1653
- $(this.rules).each(function() {
1654
- this.applyRule(context, cfg);
1655
- });
1656
-
1657
- } else {
1658
-
1659
- $(controls).each(function() {
1660
-
1661
- // Some friendly debug info
1662
- if(cfg.log && $(this).size() === 0) {
1663
- log("Control selection is empty when hiding:");
1664
- log(this);
1665
- }
1666
-
1667
- hide(this);
1668
- });
1669
-
1670
- // Supress all child rules
1671
- $(this.rules).each(function() {
1672
- this.applyRule(context, cfg, false);
1673
- });
1674
- }
1675
- }
1676
- });
1677
-
1678
- /**
1679
- * A class which manages interdependenice rules.
1680
- */
1681
- function Ruleset() {
1682
-
1683
- // Hold a tree of rules
1684
- this.rules = [];
1685
- }
1686
-
1687
- $.extend(Ruleset.prototype, {
1688
-
1689
- /**
1690
- * Add a new rule into this ruletset.
1691
- *
1692
- * See {@link Rule} about the contstruction parameters.
1693
- * @return {Rule}
1694
- */
1695
- createRule : function(controller, condition, value) {
1696
- var rule = new Rule(controller, condition, value);
1697
- this.rules.push(rule);
1698
- return rule;
1699
- },
1700
-
1701
- /**
1702
- * Apply these rules on an element.
1703
- *
1704
- * @param {jQuery} context Selection we are dealing with
1705
- *
1706
- * @param cfg {@link Configuration} object or undefined.
1707
- */
1708
- applyRules: function(context, cfg) {
1709
- var i;
1710
-
1711
- cfg = cfg || {};
1712
-
1713
- if(cfg.log) {
1714
- log("Starting evaluation ruleset of " + this.rules.length + " rules");
1715
- }
1716
-
1717
- for(i=0; i<this.rules.length; i++) {
1718
- this.rules[i].applyRule(context, cfg);
1719
- }
1720
- },
1721
-
1722
- /**
1723
- * Walk all rules and sub-rules in this ruleset
1724
- * @param {Function} callback(rule)
1725
- *
1726
- * @return {Array} Rules as depth-first searched
1727
- */
1728
- walk : function() {
1729
-
1730
- var rules = [];
1731
-
1732
- function descent(rule) {
1733
-
1734
- rules.push(rule);
1735
-
1736
- $(rule.children).each(function() {
1737
- descent(this);
1738
- });
1739
- }
1740
-
1741
- $(this.rules).each(function() {
1742
- descent(this);
1743
- });
1744
-
1745
- return rules;
1746
- },
1747
-
1748
-
1749
- /**
1750
- * Check that all controllers and controls referred in ruleset exist.
1751
- *
1752
- * Throws an Error if any of them are missing.
1753
- *
1754
- * @param {jQuery} context jQuery selection of items
1755
- *
1756
- * @param {Configuration} cfg
1757
- */
1758
- checkTargets : function(context, cfg) {
1759
-
1760
- var controls = 0;
1761
- var rules = this.walk();
1762
-
1763
- $(rules).each(function() {
1764
-
1765
- if(context.find(this.controller).size() === 0) {
1766
- throw new Error("Rule's controller does not exist:" + this.controller);
1767
- }
1768
-
1769
- if(this.controls.length === 0) {
1770
- throw new Error("Rule has no controls:" + this);
1771
- }
1772
-
1773
- $(this.controls).each(function() {
1774
-
1775
- if(safeFind(context, this) === 0) {
1776
- throw new Error("Rule's target control " + this + " does not exist in context " + context.get(0));
1777
- }
1778
-
1779
- controls++;
1780
- });
1781
-
1782
- });
1783
-
1784
- if(cfg.log) {
1785
- log("Controller check ok, rules count " + rules.length + " controls count " + controls);
1786
- }
1787
-
1788
- },
1789
-
1790
- /**
1791
- * Make this ruleset effective on the whole page.
1792
- *
1793
- * Set event handler on **window.document** to catch all input events
1794
- * and apply those events to defined rules.
1795
- *
1796
- * @param {Configuration} cfg {@link Configuration} object or undefined
1797
- *
1798
- */
1799
- install : function(cfg) {
1800
- $.deps.enable($(document.body), this, cfg);
1801
- }
1802
-
1803
- });
1804
-
1805
- /**
1806
- * jQuery interdependencie plug-in
1807
- *
1808
- * @class jQuery.deps
1809
- *
1810
- */
1811
- var deps = {
1812
-
1813
- /**
1814
- * Create a new Ruleset instance.
1815
- *
1816
- * Example:
1817
- *
1818
- * $(document).ready(function() {
1819
- * // Start creating a new ruleset
1820
- * var ruleset = $.deps.createRuleset();
1821
- *
1822
- *
1823
- * @return {Ruleset}
1824
- */
1825
- createRuleset : function() {
1826
- return new Ruleset();
1827
- },
1828
-
1829
-
1830
- /**
1831
- * Enable ruleset on a specific jQuery selection.
1832
- *
1833
- * Checks the existince of all ruleset controllers and controls
1834
- * by default (see config).
1835
- *
1836
- * See possible IE event bubbling problems: http://stackoverflow.com/q/265074/315168
1837
- *
1838
- * @param {Object} selection jQuery selection in where we monitor all change events. All controls and controllers must exist within this selection.
1839
- * @param {Ruleset} ruleset
1840
- * @param {Configuration} cfg
1841
- */
1842
- enable : function(selection, ruleset, cfg) {
1843
-
1844
- cfg = cfg || {};
1845
-
1846
- if(cfg.checkTargets || cfg.checkTargets === undefined) {
1847
- ruleset.checkTargets(selection, cfg);
1848
- }
1849
-
1850
- var self = this;
1851
-
1852
- if(cfg.log) {
1853
- log("Enabling dependency change monitoring on " + selection.get(0));
1854
- }
1855
-
1856
- // Namespace our handler to avoid conflicts
1857
- //
1858
- var handler = function() { ruleset.applyRules(selection, cfg); };
1859
- var val = selection.on ? selection.on("change.deps", null, null, handler) : selection.live("change.deps", handler);
1860
-
1861
- ruleset.applyRules(selection, cfg);
1862
-
1863
- return val;
1864
- }
1865
- };
1866
-
1867
- $.deps = deps;
1868
-
1869
- })(jQuery);
1870
- ;/* ========================================================================
1871
- * Bootstrap: transition.js v3.3.4
1872
- * http://getbootstrap.com/javascript/#transitions
1873
- * ========================================================================
1874
- * Copyright 2011-2015 Twitter, Inc.
1875
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1876
- * ========================================================================
1877
- * Changed function name for avoid conflict
1878
- * ======================================================================== */
1879
- +function ($) {
1880
- 'use strict';
1881
-
1882
- // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
1883
- // ============================================================
1884
-
1885
- function transitionEnd() {
1886
- var el = document.createElement('bootstrap')
1887
-
1888
- var transEndEventNames = {
1889
- WebkitTransition : 'webkitTransitionEnd',
1890
- MozTransition : 'transitionend',
1891
- OTransition : 'oTransitionEnd otransitionend',
1892
- transition : 'transitionend'
1893
- }
1894
-
1895
- for (var name in transEndEventNames) {
1896
- if (el.style[name] !== undefined) {
1897
- return { end: transEndEventNames[name] }
1898
- }
1899
- }
1900
-
1901
- return false // explicit for ie8 ( ._.)
1902
- }
1903
-
1904
- // http://blog.alexmaccaw.com/css-transitions
1905
- $.fn.CSemulateTransitionEnd = function (duration) {
1906
- var called = false
1907
- var $el = this
1908
- $(this).one('bsTransitionEnd', function () { called = true })
1909
- var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
1910
- setTimeout(callback, duration)
1911
- return this
1912
- }
1913
-
1914
- $(function () {
1915
- $.support.transition = transitionEnd()
1916
-
1917
- if (!$.support.transition) return
1918
-
1919
- $.event.special.bsTransitionEnd = {
1920
- bindType: $.support.transition.end,
1921
- delegateType: $.support.transition.end,
1922
- handle: function (e) {
1923
- if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
1924
- }
1925
- }
1926
- })
1927
-
1928
- }(jQuery);
1929
-
1930
- /* ========================================================================
1931
- * Bootstrap: tooltip.js v3.3.4
1932
- * http://getbootstrap.com/javascript/#tooltip
1933
- * Inspired by the original jQuery.tipsy by Jason Frame
1934
- * ========================================================================
1935
- * Copyright 2011-2015 Twitter, Inc.
1936
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1937
- * ========================================================================
1938
- * Changed function and class names for avoid conflict
1939
- * ======================================================================== */
1940
- +function ($) {
1941
- 'use strict';
1942
-
1943
- // TOOLTIP PUBLIC CLASS DEFINITION
1944
- // ===============================
1945
-
1946
- var SPTooltip = function (element, options) {
1947
- this.type = null
1948
- this.options = null
1949
- this.enabled = null
1950
- this.timeout = null
1951
- this.hoverState = null
1952
- this.$element = null
1953
-
1954
- this.init('sptooltip', element, options)
1955
- }
1956
-
1957
- SPTooltip.VERSION = '3.3.4'
1958
-
1959
- SPTooltip.TRANSITION_DURATION = 150
1960
-
1961
- SPTooltip.DEFAULTS = {
1962
- animation: true,
1963
- placement: 'top',
1964
- selector: false,
1965
- template: '<div class="sp-tooltip" role="tooltip"><div class="sp-tooltip-arrow"></div><div class="sp-tooltip-inner"></div></div>',
1966
- trigger: 'hover focus',
1967
- title: '',
1968
- delay: 0,
1969
- html: false,
1970
- container: false,
1971
- viewport: {
1972
- selector: 'body',
1973
- padding: 0
1974
- }
1975
- }
1976
-
1977
- SPTooltip.prototype.init = function (type, element, options) {
1978
- this.enabled = true
1979
- this.type = type
1980
- this.$element = $(element)
1981
- this.options = this.getOptions(options)
1982
- this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
1983
-
1984
- if (this.$element[0] instanceof document.constructor && !this.options.selector) {
1985
- throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
1986
- }
1987
-
1988
- var triggers = this.options.trigger.split(' ')
1989
-
1990
- for (var i = triggers.length; i--;) {
1991
- var trigger = triggers[i]
1992
-
1993
- if (trigger == 'click') {
1994
- this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
1995
- } else if (trigger != 'manual') {
1996
- var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
1997
- var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
1998
-
1999
- this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
2000
- this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
2001
- }
2002
- }
2003
-
2004
- this.options.selector ?
2005
- (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
2006
- this.fixTitle()
2007
- }
2008
-
2009
- SPTooltip.prototype.getDefaults = function () {
2010
- return SPTooltip.DEFAULTS
2011
- }
2012
-
2013
- SPTooltip.prototype.getOptions = function (options) {
2014
- options = $.extend({}, this.getDefaults(), this.$element.data(), options)
2015
-
2016
- if (options.delay && typeof options.delay == 'number') {
2017
- options.delay = {
2018
- show: options.delay,
2019
- hide: options.delay
2020
- }
2021
- }
2022
-
2023
- return options
2024
- }
2025
-
2026
- SPTooltip.prototype.getDelegateOptions = function () {
2027
- var options = {}
2028
- var defaults = this.getDefaults()
2029
-
2030
- this._options && $.each(this._options, function (key, value) {
2031
- if (defaults[key] != value) options[key] = value
2032
- })
2033
-
2034
- return options
2035
- }
2036
-
2037
- SPTooltip.prototype.enter = function (obj) {
2038
- var self = obj instanceof this.constructor ?
2039
- obj : $(obj.currentTarget).data('bs.' + this.type)
2040
-
2041
- if (self && self.$tip && self.$tip.is(':visible')) {
2042
- self.hoverState = 'in'
2043
- return
2044
- }
2045
-
2046
- if (!self) {
2047
- self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
2048
- $(obj.currentTarget).data('bs.' + this.type, self)
2049
- }
2050
-
2051
- clearTimeout(self.timeout)
2052
-
2053
- self.hoverState = 'in'
2054
-
2055
- if (!self.options.delay || !self.options.delay.show) return self.show()
2056
-
2057
- self.timeout = setTimeout(function () {
2058
- if (self.hoverState == 'in') self.show()
2059
- }, self.options.delay.show)
2060
- }
2061
-
2062
- SPTooltip.prototype.leave = function (obj) {
2063
- var self = obj instanceof this.constructor ?
2064
- obj : $(obj.currentTarget).data('bs.' + this.type)
2065
-
2066
- if (!self) {
2067
- self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
2068
- $(obj.currentTarget).data('bs.' + this.type, self)
2069
- }
2070
-
2071
- clearTimeout(self.timeout)
2072
-
2073
- self.hoverState = 'out'
2074
-
2075
- if (!self.options.delay || !self.options.delay.hide) return self.hide()
2076
-
2077
- self.timeout = setTimeout(function () {
2078
- if (self.hoverState == 'out') self.hide()
2079
- }, self.options.delay.hide)
2080
- }
2081
-
2082
- SPTooltip.prototype.show = function () {
2083
- var e = $.Event('show.bs.' + this.type)
2084
-
2085
- if (this.hasContent() && this.enabled) {
2086
- this.$element.trigger(e)
2087
-
2088
- var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
2089
- if (e.isDefaultPrevented() || !inDom) return
2090
- var that = this
2091
-
2092
- var $tip = this.tip()
2093
-
2094
- var tipId = this.getUID(this.type)
2095
-
2096
- this.setContent()
2097
- $tip.attr('id', tipId)
2098
- this.$element.attr('aria-describedby', tipId)
2099
-
2100
- if (this.options.animation) $tip.addClass('fade')
2101
-
2102
- var placement = typeof this.options.placement == 'function' ?
2103
- this.options.placement.call(this, $tip[0], this.$element[0]) :
2104
- this.options.placement
2105
-
2106
- var autoToken = /\s?auto?\s?/i
2107
- var autoPlace = autoToken.test(placement)
2108
- if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
2109
-
2110
- $tip
2111
- .detach()
2112
- .css({ top: 0, left: 0, display: 'block' })
2113
- .addClass(placement)
2114
- .data('bs.' + this.type, this)
2115
-
2116
- this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
2117
-
2118
- var pos = this.getPosition()
2119
- var actualWidth = $tip[0].offsetWidth
2120
- var actualHeight = $tip[0].offsetHeight
2121
-
2122
- if (autoPlace) {
2123
- var orgPlacement = placement
2124
- var $container = this.options.container ? $(this.options.container) : this.$element.parent()
2125
- var containerDim = this.getPosition($container)
2126
-
2127
- placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' :
2128
- placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' :
2129
- placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :
2130
- placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' :
2131
- placement
2132
-
2133
- $tip
2134
- .removeClass(orgPlacement)
2135
- .addClass(placement)
2136
- }
2137
-
2138
- var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
2139
-
2140
- this.applyPlacement(calculatedOffset, placement)
2141
-
2142
- var complete = function () {
2143
- var prevHoverState = that.hoverState
2144
- that.$element.trigger('shown.bs.' + that.type)
2145
- that.hoverState = null
2146
-
2147
- if (prevHoverState == 'out') that.leave(that)
2148
- }
2149
-
2150
- $.support.transition && this.$tip.hasClass('fade') ?
2151
- $tip
2152
- .one('bsTransitionEnd', complete)
2153
- .CSemulateTransitionEnd(SPTooltip.TRANSITION_DURATION) :
2154
- complete()
2155
- }
2156
- }
2157
-
2158
- SPTooltip.prototype.applyPlacement = function (offset, placement) {
2159
- var $tip = this.tip()
2160
- var width = $tip[0].offsetWidth
2161
- var height = $tip[0].offsetHeight
2162
-
2163
- // manually read margins because getBoundingClientRect includes difference
2164
- var marginTop = parseInt($tip.css('margin-top'), 10)
2165
- var marginLeft = parseInt($tip.css('margin-left'), 10)
2166
-
2167
- // we must check for NaN for ie 8/9
2168
- if (isNaN(marginTop)) marginTop = 0
2169
- if (isNaN(marginLeft)) marginLeft = 0
2170
-
2171
- offset.top = offset.top + marginTop
2172
- offset.left = offset.left + marginLeft
2173
-
2174
- // $.fn.offset doesn't round pixel values
2175
- // so we use setOffset directly with our own function B-0
2176
- $.offset.setOffset($tip[0], $.extend({
2177
- using: function (props) {
2178
- $tip.css({
2179
- top: Math.round(props.top),
2180
- left: Math.round(props.left)
2181
- })
2182
- }
2183
- }, offset), 0)
2184
-
2185
- $tip.addClass('in')
2186
-
2187
- // check to see if placing tip in new offset caused the tip to resize itself
2188
- var actualWidth = $tip[0].offsetWidth
2189
- var actualHeight = $tip[0].offsetHeight
2190
-
2191
- if (placement == 'top' && actualHeight != height) {
2192
- offset.top = offset.top + height - actualHeight
2193
- }
2194
-
2195
- var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
2196
-
2197
- if (delta.left) offset.left += delta.left
2198
- else offset.top += delta.top
2199
-
2200
- var isVertical = /top|bottom/.test(placement)
2201
- var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
2202
- var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
2203
-
2204
- $tip.offset(offset)
2205
- this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
2206
- }
2207
-
2208
- SPTooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
2209
- this.arrow()
2210
- .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
2211
- .css(isVertical ? 'top' : 'left', '')
2212
- }
2213
-
2214
- SPTooltip.prototype.setContent = function () {
2215
- var $tip = this.tip()
2216
- var title = this.getTitle()
2217
-
2218
- $tip.find('.sp-tooltip-inner')[this.options.html ? 'html' : 'text'](title)
2219
- $tip.removeClass('fade in top bottom left right')
2220
- }
2221
-
2222
- SPTooltip.prototype.hide = function (callback) {
2223
- var that = this
2224
- var $tip = $(this.$tip)
2225
- var e = $.Event('hide.bs.' + this.type)
2226
-
2227
- function complete() {
2228
- if (that.hoverState != 'in') $tip.detach()
2229
- that.$element
2230
- .removeAttr('aria-describedby')
2231
- .trigger('hidden.bs.' + that.type)
2232
- callback && callback()
2233
- }
2234
-
2235
- this.$element.trigger(e)
2236
-
2237
- if (e.isDefaultPrevented()) return
2238
-
2239
- $tip.removeClass('in')
2240
-
2241
- $.support.transition && $tip.hasClass('fade') ?
2242
- $tip
2243
- .one('bsTransitionEnd', complete)
2244
- .CSemulateTransitionEnd(SPTooltip.TRANSITION_DURATION) :
2245
- complete()
2246
-
2247
- this.hoverState = null
2248
-
2249
- return this
2250
- }
2251
-
2252
- SPTooltip.prototype.fixTitle = function () {
2253
- var $e = this.$element
2254
- if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {
2255
- $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
2256
- }
2257
- }
2258
-
2259
- SPTooltip.prototype.hasContent = function () {
2260
- return this.getTitle()
2261
- }
2262
-
2263
- SPTooltip.prototype.getPosition = function ($element) {
2264
- $element = $element || this.$element
2265
-
2266
- var el = $element[0]
2267
- var isBody = el.tagName == 'BODY'
2268
-
2269
- var elRect = el.getBoundingClientRect()
2270
- if (elRect.width == null) {
2271
- // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
2272
- elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
2273
- }
2274
- var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
2275
- var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
2276
- var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
2277
-
2278
- return $.extend({}, elRect, scroll, outerDims, elOffset)
2279
- }
2280
-
2281
- SPTooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
2282
- return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
2283
- placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
2284
- placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
2285
- /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
2286
-
2287
- }
2288
-
2289
- SPTooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
2290
- var delta = { top: 0, left: 0 }
2291
- if (!this.$viewport) return delta
2292
-
2293
- var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
2294
- var viewportDimensions = this.getPosition(this.$viewport)
2295
-
2296
- if (/right|left/.test(placement)) {
2297
- var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
2298
- var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
2299
- if (topEdgeOffset < viewportDimensions.top) { // top overflow
2300
- delta.top = viewportDimensions.top - topEdgeOffset
2301
- } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
2302
- delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
2303
- }
2304
- } else {
2305
- var leftEdgeOffset = pos.left - viewportPadding
2306
- var rightEdgeOffset = pos.left + viewportPadding + actualWidth
2307
- if (leftEdgeOffset < viewportDimensions.left) { // left overflow
2308
- delta.left = viewportDimensions.left - leftEdgeOffset
2309
- } else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
2310
- delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
2311
- }
2312
- }
2313
-
2314
- return delta
2315
- }
2316
-
2317
- SPTooltip.prototype.getTitle = function () {
2318
- var title
2319
- var $e = this.$element
2320
- var o = this.options
2321
-
2322
- title = $e.attr('data-original-title')
2323
- || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
2324
-
2325
- return title
2326
- }
2327
-
2328
- SPTooltip.prototype.getUID = function (prefix) {
2329
- do prefix += ~~(Math.random() * 1000000)
2330
- while (document.getElementById(prefix))
2331
- return prefix
2332
- }
2333
-
2334
- SPTooltip.prototype.tip = function () {
2335
- return (this.$tip = this.$tip || $(this.options.template))
2336
- }
2337
-
2338
- SPTooltip.prototype.arrow = function () {
2339
- return (this.$arrow = this.$arrow || this.tip().find('.sp-tooltip-arrow'))
2340
- }
2341
-
2342
- SPTooltip.prototype.enable = function () {
2343
- this.enabled = true
2344
- }
2345
-
2346
- SPTooltip.prototype.disable = function () {
2347
- this.enabled = false
2348
- }
2349
-
2350
- SPTooltip.prototype.toggleEnabled = function () {
2351
- this.enabled = !this.enabled
2352
- }
2353
-
2354
- SPTooltip.prototype.toggle = function (e) {
2355
- var self = this
2356
- if (e) {
2357
- self = $(e.currentTarget).data('bs.' + this.type)
2358
- if (!self) {
2359
- self = new this.constructor(e.currentTarget, this.getDelegateOptions())
2360
- $(e.currentTarget).data('bs.' + this.type, self)
2361
- }
2362
- }
2363
-
2364
- self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
2365
- }
2366
-
2367
- SPTooltip.prototype.destroy = function () {
2368
- var that = this
2369
- clearTimeout(this.timeout)
2370
- this.hide(function () {
2371
- that.$element.off('.' + that.type).removeData('bs.' + that.type)
2372
- })
2373
- }
2374
-
2375
-
2376
- // TOOLTIP PLUGIN DEFINITION
2377
- // =========================
2378
-
2379
- function Plugin(option) {
2380
- return this.each(function () {
2381
- var $this = $(this)
2382
- var data = $this.data('bs.sptooltip')
2383
- var options = typeof option == 'object' && option
2384
-
2385
- if (!data && /destroy|hide/.test(option)) return
2386
- if (!data) $this.data('bs.sptooltip', (data = new SPTooltip(this, options)))
2387
- if (typeof option == 'string') data[option]()
2388
- })
2389
- }
2390
-
2391
- var old = $.fn.sptooltip
2392
-
2393
- $.fn.sptooltip = Plugin
2394
- $.fn.sptooltip.Constructor = SPTooltip
2395
-
2396
-
2397
- // TOOLTIP NO CONFLICT
2398
- // ===================
2399
-
2400
- $.fn.sptooltip.noConflict = function () {
2401
- $.fn.sptooltip = old
2402
- return this
2403
- }
2404
-
2405
- }(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/assets/js/sp-plugins.min.js DELETED
@@ -1,3 +0,0 @@
1
- /* ShapedPlugin Framework | A Lightweight and easy-to-use WordPress Options Framework - v1.0.0*/
2
- (function(){var a,b,c,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};d=function(){function a(){this.options_index=0,this.parsed=[]}return a.prototype.add_node=function(a){return"OPTGROUP"===a.nodeName.toUpperCase()?this.add_group(a):this.add_option(a)},a.prototype.add_group=function(a){var b,c,d,e,f,g;for(b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:this.escapeExpression(a.label),title:a.title?a.title:void 0,children:0,disabled:a.disabled,classes:a.className}),f=a.childNodes,g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},a.prototype.add_option=function(a,b,c){return"OPTION"===a.nodeName.toUpperCase()?(""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,title:a.title?a.title:void 0,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,group_label:null!=b?this.parsed[b].label:null,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},a.prototype.escapeExpression=function(a){var b,c;return null==a||a===!1?"":/[\&\<\>\"\'\`]/.test(a)?(b={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},c=/&(?!\w+;)|[\<\>\"\'\`]/g,a.replace(c,function(a){return b[a]||"&amp;"})):a},a}(),d.select_to_array=function(a){var b,c,e,f,g;for(c=new d,g=a.childNodes,e=0,f=g.length;f>e;e++)b=g[e],c.add_node(b);return c.parsed},b=function(){function a(b,c){this.form_field=b,this.options=null!=c?c:{},a.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 a.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,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:!1,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:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,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:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1},a.prototype.set_default_text=function(){return this.default_text=this.form_field.getAttribute("data-placeholder")?this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.options.placeholder_text_multiple||this.options.placeholder_text||a.default_multiple_text:this.options.placeholder_text_single||this.options.placeholder_text||a.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||a.default_no_result_text},a.prototype.choice_label=function(a){return this.include_group_label_in_selected&&null!=a.group_label?"<b class='group-name'>"+a.group_label+"</b>"+a.html:a.html},a.prototype.mouse_enter=function(){return this.mouse_on_container=!0},a.prototype.mouse_leave=function(){return this.mouse_on_container=!1},a.prototype.input_focus=function(){var a=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return a.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},a.prototype.input_blur=function(){var a=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return a.blur_test()},100))},a.prototype.results_option_build=function(a){var b,c,d,e,f;for(b="",f=this.results_data,d=0,e=f.length;e>d;d++)c=f[d],b+=c.group?this.result_add_group(c):this.result_add_option(c),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(c)));return b},a.prototype.result_add_option=function(a){var b,c;return a.search_match&&this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.style.cssText=a.style,c.setAttribute("data-option-array-index",a.array_index),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):""},a.prototype.result_add_group=function(a){var b,c;return(a.search_match||a.group_match)&&a.active_options>0?(b=[],b.push("group-result"),a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):""},a.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},a.prototype.reset_single_select_options=function(){var a,b,c,d,e;for(d=this.results_data,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.selected?a.selected=!1:void 0);return e},a.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},a.prototype.results_search=function(){return this.results_showing?this.winnow_results():this.results_show()},a.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l;for(this.no_results_clear(),d=0,f=this.get_search_text(),a=f.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),i=new RegExp(a,"i"),c=this.get_search_regex(a),l=this.results_data,j=0,k=l.length;k>j;j++)b=l[j],b.search_match=!1,e=null,this.include_option_in_results(b)&&(b.group&&(b.group_match=!1,b.active_options=0),null!=b.group_array_index&&this.results_data[b.group_array_index]&&(e=this.results_data[b.group_array_index],0===e.active_options&&e.search_match&&(d+=1),e.active_options+=1),b.search_text=b.group?b.label:b.html,(!b.group||this.group_search)&&(b.search_match=this.search_string_match(b.search_text,c),b.search_match&&!b.group&&(d+=1),b.search_match?(f.length&&(g=b.search_text.search(i),h=b.search_text.substr(0,g+f.length)+"</em>"+b.search_text.substr(g+f.length),b.search_text=h.substr(0,g)+"<em>"+h.substr(g)),null!=e&&(e.group_match=!0)):null!=b.group_array_index&&this.results_data[b.group_array_index].search_match&&(b.search_match=!0)));return this.result_clear_highlight(),1>d&&f.length?(this.update_results_content(""),this.no_results(f)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},a.prototype.get_search_regex=function(a){var b;return b=this.search_contains?"":"^",new RegExp(b+a,"i")},a.prototype.search_string_match=function(a,b){var c,d,e,f;if(b.test(a))return!0;if(this.enable_split_word_search&&(a.indexOf(" ")>=0||0===a.indexOf("["))&&(d=a.replace(/\[|\]/g,"").split(" "),d.length))for(e=0,f=d.length;f>e;e++)if(c=d[e],b.test(c))return!0},a.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,b=0,c=d.length;c>b;b++)a=d[b],a.selected&&(this.selected_option_count+=1);return this.selected_option_count},a.prototype.choices_click=function(a){return a.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},a.prototype.keyup_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(a.preventDefault(),this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},a.prototype.clipboard_event_checker=function(){var a=this;return setTimeout(function(){return a.results_search()},50)},a.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},a.prototype.include_option_in_results=function(a){return this.is_multiple&&!this.display_selected_options&&a.selected?!1:!this.display_disabled_options&&a.disabled?!1:a.empty?!1:!0},a.prototype.search_results_touchstart=function(a){return this.touch_started=!0,this.search_results_mouseover(a)},a.prototype.search_results_touchmove=function(a){return this.touch_started=!1,this.search_results_mouseout(a)},a.prototype.search_results_touchend=function(a){return this.touch_started?this.search_results_mouseup(a):void 0},a.prototype.outerHTML=function(a){var b;return a.outerHTML?a.outerHTML:(b=document.createElement("div"),b.appendChild(a),b.innerHTML)},a.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:!0},a.default_multiple_text="Select Some Options",a.default_single_text="Select an Option",a.default_no_result_text="No results match",a}(),a=jQuery,a.fn.extend({chosen:function(d){return b.browser_is_supported()?this.each(function(){var b,e;b=a(this),e=b.data("chosen"),"destroy"===d&&e instanceof c?e.destroy():e instanceof c||b.data("chosen",new c(this,d))}):this}}),c=function(b){function c(){return e=c.__super__.constructor.apply(this,arguments)}return g(c,b),c.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},c.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={"class":b.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",c),this.container.html(this.is_multiple?'<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>':'<a class="chosen-single chosen-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),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()},c.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},c.prototype.register_observers=function(){var a=this;return this.container.bind("touchstart.chosen",function(b){return a.container_mousedown(b),b.preventDefault()}),this.container.bind("touchend.chosen",function(b){return a.container_mouseup(b),b.preventDefault()}),this.container.bind("mousedown.chosen",function(b){a.container_mousedown(b)}),this.container.bind("mouseup.chosen",function(b){a.container_mouseup(b)}),this.container.bind("mouseenter.chosen",function(b){a.mouse_enter(b)}),this.container.bind("mouseleave.chosen",function(b){a.mouse_leave(b)}),this.search_results.bind("mouseup.chosen",function(b){a.search_results_mouseup(b)}),this.search_results.bind("mouseover.chosen",function(b){a.search_results_mouseover(b)}),this.search_results.bind("mouseout.chosen",function(b){a.search_results_mouseout(b)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(b){a.search_results_mousewheel(b)}),this.search_results.bind("touchstart.chosen",function(b){a.search_results_touchstart(b)}),this.search_results.bind("touchmove.chosen",function(b){a.search_results_touchmove(b)}),this.search_results.bind("touchend.chosen",function(b){a.search_results_touchend(b)}),this.form_field_jq.bind("chosen:updated.chosen",function(b){a.results_update_field(b)}),this.form_field_jq.bind("chosen:activate.chosen",function(b){a.activate_field(b)}),this.form_field_jq.bind("chosen:open.chosen",function(b){a.container_mousedown(b)}),this.form_field_jq.bind("chosen:close.chosen",function(b){a.input_blur(b)}),this.search_field.bind("blur.chosen",function(b){a.input_blur(b)}),this.search_field.bind("keyup.chosen",function(b){a.keyup_checker(b)}),this.search_field.bind("keydown.chosen",function(b){a.keydown_checker(b)}),this.search_field.bind("focus.chosen",function(b){a.input_focus(b)}),this.search_field.bind("cut.chosen",function(b){a.clipboard_event_checker(b)}),this.search_field.bind("paste.chosen",function(b){a.clipboard_event_checker(b)}),this.is_multiple?this.search_choices.bind("click.chosen",function(b){a.choices_click(b)}):this.container.bind("click.chosen",function(a){a.preventDefault()})},c.prototype.destroy=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),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()},c.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},c.prototype.container_mousedown=function(b){return this.is_disabled||(b&&"mousedown"===b.type&&!this.results_showing&&b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},c.prototype.container_mouseup=function(a){return"ABBR"!==a.target.nodeName||this.is_disabled?void 0:this.results_reset(a)},c.prototype.search_results_mousewheel=function(a){var b;return a.originalEvent&&(b=a.originalEvent.deltaY||-a.originalEvent.wheelDelta||a.originalEvent.detail),null!=b?(a.preventDefault(),"DOMMouseScroll"===a.type&&(b=40*b),this.search_results.scrollTop(b+this.search_results.scrollTop())):void 0},c.prototype.blur_test=function(){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},c.prototype.close_field=function(){return a(this.container[0].ownerDocument).unbind("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()},c.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},c.prototype.test_active_click=function(b){var c;return c=a(b.target).closest(".chosen-container"),c.length&&this.container[0]===c[0]?this.active_field=!0:this.close_field()},c.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=d.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(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},c.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(f>c)return this.search_results.scrollTop(c)}},c.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},c.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.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},c.prototype.update_results_content=function(a){return this.search_results.html(a)},c.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},c.prototype.set_tab_index=function(){var a;return this.form_field.tabIndex?(a=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=a):void 0},c.prototype.set_label_behavior=function(){var b=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(a){return b.is_multiple?b.container_mousedown(a):b.activate_field()}):void 0},c.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"))},c.prototype.search_results_mouseup=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length?(this.result_highlight=c,this.result_select(b),this.search_field.focus()):void 0},c.prototype.search_results_mouseover=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c?this.result_do_highlight(c):void 0},c.prototype.search_results_mouseout=function(b){return a(b.target).hasClass("active-result")?this.result_clear_highlight():void 0},c.prototype.choice_build=function(b){var c,d,e=this;return c=a("<li />",{"class":"search-choice"}).html("<span>"+this.choice_label(b)+"</span>"),b.disabled?c.addClass("search-choice-disabled"):(d=a("<a />",{"class":"search-choice-close","data-option-array-index":b.array_index}),d.bind("click.chosen",function(a){return e.choice_destroy_link_click(a)}),c.append(d)),this.search_container.before(c)},c.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),b.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(a(b.target))},c.prototype.choice_destroy=function(a){return this.result_deselect(a[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()):void 0},c.prototype.results_reset=function(){return 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.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},c.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},c.prototype.result_select=function(a){var b,c;return this.result_highlight?(b=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?b.removeClass("active-result"):this.reset_single_select_options(),b.addClass("result-selected"),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(c):this.single_set_selected_text(this.choice_label(c)),(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,a.preventDefault(),this.search_field_scale())):void 0},c.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===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(a)},c.prototype.result_deselect=function(a){var b;return b=this.results_data[a],this.form_field.options[b.options_index].disabled?!1:(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},c.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(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")):void 0},c.prototype.get_search_text=function(){return a("<div/>").text(a.trim(this.search_field.val())).html()},c.prototype.winnow_results_set_highlight=function(){var a,b;return b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a?this.result_do_highlight(a):void 0},c.prototype.no_results=function(b){var c;return c=a('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),c.find("span").first().html(b),this.search_results.append(c),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},c.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},c.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},c.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},c.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},c.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},c.prototype.keydown_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),8!==b&&this.pending_backstroke&&this.clear_backstroke(),b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:this.results_showing&&a.preventDefault();break;case 32:this.disable_search&&a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},c.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){for(d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],i=0,j=g.length;j>i;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return b=a("<div />",{style:f}),b.text(this.search_field.val()),a("body").append(b),h=b.width()+25,b.remove(),c=this.container.outerWidth(),h>c-10&&(h=c-10),this.search_field.css({width:h+"px"})}},c}(b)}).call(this),function(a){a.fn.addBack=a.fn.addBack||a.fn.andSelf,a.fn.extend({actual:function(b,c){if(!this[b])throw'$.actual => The jQuery method "'+b+'" you called does not exist';var d,e,f={absolute:!1,clone:!1,includeMargin:!1},g=a.extend(f,c),h=this.eq(0);if(g.clone===!0)d=function(){var a="position: absolute !important; top: -1000 !important; ";h=h.clone().attr("style",a).appendTo("body")},e=function(){h.remove()};else{var i,j=[],k="";d=function(){i=h.parents().addBack().filter(":hidden"),k+="visibility: hidden !important; display: block !important; ",g.absolute===!0&&(k+="position: absolute !important; "),i.each(function(){var b=a(this),c=b.attr("style");j.push(c),b.attr("style",c?c+";"+k:k)})},e=function(){i.each(function(b){var c=a(this),d=j[b];void 0===d?c.removeAttr("style"):c.attr("style",d)})}}d();var l=/(outer)/.test(b)?h[b](g.includeMargin):h[b]();return e(),l}})}(jQuery),function(a){"use strict";function b(a){window.console&&window.console.log&&console.log(a)}function c(b,c){return"#"==c[0]&&c.indexOf(" ")<0?a(c):b.find(c)}function d(a,b,c){this.init(a,b,c)}function e(){this.rules=[]}a.extend(d.prototype,{init:function(a,b,c){this.controller=a,this.condition=b,this.value=c,this.rules=[],this.controls=[]},evalCondition:function(b,c,d,e,f){if("=="==d)return this.checkBoolean(e)==this.checkBoolean(f);if("!="==d)return this.checkBoolean(e)!=this.checkBoolean(f);if(">="==d)return Number(f)>=Number(e);if("<="==d)return Number(f)<=Number(e);if(">"==d)return Number(f)>Number(e);if("<"==d)return Number(f)<Number(e);if("()"==d)return window[e](b,c,f);if("any"==d)return a.inArray(f,e.split(","))>-1;if("not-any"==d)return-1==a.inArray(f,e.split(","));throw new Error("Unknown condition:"+d)},checkBoolean:function(a){switch(a){case!0:case"true":case 1:case"1":a=!0;break;case!1:case"false":case 0:case"0":a=!1}return a},checkCondition:function(a,c){if(!this.condition)return!0;var d=a.find(this.controller);0===d.size()&&c.log&&b("Evaling condition: Could not find controller input "+this.controller);var e=this.getControlValue(a,d);return c.log&&void 0===e&&b("Evaling condition: Could not exctract value from input "+this.controller),void 0===e?!1:(e=this.normalizeValue(d,this.value,e),this.evalCondition(a,d,this.condition,this.value,e))},normalizeValue:function(a,b,c){return"number"==typeof b?parseFloat(c):c},getControlValue:function(a,b){return("radio"==b.attr("type")||"checkbox"==b.attr("type"))&&b.size()>1?b.filter(":checked").val():"checkbox"==b.attr("type")||"radio"==b.attr("type")?b.is(":checked"):b.val()},createRule:function(a,b,c){var e=new d(a,b,c);return this.rules.push(e),e},include:function(a){if(!a)throw new Error("Must give an input selector");this.controls.push(a)},applyRule:function(c,d,e){var f;f=void 0===e?this.checkCondition(c,d):e,d.log&&b("Applying rule on "+this.controller+"=="+this.value+" enforced:"+e+" result:"+f),d.log&&!this.controls.length&&b("Zero length controls slipped through");var g=d.show||function(a){a.show()},h=d.hide||function(a){a.hide()},i=a.map(this.controls,function(a){var e=c.find(a);return d.log&&0===e.size()&&b("Could not find element:"+a),e});f?(a(i).each(function(){d.log&&0===a(this).size()&&(b("Control selection is empty when showing"),b(this)),g(this)}),a(this.rules).each(function(){this.applyRule(c,d)})):(a(i).each(function(){d.log&&0===a(this).size()&&(b("Control selection is empty when hiding:"),b(this)),h(this)}),a(this.rules).each(function(){this.applyRule(c,d,!1)}))}}),a.extend(e.prototype,{createRule:function(a,b,c){var e=new d(a,b,c);return this.rules.push(e),e},applyRules:function(a,c){var d;for(c=c||{},c.log&&b("Starting evaluation ruleset of "+this.rules.length+" rules"),d=0;d<this.rules.length;d++)this.rules[d].applyRule(a,c)},walk:function(){function b(d){c.push(d),a(d.children).each(function(){b(this)})}var c=[];return a(this.rules).each(function(){b(this)}),c},checkTargets:function(d,e){var f=0,g=this.walk();a(g).each(function(){if(0===d.find(this.controller).size())throw new Error("Rule's controller does not exist:"+this.controller);if(0===this.controls.length)throw new Error("Rule has no controls:"+this);a(this.controls).each(function(){if(0===c(d,this))throw new Error("Rule's target control "+this+" does not exist in context "+d.get(0));f++})}),e.log&&b("Controller check ok, rules count "+g.length+" controls count "+f)},install:function(b){a.deps.enable(a(document.body),this,b)}});var f={createRuleset:function(){return new e},enable:function(a,c,d){d=d||{},(d.checkTargets||void 0===d.checkTargets)&&c.checkTargets(a,d);d.log&&b("Enabling dependency change monitoring on "+a.get(0));var e=function(){c.applyRules(a,d)},f=a.on?a.on("change.deps",null,null,e):a.live("change.deps",e);return c.applyRules(a,d),f}};a.deps=f}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.CSemulateTransitionEnd=function(b){var c=!1,d=this;
3
- a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.sptooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.sptooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("sptooltip",a,b)};c.VERSION="3.3.4",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="sp-tooltip" role="tooltip"><div class="sp-tooltip-arrow"></div><div class="sp-tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport),this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-m<p.top?"bottom":"right"==h&&k.right+l>p.width?"left":"left"==h&&k.left-l<p.left?"right":h,f.removeClass(n).addClass(h)}var q=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(q,h);var r=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",r).CSemulateTransitionEnd(c.TRANSITION_DURATION):r()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top=b.top+g,b.left=b.left+h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".sp-tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).CSemulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".sp-tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.sptooltip;a.fn.sptooltip=b,a.fn.sptooltip.Constructor=c,a.fn.sptooltip.noConflict=function(){return a.fn.sptooltip=d,this}}(jQuery);
 
 
 
admin/views/meta-box/classes/abstract.class.php DELETED
@@ -1,23 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
2
- /**
3
- *
4
- * Abstract Class
5
- * A helper class for action and filter hooks
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- *
10
- */
11
- abstract class SP_WPCP_Framework_Abstract {
12
-
13
- public function __construct() {}
14
-
15
- public function addAction( $hook, $function_to_add, $priority = 30, $accepted_args = 1 ) {
16
- add_action( $hook, array( &$this, $function_to_add), $priority, $accepted_args );
17
- }
18
-
19
- public function addFilter( $tag, $function_to_add, $priority = 30, $accepted_args = 1 ) {
20
- add_action( $tag, array( &$this, $function_to_add), $priority, $accepted_args );
21
- }
22
-
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/classes/framework.class.php DELETED
@@ -1,484 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access pages directly.
3
- /**
4
- *
5
- * Framework Class
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
- class SP_WPCP_Framework extends SP_WPCP_Framework_Abstract {
11
-
12
- /**
13
- *
14
- * Option database/data name
15
- *
16
- * @access public
17
- * @var string
18
- */
19
- public $unique = SP_OPTION;
20
-
21
- /**
22
- *
23
- * Settings
24
- *
25
- * @access public
26
- * @var array
27
- */
28
- public $settings = array();
29
-
30
- /**
31
- *
32
- * Options tab
33
- *
34
- * @access public
35
- * @var array
36
- */
37
- public $options = array();
38
-
39
- /**
40
- *
41
- * Options section
42
- *
43
- * @access public
44
- * @var array
45
- */
46
- public $sections = array();
47
-
48
- /**
49
- *
50
- * Options store
51
- *
52
- * @access public
53
- * @var array
54
- */
55
- public $get_option = array();
56
-
57
- /**
58
- *
59
- * Instance
60
- *
61
- * @access private
62
- * @var class
63
- */
64
- private static $instance = null;
65
-
66
- /**
67
- * Run framework construct.
68
- *
69
- * @param string $settings All the settings.
70
- * @param string $options All the options.
71
- */
72
- public function __construct( $settings, $options ) {
73
-
74
- $this->settings = apply_filters( 'sp_framework_settings', $settings );
75
- $this->options = apply_filters( 'sp_framework_options', $options );
76
-
77
- if ( ! empty( $this->options ) ) {
78
-
79
- $this->sections = $this->get_sections();
80
- $this->get_option = get_option( SP_OPTION );
81
- $this->addAction( 'admin_init', 'settings_api' );
82
- $this->addAction( 'admin_menu', 'admin_menu' );
83
-
84
- }
85
-
86
- }
87
-
88
- /**
89
- * Instance
90
- *
91
- * @param array $settings Settings array.
92
- * @param array $options Options array.
93
- * @return statement
94
- */
95
- public static function instance( $settings = array(), $options = array() ) {
96
- if ( is_null( self::$instance ) && SP_WPCP_F_ACTIVE_FRAMEWORK ) {
97
- self::$instance = new self( $settings, $options );
98
- }
99
- return self::$instance;
100
- }
101
-
102
- /**
103
- * Get sections
104
- *
105
- * @return statement
106
- */
107
- public function get_sections() {
108
-
109
- $sections = array();
110
-
111
- foreach ( $this->options as $key => $value ) {
112
-
113
- if ( isset( $value['sections'] ) ) {
114
-
115
- foreach ( $value['sections'] as $section ) {
116
-
117
- if ( isset( $section['fields'] ) ) {
118
- $sections[] = $section;
119
- }
120
- }
121
- } else {
122
-
123
- if ( isset( $value['fields'] ) ) {
124
- $sections[] = $value;
125
- }
126
- }
127
- }
128
-
129
- return $sections;
130
-
131
- }
132
-
133
- /**
134
- * Wp settings api
135
- *
136
- * @return void
137
- */
138
- public function settings_api() {
139
-
140
- $defaults = array();
141
-
142
- register_setting( $this->unique, $this->unique, array( &$this, 'validate_save' ) );
143
-
144
- foreach ( $this->sections as $section ) {
145
-
146
- if ( isset( $section['fields'] ) ) {
147
-
148
- foreach ( $section['fields'] as $field_key => $field ) {
149
-
150
- // set default option if isset.
151
- if ( isset( $field['default'] ) ) {
152
- $defaults[ $field['id'] ] = $field['default'];
153
- if ( ! empty( $this->get_option ) && ! isset( $this->get_option[ $field['id'] ] ) ) {
154
- $this->get_option[ $field['id'] ] = $field['default'];
155
- }
156
- }
157
- }
158
- }
159
- }
160
-
161
- // set default variable if empty options and not empty defaults.
162
- if ( empty( $this->get_option ) && ! empty( $defaults ) ) {
163
- update_option( $this->unique, $defaults );
164
- $this->get_option = $defaults;
165
- }
166
-
167
- }
168
-
169
- /**
170
- * Section fields validate in save.
171
- *
172
- * @param nonce $request The nonce request.
173
- * @return statement.
174
- */
175
- public function validate_save( $request ) {
176
-
177
- $add_errors = array();
178
- $section_id = sp_get_var( 'sp_section_id' );
179
-
180
- // ignore nonce requests.
181
- if ( isset( $request['_nonce'] ) ) {
182
- unset( $request['_nonce'] ); }
183
-
184
- // import.
185
- if ( isset( $request['import'] ) && ! empty( $request['import'] ) ) {
186
- $decode_string = sp_decode_string( $request['import'] );
187
- if ( is_array( $decode_string ) ) {
188
- return $decode_string;
189
- }
190
- $add_errors[] = $this->add_settings_error( esc_html__( 'Success. Imported backup options.', 'wp-carousel-free' ), 'updated' );
191
- }
192
-
193
- // reset all options.
194
- if ( isset( $request['resetall'] ) ) {
195
- $add_errors[] = $this->add_settings_error( esc_html__( 'Default options restored.', 'wp-carousel-free' ), 'updated' );
196
- return;
197
- }
198
-
199
- // reset only section.
200
- if ( isset( $request['reset'] ) && ! empty( $section_id ) ) {
201
- foreach ( $this->sections as $value ) {
202
- if ( $value['name'] == $section_id ) {
203
- foreach ( $value['fields'] as $field ) {
204
- if ( isset( $field['id'] ) ) {
205
- if ( isset( $field['default'] ) ) {
206
- $request[ $field['id'] ] = $field['default'];
207
- } else {
208
- unset( $request[ $field['id'] ] );
209
- }
210
- }
211
- }
212
- }
213
- }
214
- $add_errors[] = $this->add_settings_error( esc_html__( 'Default options restored for only this section.', 'wp-carousel-free' ), 'updated' );
215
- }
216
-
217
- // option sanitize and validate.
218
- foreach ( $this->sections as $section ) {
219
- if ( isset( $section['fields'] ) ) {
220
- foreach ( $section['fields'] as $field ) {
221
-
222
- // ignore santize and validate if element multilangual.
223
- if ( isset( $field['type'] ) && ! isset( $field['multilang'] ) && isset( $field['id'] ) ) {
224
-
225
- // sanitize options.
226
- $request_value = isset( $request[ $field['id'] ] ) ? $request[ $field['id'] ] : '';
227
- $sanitize_type = $field['type'];
228
-
229
- if ( isset( $field['sanitize'] ) ) {
230
- $sanitize_type = ( $field['sanitize'] !== false ) ? $field['sanitize'] : false;
231
- }
232
-
233
- if ( false !== $sanitize_type && has_filter( 'sp_sanitize_' . $sanitize_type ) ) {
234
- $request[ $field['id'] ] = apply_filters( 'sp_sanitize_' . $sanitize_type, $request_value, $field, $section['fields'] );
235
- }
236
-
237
- // validate options.
238
- if ( isset( $field['validate'] ) && has_filter( 'sp_validate_' . $field['validate'] ) ) {
239
-
240
- $validate = apply_filters( 'sp_validate_' . $field['validate'], $request_value, $field, $section['fields'] );
241
-
242
- if ( ! empty( $validate ) ) {
243
- $add_errors[] = $this->add_settings_error( $validate, 'error', $field['id'] );
244
- $request[ $field['id'] ] = ( isset( $this->get_option[ $field['id'] ] ) ) ? $this->get_option[ $field['id'] ] : '';
245
- }
246
- }
247
- }
248
-
249
- if ( ! isset( $field['id'] ) || empty( $request[ $field['id'] ] ) ) {
250
- continue;
251
- }
252
- }
253
- }
254
- }
255
-
256
- $request = apply_filters( 'sp_validate_save', $request );
257
-
258
- do_action( 'sp_validate_save_after', $request );
259
-
260
- // set transient
261
- $transient_time = ( sp_language_defaults() !== false ) ? 30 : 10;
262
- set_transient(
263
- 'sp-framework-transient', array(
264
- 'errors' => $add_errors,
265
- 'section_id' => $section_id,
266
- ), $transient_time
267
- );
268
-
269
- return $request;
270
- }
271
-
272
- /**
273
- * Field callback classes
274
- *
275
- * @param mix $field The field classes.
276
- * @return void
277
- */
278
- public function field_callback( $field ) {
279
- $value = ( isset( $field['id'] ) && isset( $this->get_option[ $field['id'] ] ) ) ? $this->get_option[ $field['id'] ] : '';
280
- echo sp_wpcp_add_element( $field, $value, $this->unique );
281
- }
282
-
283
- /**
284
- * Setting error
285
- *
286
- * @param string $message The error messages.
287
- * @param string $type Error type.
288
- * @param string $id The field id.
289
- * @return statement.
290
- */
291
- public function add_settings_error( $message, $type = 'error', $id = 'global' ) {
292
- return array(
293
- 'setting' => 'sp-errors',
294
- 'code' => $id,
295
- 'message' => $message,
296
- 'type' => $type,
297
- );
298
- }
299
-
300
- /**
301
- * Adding option page.
302
- *
303
- * @return void
304
- */
305
- public function admin_menu() {
306
-
307
- $defaults = array(
308
- 'menu_type' => '',
309
- 'menu_parent' => '',
310
- 'menu_title' => '',
311
- 'menu_slug' => '',
312
- 'menu_capability' => 'manage_options',
313
- 'menu_icon' => null,
314
- 'menu_position' => null,
315
- );
316
-
317
- $args = wp_parse_args( $this->settings, $defaults );
318
-
319
- extract( $args );
320
-
321
- if ( 'submenu' === $menu_type ) {
322
- add_submenu_page( $menu_parent, $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'admin_page' ) );
323
- } elseif ( 'management' === $menu_type ) {
324
- add_management_page( $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'admin_page' ), $menu_icon, $menu_position );
325
- } elseif ( 'dashboard' === $menu_type ) {
326
- add_dashboard_page( $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'admin_page' ), $menu_icon, $menu_position );
327
- } elseif ( 'options' === $menu_type ) {
328
- add_options_page( $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'admin_page' ), $menu_icon, $menu_position );
329
- } elseif ( 'plugins' === $menu_type ) {
330
- add_plugins_page( $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'admin_page' ), $menu_icon, $menu_position );
331
- } elseif ( 'theme' === $menu_type ) {
332
- add_theme_page( $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'admin_page' ), $menu_icon, $menu_position );
333
- } else {
334
- add_menu_page( $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'admin_page' ), $menu_icon, $menu_position );
335
- }
336
-
337
- }
338
-
339
- /**
340
- * Option page html output
341
- *
342
- * @return void
343
- */
344
- public function admin_page() {
345
-
346
- $transient = get_transient( 'sp-framework-transient' );
347
- $has_nav = ( count( $this->options ) <= 1 ) ? ' sp-show-all' : '';
348
- $section_id = ( ! empty( $transient['section_id'] ) ) ? $transient['section_id'] : $this->sections[0]['name'];
349
- $section_id = sp_get_var( 'sp-section', $section_id );
350
-
351
- echo '<h1 class="sp-option-framework-page-title">' . $this->settings['menu_title'] . '</h1>';
352
-
353
- echo '<div class="sp-wpcp-framework sp-option-framework">';
354
-
355
- echo '<form method="post" action="options.php" enctype="multipart/form-data" id="sp_framework_form">';
356
- echo '<input type="hidden" class="sp-reset" name="sp_section_id" value="' . $section_id . '" />';
357
-
358
- if ( true !== $this->settings['ajax_save'] && ! empty( $transient['errors'] ) ) {
359
-
360
- global $sp_errors;
361
-
362
- $sp_errors = $transient['errors'];
363
-
364
- if ( ! empty( $sp_errors ) ) {
365
- foreach ( $sp_errors as $error ) {
366
- if ( in_array( $error['setting'], array( 'general', 'sp-errors' ) ) ) {
367
- echo '<div class="sp-settings-error ' . $error['type'] . '">';
368
- echo '<p><strong>' . $error['message'] . '</strong></p>';
369
- echo '</div>';
370
- }
371
- }
372
- }
373
- }
374
-
375
- settings_fields( $this->unique );
376
-
377
- echo '<header class="sp-header">';
378
- echo '<h2>' . $this->settings['framework_title'] . '</h2>';
379
- echo '<fieldset>';
380
-
381
- echo ( $this->settings['ajax_save'] ) ? '<span id="sp-save-ajax">' . esc_html__( 'Settings saved.', 'wp-carousel-free' ) . '</span>' : '';
382
-
383
- submit_button( esc_html__( 'Save Changes', 'wp-carousel-free' ), 'primary sp-save', 'save', false, array( 'data-save' => esc_html__( 'Saving...', 'wp-carousel-free' ) ) );
384
- submit_button( esc_html__( 'Restore', 'wp-carousel-free' ), 'secondary sp-restore sp-reset-confirm', $this->unique . '[reset]', false );
385
-
386
- if ( $this->settings['show_reset_all'] ) {
387
- submit_button( esc_html__( 'Reset All Options', 'wp-carousel-free' ), 'secondary sp-restore sp-warning-primary sp-reset-confirm', $this->unique . '[resetall]', false );
388
- }
389
-
390
- echo '</fieldset>';
391
- // echo ( empty( $has_nav ) ) ? '<a href="#" class="sp-expand-all"><i class="fa fa-eye-slash"></i> '. esc_html__( 'show all options', 'wp-carousel-free' ) .'</a>' : '';
392
- echo '<div class="clear"></div>';
393
- echo '</header>'; // end .sp-header
394
-
395
- echo '<div class="sp-body' . $has_nav . '">';
396
-
397
- echo '<div class="sp-nav">';
398
-
399
- echo '<ul>';
400
- foreach ( $this->options as $key => $tab ) {
401
-
402
- if ( ( isset( $tab['sections'] ) ) ) {
403
-
404
- $tab_active = sp_array_search( $tab['sections'], 'name', $section_id );
405
- $active_style = ( ! empty( $tab_active ) ) ? ' style="display: block;"' : '';
406
- $active_list = ( ! empty( $tab_active ) ) ? ' sp-tab-active' : '';
407
- $tab_icon = ( ! empty( $tab['icon'] ) ) ? '<i class="sp-icon ' . $tab['icon'] . '"></i>' : '';
408
-
409
- echo '<li class="sp-sub' . $active_list . '">';
410
-
411
- echo '<a href="#" class="sp-arrow">' . $tab_icon . $tab['title'] . '</a>';
412
-
413
- echo '<ul' . $active_style . '>';
414
- foreach ( $tab['sections'] as $tab_section ) {
415
-
416
- $active_tab = ( $section_id == $tab_section['name'] ) ? ' class="sp-section-active"' : '';
417
- $icon = ( ! empty( $tab_section['icon'] ) ) ? '<i class="sp-icon ' . $tab_section['icon'] . '"></i>' : '';
418
-
419
- echo '<li><a href="#"' . $active_tab . ' data-section="' . $tab_section['name'] . '">' . $icon . $tab_section['title'] . '</a></li>';
420
-
421
- }
422
- echo '</ul>';
423
-
424
- echo '</li>';
425
-
426
- } else {
427
-
428
- $icon = ( ! empty( $tab['icon'] ) ) ? '<i class="sp-icon ' . $tab['icon'] . '"></i>' : '';
429
-
430
- if ( isset( $tab['fields'] ) ) {
431
-
432
- $active_list = ( $section_id == $tab['name'] ) ? ' class="sp-section-active"' : '';
433
- echo '<li><a href="#"' . $active_list . ' data-section="' . $tab['name'] . '">' . $icon . $tab['title'] . '</a></li>';
434
-
435
- } else {
436
-
437
- echo '<li><div class="sp-separator">' . $icon . $tab['title'] . '</div></li>';
438
-
439
- }
440
- }
441
- }
442
- echo '</ul>';
443
-
444
- echo '</div>'; // end .sp-nav.
445
-
446
- echo '<div class="sp-content">';
447
-
448
- echo '<div class="sp-sections">';
449
-
450
- foreach ( $this->sections as $section ) {
451
- if ( isset( $section['fields'] ) ) {
452
-
453
- $active_content = ( $section_id == $section['name'] ) ? ' style="display: block;"' : '';
454
- echo '<div id="sp-tab-' . $section['name'] . '" class="sp-section"' . $active_content . '>';
455
- echo ( isset( $section['title'] ) && empty( $has_nav ) ) ? '<div class="sp-section-title"><h3>' . $section['title'] . '</h3></div>' : '';
456
-
457
- foreach ( $section['fields'] as $field ) {
458
- $this->field_callback( $field );
459
- }
460
-
461
- echo '</div>';
462
-
463
- }
464
- }
465
-
466
- echo '</div>'; // end .sp-sections.
467
-
468
- echo '<div class="clear"></div>';
469
-
470
- echo '</div>'; // end .sp-content.
471
-
472
- echo '<div class="sp-nav-background"></div>';
473
-
474
- echo '</div>'; // end .sp-body.
475
-
476
- echo '</form>'; // end form.
477
-
478
- echo '<div class="clear"></div>';
479
-
480
- echo '</div>'; // end .sp-wpcp-framework.
481
-
482
- }
483
-
484
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/classes/metabox.class.php DELETED
@@ -1,296 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die;
3
- } // Cannot access pages directly.
4
- /**
5
- * MetaBox Class
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
- class SP_WPCP_Framework_Metabox extends SP_WPCP_Framework_Abstract {
11
-
12
- /**
13
- * MetaBox options
14
- *
15
- * @access public
16
- * @var array
17
- */
18
- public $options = array();
19
-
20
- /**
21
- * Class instance.
22
- *
23
- * @access private
24
- * @var class
25
- */
26
- private static $instance = null;
27
-
28
- /**
29
- * Run MetaBox Construct.
30
- *
31
- * @param mixed $options All the MetaBox options.
32
- */
33
- public function __construct( $options ) {
34
-
35
- $this->options = apply_filters( 'sp_metabox_options', $options );
36
-
37
- if ( ! empty( $this->options ) ) {
38
- $this->addAction( 'add_meta_boxes', 'add_meta_box' );
39
- $this->addAction( 'save_post', 'save_post', 10, 2 );
40
- }
41
-
42
- }
43
-
44
- /**
45
- * MetaBox instance.
46
- *
47
- * @param array $options Options array.
48
- * @return statement
49
- */
50
- public static function instance( $options = array() ) {
51
- if ( is_null( self::$instance ) && SP_WPCP_F_ACTIVE_METABOX ) {
52
- self::$instance = new self( $options );
53
- }
54
-
55
- return self::$instance;
56
- }
57
-
58
- /**
59
- * Add metabox function.
60
- *
61
- * @param sting $post_type Add metabox to the post type.
62
- * @return void
63
- */
64
- public function add_meta_box( $post_type ) {
65
-
66
- foreach ( $this->options as $value ) {
67
- add_meta_box(
68
- $value['id'], $value['title'], array(
69
- &$this,
70
- 'render_meta_box_content',
71
- ), $value['post_type'], $value['context'], $value['priority'], $value
72
- );
73
- }
74
-
75
- }
76
-
77
- /**
78
- * Metabox render content
79
- *
80
- * @param mixed $post The post type.
81
- * @param mixed $callback The metabox callback.
82
- * @return void
83
- */
84
- public function render_meta_box_content( $post, $callback ) {
85
-
86
- global $post, $sp_errors;
87
-
88
- wp_nonce_field( 'sp-framework-metabox', 'sp-framework-metabox-nonce' );
89
-
90
- $unique = $callback['args']['id'];
91
- $sections = $callback['args']['sections'];
92
- $meta_value = get_post_meta( $post->ID, $unique, true );
93
- $transient = get_transient( 'wpcpro-metabox-transient' );
94
- $sp_errors = $transient['errors'];
95
- $has_nav = ( count( $sections ) >= 2 && $callback['args']['context'] != 'side' ) ? true : false;
96
- $show_all = ( ! $has_nav ) ? ' sp-show-all' : '';
97
- $section_name = ( ! empty( $sections[0]['fields'] ) ) ? $sections[0]['name'] : $sections[1]['name'];
98
- $section_id = ( ! empty( $transient['ids'][ $unique ] ) ) ? $transient['ids'][ $unique ] : $section_name;
99
- $section_id = sp_get_var( 'sp-section', $section_id );
100
-
101
- echo '<div class="sp-wpcp-framework sp-metabox-framework">';
102
-
103
- echo '<input type="hidden" name="sp_section_id[' . $unique . ']" class="sp-reset" value="' . $section_id . '">';
104
-
105
- // SP_WPCP_Framework.
106
- $current_screen = get_current_screen();
107
- $the_current_post_type = $current_screen->post_type;
108
- if ( $the_current_post_type == 'sp_wp_carousel' ) {
109
- ?>
110
- <div class="sp-wpcp-banner">
111
- <div class="sp-wpcp-logo"><img src="<?php echo esc_url( WPCAROUSELF_URL . 'admin/img/wpcp-logo.png' ); ?>" alt="WP Carousel"></div>
112
- <div class="sp-wpcp-short-links">
113
- <a href="https://shapedplugin.com/support-forum/" target="_blank"><i class="fa fa-life-ring"></i>Support</a>
114
- </div>
115
- </div>
116
- <?php
117
- } // End SP_WPCP_Framework.
118
-
119
- echo '<div class="sp-body' . $show_all . '">';
120
- if ( $has_nav ) {
121
- echo '<div class="sp-nav">';
122
- echo '<ul>';
123
- foreach ( $sections as $value ) {
124
- $tab_icon = ( ! empty( $value['icon'] ) ) ? '<i class="sp-icon ' . $value['icon'] . '"></i>' : '';
125
- if ( isset( $value['fields'] ) ) {
126
- $active_section = ( $section_id == $value['name'] ) ? ' class="sp-section-active"' : '';
127
- echo '<li><a href="#" ' . $active_section . ' data-section="' . $value['name'] . '" class="tab-' . $value['name'] . '">' . $tab_icon . $value['title'] . '</a></li>';
128
- } else {
129
- echo '<li><div class="sp-separator">' . $tab_icon . $value['title'] . '</div></li>';
130
- }
131
- }
132
- echo '</ul>';
133
-
134
- echo '</div>';
135
- }
136
-
137
- echo '<div class="sp-content">';
138
-
139
- echo '<div class="sp-sections">';
140
- foreach ( $sections as $val ) {
141
-
142
- if ( isset( $val['fields'] ) ) {
143
-
144
- $active_content = ( $section_id == $val['name'] ) ? ' style="display: block;"' : '';
145
-
146
- echo '<div id="sp-tab-' . $val['name'] . '" class="sp-section"' . $active_content . '>';
147
- echo ( isset( $val['title'] ) ) ? '<div class="sp-section-title"><h3>' . $val['title'] . '</h3></div>' : '';
148
-
149
- foreach ( $val['fields'] as $field_key => $field ) {
150
-
151
- $default = ( isset( $field['default'] ) ) ? $field['default'] : '';
152
- $elem_id = ( isset( $field['id'] ) ) ? $field['id'] : '';
153
- $elem_value = ( is_array( $meta_value ) && isset( $meta_value[ $elem_id ] ) ) ? $meta_value[ $elem_id ] : $default;
154
- echo sp_wpcp_add_element( $field, $elem_value, $unique );
155
-
156
- }
157
- echo '</div>';
158
- }
159
- }
160
- echo '</div>';
161
-
162
- echo '<div class="clear"></div>';
163
-
164
- echo '</div>';
165
-
166
- echo ( $has_nav ) ? '<div class="sp-nav-background"></div>' : '';
167
-
168
- echo '<div class="clear"></div>';
169
-
170
- echo '</div>'; // End sp-body.
171
- ?>
172
- <div class="wpcpro_shortcode_divider"></div>
173
- <div class="wpcpro_shortcode text-center">
174
- <div class="wpcpro-col-lg-3">
175
- <div class="wpcpro_shortcode_content">
176
- <span class="wpcpro-shortcode-title"><?php esc_html_e( 'Shortcode:', 'wp-carousel-free' ); ?> </span>
177
- <div class="wpcpro-sc-code selectable" >[sp_wpcarousel <?php echo 'id="' . $post->ID . '"'; ?>]</div>
178
- </div>
179
- </div>
180
- <div class="wpcpro-col-lg-3">
181
- <div class="wpcpro_shortcode_content">
182
- <span class="wpcpro-shortcode-title">
183
- <?php
184
- esc_html_e( 'Template Include:', 'wp-carousel-free' );
185
- ?>
186
- </span>
187
- <div class="wpcpro-sc-code selectable">
188
- &lt;?php echo do_shortcode( '[sp_wpcarousel id="<?php echo $post->ID; ?>"]' );
189
- ?&gt;</div>
190
- </div>
191
- </div>
192
- </div>
193
- <?php
194
- echo '</div>';
195
- }
196
-
197
- /**
198
- * Save metabox options.
199
- *
200
- * @param integer $post_id The post ID.
201
- * @param string $post The Post.
202
- * @return void
203
- */
204
- public function save_post( $post_id, $post ) {
205
-
206
- if ( wp_verify_nonce( sp_get_var( 'sp-framework-metabox-nonce' ), 'sp-framework-metabox' ) ) {
207
-
208
- $errors = array();
209
- $post_type = sp_get_var( 'post_type' );
210
-
211
- foreach ( $this->options as $request_value ) {
212
-
213
- if ( in_array( $post_type, (array) $request_value['post_type'] ) ) {
214
-
215
- $request_key = $request_value['id'];
216
- $request = sp_get_var( $request_key, array() );
217
-
218
- // ignore _nonce.
219
- if ( isset( $request['_nonce'] ) ) {
220
- unset( $request['_nonce'] );
221
- }
222
-
223
- foreach ( $request_value['sections'] as $key => $section ) {
224
-
225
- if ( isset( $section['fields'] ) ) {
226
-
227
- foreach ( $section['fields'] as $field ) {
228
-
229
- if ( isset( $field['type'] ) && isset( $field['id'] ) ) {
230
-
231
- $field_value = sp_get_vars( $request_key, $field['id'] );
232
-
233
- // sanitize options.
234
- if ( isset( $field['sanitize'] ) && $field['sanitize'] !== false ) {
235
- $sanitize_type = $field['sanitize'];
236
- } elseif ( ! isset( $field['sanitize'] ) ) {
237
- $sanitize_type = $field['type'];
238
- }
239
-
240
- if ( has_filter( 'sp_sanitize_' . $sanitize_type ) ) {
241
- $request[ $field['id'] ] = apply_filters( 'sp_sanitize_' . $sanitize_type, $field_value, $field, $section['fields'] );
242
- }
243
-
244
- // validate options.
245
- if ( isset( $field['validate'] ) && has_filter( 'sp_validate_' . $field['validate'] ) ) {
246
-
247
- $validate = apply_filters( 'sp_validate_' . $field['validate'], $field_value, $field, $section['fields'] );
248
-
249
- if ( ! empty( $validate ) ) {
250
-
251
- $meta_value = get_post_meta( $post_id, $request_key, true );
252
-
253
- $errors[ $field['id'] ] = array(
254
- 'code' => $field['id'],
255
- 'message' => $validate,
256
- 'type' => 'error',
257
- );
258
- $default_value = isset( $field['default'] ) ? $field['default'] : '';
259
- $request[ $field['id'] ] = ( isset( $meta_value[ $field['id'] ] ) ) ? $meta_value[ $field['id'] ] : $default_value;
260
- }
261
- }
262
- }
263
- }
264
- }
265
- }
266
-
267
- $request = apply_filters( 'sp_save_post', $request, $request_key, $post );
268
-
269
- if ( empty( $request ) ) {
270
-
271
- delete_post_meta( $post_id, $request_key );
272
-
273
- } else {
274
-
275
- if ( get_post_meta( $post_id, $request_key ) ) {
276
-
277
- update_post_meta( $post_id, $request_key, $request );
278
-
279
- } else {
280
- add_post_meta( $post_id, $request_key, $request );
281
- }
282
- }
283
-
284
- $transient['ids'][ $request_key ] = sp_get_vars( 'sp_section_id', $request_key );
285
- $transient['errors'] = $errors;
286
-
287
- }
288
- }
289
-
290
- set_transient( 'wpcpro-metabox-transient', $transient, 10 );
291
-
292
- }
293
-
294
- }
295
-
296
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/classes/options.class.php DELETED
@@ -1,522 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access pages directly.
3
- /**
4
- *
5
- * Options Class
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
- abstract class SP_WPCP_Framework_Options extends SP_WPCP_Framework_Abstract {
11
-
12
- /**
13
- * The option class constructor.
14
- *
15
- * @param array $field All the options fields.
16
- * @param string $value Value of the options.
17
- * @param string $unique Unique id of the options.
18
- */
19
- public function __construct( $field = array(), $value = '', $unique = '' ) {
20
- $this->field = $field;
21
- $this->value = $value;
22
- $this->org_value = $value;
23
- $this->unique = $unique;
24
- $this->multilang = $this->element_multilang();
25
- }
26
-
27
- /**
28
- * Element value.
29
- *
30
- * @param string $value Value of each element.
31
- * @return mix
32
- */
33
- public function element_value( $value = '' ) {
34
-
35
- $value = $this->value;
36
-
37
- if ( is_array( $this->multilang ) && is_array( $value ) ) {
38
-
39
- $current = $this->multilang['current'];
40
-
41
- if ( isset( $value[ $current ] ) ) {
42
- $value = $value[ $current ];
43
- } elseif ( $this->multilang['current'] == $this->multilang['default'] ) {
44
- $value = $this->value;
45
- } else {
46
- $value = '';
47
- }
48
- } elseif ( ! is_array( $this->multilang ) && isset( $this->value['multilang'] ) && is_array( $this->value ) ) {
49
-
50
- $value = array_values( $this->value );
51
- $value = $value[0];
52
-
53
- } elseif ( is_array( $this->multilang ) && ! is_array( $value ) && ( $this->multilang['current'] != $this->multilang['default'] ) ) {
54
-
55
- $value = '';
56
-
57
- }
58
-
59
- return $value;
60
-
61
- }
62
-
63
- /**
64
- * Element name.
65
- *
66
- * @param string $extra_name The extra name.
67
- * @param boolean $multilang Multi language.
68
- * @return statement
69
- */
70
- public function element_name( $extra_name = '', $multilang = false ) {
71
-
72
- $element_id = ( isset( $this->field['id'] ) ) ? $this->field['id'] : '';
73
- $extra_multilang = ( ! $multilang && is_array( $this->multilang ) ) ? '[' . $this->multilang['current'] . ']' : '';
74
- return ( isset( $this->field['name'] ) ) ? $this->field['name'] . $extra_name : $this->unique . '[' . $element_id . ']' . $extra_multilang . $extra_name;
75
-
76
- }
77
-
78
- /**
79
- * Element type
80
- *
81
- * @return statement
82
- */
83
- public function element_type() {
84
- $type = ( isset( $this->field['attributes']['type'] ) ) ? $this->field['attributes']['type'] : $this->field['type'];
85
- return $type;
86
- }
87
-
88
- /**
89
- * Element class.
90
- *
91
- * @param string $el_class The element class.
92
- * @return statement
93
- */
94
- public function element_class( $el_class = '' ) {
95
-
96
- $field_class = ( isset( $this->field['class'] ) ) ? ' ' . $this->field['class'] : '';
97
- return ( $field_class || $el_class ) ? ' class="' . $el_class . $field_class . '"' : '';
98
- }
99
-
100
- /**
101
- * Element Only for Pro.
102
- *
103
- * @param string $pro_only The element class.
104
- * @return statement
105
- */
106
- public function element_pro_only( $pro_only = '' ) {
107
- $pro_only = ( isset( $this->field['pro_only'] ) ) ? ' disabled' : '';
108
- return $pro_only;
109
-
110
- }
111
-
112
- /**
113
- * Element Attributes.
114
- *
115
- * @param array $el_attributes Attributes of the element.
116
- * @return statement
117
- */
118
- public function element_attributes( $el_attributes = array() ) {
119
-
120
- $attributes = ( isset( $this->field['attributes'] ) ) ? $this->field['attributes'] : array();
121
- $element_id = ( isset( $this->field['id'] ) ) ? $this->field['id'] : '';
122
-
123
- if ( false !== $el_attributes ) {
124
- $sub_elemenet = ( isset( $this->field['sub'] ) ) ? 'sub-' : '';
125
- $el_attributes = ( is_string( $el_attributes ) || is_numeric( $el_attributes ) ) ? array( 'data-' . $sub_elemenet . 'depend-id' => $element_id . '_' . $el_attributes ) : $el_attributes;
126
- $el_attributes = ( empty( $el_attributes ) && isset( $element_id ) ) ? array( 'data-' . $sub_elemenet . 'depend-id' => $element_id ) : $el_attributes;
127
- }
128
-
129
- $attributes = wp_parse_args( $attributes, $el_attributes );
130
-
131
- $atts = '';
132
-
133
- if ( ! empty( $attributes ) ) {
134
- foreach ( $attributes as $key => $value ) {
135
- if ( 'only-key' === $value ) {
136
- $atts .= ' ' . $key;
137
- } else {
138
- $atts .= ' ' . $key . '="' . $value . '"';
139
- }
140
- }
141
- }
142
-
143
- return $atts;
144
-
145
- }
146
-
147
- /**
148
- * Element before.
149
- *
150
- * @return string
151
- */
152
- public function element_before() {
153
- return ( isset( $this->field['before'] ) ) ? $this->field['before'] : '';
154
- }
155
-
156
- /**
157
- * Element after.
158
- *
159
- * @return statement
160
- */
161
- public function element_after() {
162
-
163
- $out = ( isset( $this->field['info'] ) ) ? '<p class="sp-text-desc">' . $this->field['info'] . '</p>' : '';
164
- $out .= ( isset( $this->field['after'] ) ) ? '<span class="sp-after-text">' . $this->field['after'] . '</span>' : '';
165
- $out .= $this->element_after_multilang();
166
- $out .= $this->element_get_error();
167
- $out .= $this->element_help();
168
- $out .= $this->element_debug();
169
- return $out;
170
-
171
- }
172
-
173
- /**
174
- * Element debug.
175
- *
176
- * @return statement.
177
- */
178
- public function element_debug() {
179
-
180
- $out = '';
181
-
182
- if ( ( isset( $this->field['debug'] ) && $this->field['debug'] === true ) || ( defined( 'SP_OPTIONS_DEBUG' ) && SP_OPTIONS_DEBUG ) ) {
183
-
184
- $value = $this->element_value();
185
-
186
- $out .= '<pre>';
187
- $out .= '<strong>' . __( 'CONFIG', 'wp-carousel-free' ) . ':</strong>';
188
- $out .= "\n";
189
- ob_start();
190
- var_export( $this->field );
191
- $out .= htmlspecialchars( ob_get_clean() );
192
- $out .= "\n\n";
193
- $out .= '<strong>' . __( 'USAGE', 'wp-carousel-free' ) . ':</strong>';
194
- $out .= "\n";
195
- $out .= ( isset( $this->field['id'] ) ) ? "sp_get_option( '" . $this->field['id'] . "' );" : '';
196
-
197
- if ( ! empty( $value ) ) {
198
- $out .= "\n\n";
199
- $out .= '<strong>' . __( 'VALUE', 'wp-carousel-free' ) . ':</strong>';
200
- $out .= "\n";
201
- ob_start();
202
- var_export( $value );
203
- $out .= htmlspecialchars( ob_get_clean() );
204
- }
205
-
206
- $out .= '</pre>';
207
-
208
- }
209
-
210
- if ( ( isset( $this->field['debug_light'] ) && $this->field['debug_light'] === true ) || ( defined( 'SP_OPTIONS_DEBUG_LIGHT' ) && SP_OPTIONS_DEBUG_LIGHT ) ) {
211
-
212
- $out .= '<pre>';
213
- $out .= '<strong>' . __( 'USAGE', 'wp-carousel-free' ) . ':</strong>';
214
- $out .= "\n";
215
- $out .= ( isset( $this->field['id'] ) ) ? "sp_get_option( '" . $this->field['id'] . "' );" : '';
216
- $out .= "\n";
217
- $out .= '<strong>' . __( 'ID', 'wp-carousel-free' ) . ':</strong>';
218
- $out .= "\n";
219
- $out .= ( isset( $this->field['id'] ) ) ? $this->field['id'] : '';
220
- $out .= '</pre>';
221
-
222
- }
223
-
224
- return $out;
225
-
226
- }
227
-
228
- /**
229
- * Element get error.
230
- *
231
- * @return statement
232
- */
233
- public function element_get_error() {
234
-
235
- global $sp_errors;
236
-
237
- $out = '';
238
-
239
- if ( ! empty( $sp_errors ) ) {
240
- foreach ( $sp_errors as $key => $value ) {
241
- if ( isset( $this->field['id'] ) && $value['code'] == $this->field['id'] ) {
242
- $out .= '<p class="sp-text-warning">' . $value['message'] . '</p>';
243
- }
244
- }
245
- }
246
-
247
- return $out;
248
-
249
- }
250
-
251
- /**
252
- * Element help.
253
- *
254
- * @return statement
255
- */
256
- public function element_help() {
257
- return ( isset( $this->field['help'] ) ) ? '<span class="sp-help" data-title="' . $this->field['help'] . '"><span class="fa fa-question-circle"></span></span>' : '';
258
- }
259
-
260
- /**
261
- * Element after multi-language
262
- *
263
- * @return statement
264
- */
265
- public function element_after_multilang() {
266
-
267
- $out = '';
268
-
269
- if ( is_array( $this->multilang ) ) {
270
-
271
- $out .= '<fieldset class="hidden">';
272
-
273
- foreach ( $this->multilang['languages'] as $key => $val ) {
274
-
275
- // ignore current language for hidden element.
276
- if ( $key != $this->multilang['current'] ) {
277
-
278
- // set default value.
279
- if ( isset( $this->org_value[ $key ] ) ) {
280
- $value = $this->org_value[ $key ];
281
- } elseif ( ! isset( $this->org_value[ $key ] ) && ( $key == $this->multilang['default'] ) ) {
282
- $value = $this->org_value;
283
- } else {
284
- $value = '';
285
- }
286
-
287
- $cache_field = $this->field;
288
-
289
- unset( $cache_field['multilang'] );
290
- $cache_field['name'] = $this->element_name( '[' . $key . ']', true );
291
-
292
- $class = 'SP_WPCP_Framework_Option_' . $this->field['type'];
293
- $element = new $class( $cache_field, $value, $this->unique );
294
-
295
- ob_start();
296
- $element->output();
297
- $out .= ob_get_clean();
298
-
299
- }
300
- }
301
-
302
- $out .= '<input type="hidden" name="' . $this->element_name( '[multilang]', true ) . '" value="true" />';
303
- $out .= '</fieldset>';
304
- $out .= '<p class="sp-text-desc">' . sprintf( __( 'You are editing language: ( <strong>%s</strong> )', 'wp-carousel-free' ), $this->multilang['current'] ) . '</p>';
305
-
306
- }
307
-
308
- return $out;
309
- }
310
-
311
- /**
312
- * Element data.
313
- *
314
- * @param string $type Element data type.
315
- * @return statement
316
- */
317
- public function element_data( $type = '' ) {
318
-
319
- $options = array();
320
- $query_args = ( isset( $this->field['query_args'] ) ) ? $this->field['query_args'] : array();
321
-
322
- switch ( $type ) {
323
- case 'pages':
324
- case 'page':
325
- $pages = get_pages( $query_args );
326
-
327
- if ( ! is_wp_error( $pages ) && ! empty( $pages ) ) {
328
- foreach ( $pages as $page ) {
329
- $options[ $page->ID ] = $page->post_title;
330
- }
331
- }
332
-
333
- break;
334
-
335
- case 'posts':
336
- case 'post':
337
- $posts = get_posts( $query_args );
338
-
339
- if ( ! is_wp_error( $posts ) && ! empty( $posts ) ) {
340
- foreach ( $posts as $post ) {
341
- $options[ $post->ID ] = $post->post_title;
342
- }
343
- }
344
-
345
- break;
346
-
347
- case 'post_types':
348
- case 'post_type':
349
- $post_types = get_post_types( array( 'public' => true ) );
350
- if ( ! is_wp_error( $post_types ) && ! empty( $post_types ) ) {
351
- foreach ( $post_types as $post_type => $label ) {
352
- $options[ $post_type ] = $label;
353
- }
354
- }
355
-
356
- break;
357
-
358
- case 'all_posts':
359
- case 'all_post':
360
- global $post, $wpdb;
361
- $saved_meta = get_post_meta( $post->ID, 'sp_wpcp_upload_options', true );
362
- if ( isset( $saved_meta['post_type'] ) && '' != $saved_meta['post_type'] ) {
363
-
364
- $all_posts = $wpdb->get_results( "SELECT ID,post_title FROM `" . $wpdb->prefix . "posts` where post_type='" . $saved_meta['post_type'] . "' and post_status = 'publish' ORDER BY post_date DESC" );
365
-
366
- if ( ! is_wp_error( $all_posts ) && ! empty( $all_posts ) ) {
367
- foreach ( $all_posts as $post_obj ) {
368
- $options[ $post_obj->ID ] = $post_obj->post_title;
369
- }
370
- }
371
- } else {
372
- $post_types = get_post_types( array( 'public' => true ) );
373
- $post_type_list = array();
374
- $post_type_number = 1;
375
- foreach ( $post_types as $post_type => $label ) {
376
- $post_type_list[ $post_type_number++ ] = $label;
377
- }
378
-
379
- $all_posts = $wpdb->get_results( "SELECT ID,post_title FROM `" . $wpdb->prefix . "posts` where post_type='" . $post_type_list[1] . "' and post_status = 'publish' ORDER BY post_date DESC" );
380
-
381
- if ( ! is_wp_error( $all_posts ) && ! empty( $all_posts ) ) {
382
- foreach ( $all_posts as $post_obj ) {
383
- $options[ $post_obj->ID ] = $post_obj->post_title;
384
- }
385
- }
386
- }
387
-
388
- break;
389
-
390
- case 'taxonomies':
391
- case 'taxonomy':
392
- global $post;
393
- $saved_meta = get_post_meta( $post->ID, 'sp_wpcp_upload_options', true );
394
- if ( isset( $saved_meta['post_type'] ) && '' != $saved_meta['post_type'] ) {
395
- $taxonomy_names = get_object_taxonomies( $saved_meta['post_type'], 'names' );
396
- if ( ! is_wp_error( $taxonomy_names ) && ! empty( $taxonomy_names ) ) {
397
- foreach ( $taxonomy_names as $taxonomy => $label ) {
398
- $options[ $label ] = $label;
399
- }
400
- }
401
- } else {
402
- $post_types = get_post_types( array( 'public' => true ) );
403
- $post_type_list = array();
404
- $post_type_number = 1;
405
- foreach ( $post_types as $post_type => $label ) {
406
- $post_type_list[ $post_type_number++ ] = $label;
407
- }
408
- $taxonomy_names = get_object_taxonomies( $post_type_list['1'], 'names' );
409
- foreach ( $taxonomy_names as $taxonomy => $label ) {
410
- $options[ $label ] = $label;
411
- }
412
- }
413
-
414
- break;
415
-
416
- case 'terms':
417
- case 'term':
418
- global $post;
419
- $saved_meta = get_post_meta( $post->ID, 'sp_wpcp_upload_options', true );
420
- if ( isset( $saved_meta['post_taxonomy'] ) && $saved_meta['post_taxonomy'] != '' ) {
421
- $terms = get_terms( $saved_meta['post_taxonomy'] );
422
- foreach ( $terms as $key => $value ) {
423
- $options[ $value->term_id ] = $value->name;
424
- }
425
- } else {
426
- $post_types = get_post_types( array( 'public' => true ) );
427
- $post_type_list = array();
428
- $post_type_number = 1;
429
- foreach ( $post_types as $post_type => $label ) {
430
- $post_type_list[ $post_type_number++ ] = $label;
431
- }
432
- $taxonomy_names = get_object_taxonomies( $post_type_list['1'], 'names' );
433
- $taxonomy_number = 1;
434
- foreach ( $taxonomy_names as $taxonomy => $label ) {
435
- $taxonomy_terms[ $taxonomy_number++ ] = $label;
436
- }
437
- $terms = get_terms( $taxonomy_terms['1'] );
438
- foreach ( $terms as $key => $value ) {
439
- $options[ $value->term_id ] = $value->name;
440
- }
441
- }
442
-
443
- break;
444
-
445
- case 'categories':
446
- case 'category':
447
- $categories = get_categories( $query_args );
448
-
449
- if ( ! is_wp_error( $categories ) && ! empty( $categories ) && ! isset( $categories['errors'] ) ) {
450
- foreach ( $categories as $category ) {
451
- $options[ $category->term_id ] = $category->name;
452
- }
453
- }
454
-
455
- break;
456
-
457
- case 'tags':
458
- case 'tag':
459
- $taxonomies = ( isset( $query_args['taxonomies'] ) ) ? $query_args['taxonomies'] : 'post_tag';
460
- $tags = get_terms( $taxonomies, $query_args );
461
-
462
- if ( ! is_wp_error( $tags ) && ! empty( $tags ) ) {
463
- foreach ( $tags as $tag ) {
464
- $options[ $tag->term_id ] = $tag->name;
465
- }
466
- }
467
-
468
- break;
469
-
470
- case 'custom':
471
- case 'callback':
472
- if ( is_callable( $query_args['function'] ) ) {
473
- $options = call_user_func( $query_args['function'], $query_args['args'] );
474
- }
475
-
476
- break;
477
-
478
- }
479
-
480
- return $options;
481
- }
482
-
483
- /**
484
- * If the the option is checked.
485
- *
486
- * @param string $helper Helper option check.
487
- * @param string $current Current option check.
488
- * @param string $type Type option check.
489
- * @param boolean $echo Echo opiton check.
490
- * @return statement
491
- */
492
- public function checked( $helper = '', $current = '', $type = 'checked', $echo = false ) {
493
-
494
- if ( is_array( $helper ) && in_array( $current, $helper ) ) {
495
- $result = ' ' . $type . '="' . $type . '"';
496
- } elseif ( $helper == $current ) {
497
- $result = ' ' . $type . '="' . $type . '"';
498
- } else {
499
- $result = '';
500
- }
501
-
502
- if ( $echo ) {
503
- echo $result;
504
- }
505
-
506
- return $result;
507
-
508
- }
509
-
510
- /**
511
- * Multi-language element.
512
- *
513
- * @return statement
514
- */
515
- public function element_multilang() {
516
- return ( isset( $this->field['multilang'] ) ) ? sp_language_defaults() : false;
517
- }
518
-
519
- }
520
-
521
- // Load all of fields.
522
- sp_wpcp_load_option_fields();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/config/framework.config.php DELETED
@@ -1,76 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die;
3
- } // Cannot access pages directly.
4
- // ===============================================================================================
5
- // -----------------------------------------------------------------------------------------------
6
- // FRAMEWORK SETTINGS
7
- // -----------------------------------------------------------------------------------------------
8
- // ===============================================================================================
9
- $settings = array(
10
- 'menu_title' => __( 'Settings', 'wp-carousel-free' ),
11
- 'menu_parent' => 'edit.php?post_type=sp_wp_carousel',
12
- 'menu_type' => 'submenu', // menu, submenu, options, theme, etc.
13
- 'menu_slug' => 'wpcp_settings',
14
- 'ajax_save' => true,
15
- 'show_reset_all' => false,
16
- 'framework_title' => __( 'WordPress Carousel', 'wp-carousel-free' ),
17
- );
18
-
19
- // ===============================================================================================
20
- // -----------------------------------------------------------------------------------------------
21
- // FRAMEWORK OPTIONS
22
- // -----------------------------------------------------------------------------------------------
23
- // ===============================================================================================
24
- $options = array();
25
-
26
- // ----------------------------------------
27
- // a option section for options overview -
28
- // ----------------------------------------
29
- $options[] = array(
30
- 'name' => 'general_settings',
31
- 'title' => __( 'Advanced Settings', 'wp-carousel-free' ),
32
- 'icon' => 'fa fa-cogs',
33
-
34
- // Begin fields.
35
- 'fields' => array(
36
- array(
37
- 'type' => 'subheading',
38
- 'content' => __( 'Enqueue or Dequeue CSS', 'wp-carousel-free' ),
39
- ),
40
- array(
41
- 'id' => 'wpcp_dequeue_slick_css',
42
- 'type' => 'switcher',
43
- 'title' => __( 'Slick CSS', 'wp-carousel-free' ),
44
- 'desc' => __( 'On/off the switch to enqueue/dequeue slick CSS.', 'wp-carousel-free' ),
45
- 'default' => true,
46
- ),
47
- array(
48
- 'id' => 'wpcp_dequeue_fa_css',
49
- 'type' => 'switcher',
50
- 'title' => __( 'Font Awesome CSS', 'wp-carousel-free' ),
51
- 'desc' => __( 'On/off the switch to enqueue/dequeue font awesome CSS.', 'wp-carousel-free' ),
52
- 'default' => true,
53
- ),
54
- ), // End fields.
55
- );
56
-
57
- // ------------------------------
58
- // Custom CSS -
59
- // ------------------------------
60
- $options[] = array(
61
- 'name' => 'custom_css_section',
62
- 'title' => __( 'Custom CSS', 'wp-carousel-free' ),
63
- 'icon' => 'fa fa-css3',
64
- 'fields' => array(
65
-
66
- array(
67
- 'id' => 'wpcp_custom_css',
68
- 'type' => 'textarea',
69
- 'title' => __( 'Custom CSS', 'wp-carousel-free' ),
70
- 'desc' => __( 'Type your css.', 'wp-carousel-free' ),
71
- ),
72
-
73
- ),
74
- );
75
-
76
- SP_WPCP_Framework::instance( $settings, $options );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/config/metabox.config.php DELETED
@@ -1,727 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die;
3
- }
4
- // Cannot access pages directly.
5
- // ===============================================================================================
6
- // -----------------------------------------------------------------------------------------------
7
- // METABOX OPTIONS
8
- // -----------------------------------------------------------------------------------------------
9
- // ===============================================================================================
10
- $options = array();
11
-
12
- /**
13
- * Image, Video and Content Metabox.
14
- */
15
- $options[] = array(
16
- 'id' => 'sp_wpcp_upload_options',
17
- 'title' => __( 'Upload Options', 'wp-carousel-free' ),
18
- 'post_type' => 'sp_wp_carousel',
19
- 'context' => 'normal',
20
- 'priority' => 'default',
21
- 'sections' => array(
22
- // Begin: a section.
23
- array(
24
- 'name' => 'sp_wpcp_upload_options_1',
25
- // 'title' => __( 'Carousel Content', 'wp-carousel-free' ),
26
- 'icon' => 'fa fa-file',
27
- // Begin fields.
28
- 'fields' => array(
29
- array(
30
- 'id' => 'wpcp_carousel_type',
31
- 'type' => 'carousel_type',
32
- 'title' => __( 'Carousel Type', 'wp-carousel-free' ),
33
- // 'desc' => __( 'Select which carousel type you want to display.', 'wp-carousel-free' ),
34
- 'options' => array(
35
- 'image-carousel' => array(
36
- 'icon' => 'fa fa-image',
37
- 'text' => __( 'Image', 'wp-carousel-free' ),
38
- 'pro_only' => false,
39
- ),
40
- 'post-carousel' => array(
41
- 'icon' => 'dashicons dashicons-admin-post',
42
- 'text' => __( 'Post', 'wp-carousel-free' ),
43
- 'pro_only' => false,
44
- ),
45
- 'product-carousel' => array(
46
- 'icon' => 'fa fa-cart-plus',
47
- 'text' => __( 'Product', 'wp-carousel-free' ),
48
- 'pro_only' => false,
49
- ),
50
- 'content-carousel' => array(
51
- 'icon' => 'fa fa-file-text-o',
52
- 'text' => __( 'Content', 'wp-carousel-free' ),
53
- 'pro_only' => true,
54
- ),
55
- 'video-carousel' => array(
56
- 'icon' => 'fa fa-play-circle-o',
57
- 'text' => __( 'Video', 'wp-carousel-free' ),
58
- 'pro_only' => true,
59
- ),
60
- ),
61
- 'radio' => true,
62
- 'default' => 'image-carousel',
63
- 'attributes' => array(
64
- 'data-depend-id' => 'wpcp_carousel_type',
65
- ),
66
- ),
67
- array(
68
- 'id' => 'wpcp_gallery',
69
- 'type' => 'gallery',
70
- 'title' => 'Gallery Images',
71
- 'wrap_class' => 'wpcp-gallery-filed-wrapper',
72
- 'add_title' => __( 'ADD IMAGE', 'wp-carousel-free' ),
73
- 'edit_title' => __( 'EDIT IMAGE', 'wp-carousel-free' ),
74
- 'clear_title' => __( 'REMOVE ALL', 'wp-carousel-free' ),
75
- 'dependency' => array( 'wpcp_carousel_type', '==', 'image-carousel' ),
76
- ),
77
- array(
78
- 'id' => 'wpcp_display_posts_from',
79
- 'type' => 'select',
80
- 'title' => __( 'Display Posts From', 'wp-carousel-free' ),
81
- 'desc' => __( 'Select an option to display the posts.', 'wp-carousel-free' ),
82
- 'options' => array(
83
- 'latest' => array(
84
- 'text' => __( 'Latest', 'wp-carousel-free' ),
85
- ),
86
- 'taxonomy' => array(
87
- 'text' => __( 'Taxonomy (Pro)', 'wp-carousel-free' ),
88
- 'pro_only' => true,
89
- ),
90
- 'specific_post' => array(
91
- 'text' => __( 'Specific Posts (Pro)', 'wp-carousel-free' ),
92
- 'pro_only' => true,
93
- ),
94
- ),
95
- 'default' => 'latest',
96
- 'class' => 'chosen',
97
- 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
98
- ),
99
- array(
100
- 'id' => 'number_of_total_posts',
101
- 'type' => 'number',
102
- 'title' => __( 'Total Posts', 'wp-carousel-free' ),
103
- 'desc' => __( 'Number of total posts to show. Default value is 10.', 'wp-carousel-free' ),
104
- 'default' => '10',
105
- 'attributes' => array(
106
- 'min' => 0,
107
- ),
108
- 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
109
- ),
110
- // Product Carousel.
111
- array(
112
- 'id' => 'wpcp_display_product_from',
113
- 'type' => 'select',
114
- 'title' => __( 'Display Product From', 'wp-carousel-free' ),
115
- 'desc' => __( 'Select an option to display the products.', 'wp-carousel-free' ),
116
- 'options' => array(
117
- 'latest' => array(
118
- 'text' => __( 'Latest', 'wp-carousel-free' ),
119
- ),
120
- 'taxonomy' => array(
121
- 'text' => __( 'Taxonomy (Pro)', 'wp-carousel-free' ),
122
- 'pro_only' => true,
123
- ),
124
- 'specific_post' => array(
125
- 'text' => __( 'Specific Products (Pro)', 'wp-carousel-free' ),
126
- 'pro_only' => true,
127
- ),
128
- ),
129
- 'default' => 'latest',
130
- 'class' => 'chosen',
131
- 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
132
- ),
133
- array(
134
- 'id' => 'wpcp_total_products',
135
- 'type' => 'number',
136
- 'title' => __( 'Total Products', 'wp-carousel-free' ),
137
- 'desc' => __( 'Number of total products to display. Default value is 10.', 'wp-carousel-free' ),
138
- 'default' => '10',
139
- 'attributes' => array(
140
- 'min' => 1,
141
- ),
142
- 'dependency' => array( 'wpcp_display_product_from|wpcp_carousel_type', '!=|==', 'specific_products|product-carousel' ),
143
- ),
144
- ), // End: fields.
145
- ), // End: Upload section.
146
- ),
147
- );
148
- // -----------------------------------------
149
- // Shortcode Generator Options
150
- // -----------------------------------------
151
- $options[] = array(
152
- 'id' => 'sp_wpcp_shortcode_options',
153
- 'title' => __( 'Shortcode Options', 'wp-carousel-free' ),
154
- 'post_type' => 'sp_wp_carousel',
155
- 'context' => 'normal',
156
- 'priority' => 'default',
157
- 'sections' => array(
158
- // Begin: a section.
159
- array(
160
- 'name' => 'sp_wcpcp_shortcode_option_1',
161
- 'title' => __( 'General Settings', 'wp-carousel-free' ),
162
- 'icon' => 'fa fa-wrench',
163
- // Begin fields.
164
- 'fields' => array(
165
- array(
166
- 'id' => 'section_title',
167
- 'type' => 'switcher',
168
- 'title' => __( 'Carousel Section Title', 'wp-carousel-free' ),
169
- 'desc' => __( 'Show/Hide the carousel section title.', 'wp-carousel-free' ),
170
- 'default' => false,
171
- ),
172
- array(
173
- 'id' => 'section_title_margin_bottom',
174
- 'type' => 'number',
175
- 'title' => __( 'Carousel Title Margin Bottom', 'wp-carousel-free' ),
176
- 'desc' => __( 'Set margin bottom for the carousel section title. Default value is 30px.', 'wp-carousel-free' ),
177
- 'after' => __( '(px)', 'wp-carousel-free' ),
178
- 'default' => 30,
179
- 'attributes' => array(
180
- 'min' => 0,
181
- ),
182
- 'dependency' => array(
183
- 'section_title',
184
- '==',
185
- 'true',
186
- ),
187
- ),
188
- array(
189
- 'id' => 'wpcp_number_of_columns',
190
- 'type' => 'column',
191
- 'title' => __( 'Carousel Column(s)', 'wp-carousel-free' ),
192
- 'desc' => __( 'Set number of column on devices.', 'wp-carousel-free' ),
193
- 'default' => array(
194
- 'column1' => '5',
195
- 'title1' => __( 'Large Desktop', 'wp-carousel-free' ),
196
- 'help1' => __( 'Set number of column(s) for the screen larger than 1200px. Default value is 5.', 'wp-carousel-free' ),
197
- 'column2' => '4',
198
- 'title2' => __( 'Desktop', 'wp-carousel-free' ),
199
- 'help2' => __( 'Set number of column on desktop for the screen smaller than 1200px. Default value is 4.', 'wp-carousel-free' ),
200
- 'column3' => '3',
201
- 'title3' => __( 'Small Desktop', 'wp-carousel-free' ),
202
- 'help3' => __( 'Set number of column on small desktop for the screen smaller than 980px. Default value is 3.', 'wp-carousel-free' ),
203
- 'column4' => '2',
204
- 'title4' => __( 'Tablet', 'wp-carousel-free' ),
205
- 'help4' => __( 'Set number of column on tablet for the screen smaller than 736px. Default value is 2.', 'wp-carousel-free' ),
206
- 'column5' => '1',
207
- 'title5' => __( 'Mobile', 'wp-carousel-free' ),
208
- 'help5' => __( 'Set number of column on mobile for the screen smaller than 480px. Default value is 1.', 'wp-carousel-free' ),
209
- 'min1' => 1,
210
- 'max1' => 40,
211
- 'min2' => 1,
212
- 'max2' => 40,
213
- 'min3' => 1,
214
- 'max3' => 40,
215
- 'min4' => 1,
216
- 'max4' => 20,
217
- 'min5' => 0,
218
- 'max5' => 20,
219
- ),
220
- 'column1' => true,
221
- 'column2' => true,
222
- 'column3' => true,
223
- 'column4' => true,
224
- 'column5' => true,
225
- // 'dependency' => array( 'wpcp_carousel_mode', '==', 'standard' ),
226
- ),
227
- array(
228
- 'id' => 'wpcp_image_order_by',
229
- 'type' => 'select',
230
- 'title' => __( 'Order by', 'wp-carousel-free' ),
231
- 'desc' => __( 'Set an order by option.', 'wp-carousel-free' ),
232
- 'options' => array(
233
- 'menu_order' => array(
234
- 'text' => __( 'Drag & Drop', 'wp-carousel-free' ),
235
- ),
236
- 'rand' => array(
237
- 'text' => __( 'Random', 'wp-carousel-free' )
238
- ),
239
- ),
240
- 'default' => 'menu_order',
241
- 'dependency' => array( 'wpcp_carousel_type', 'any', 'image-carousel' ),
242
- ),
243
- array(
244
- 'id' => 'wpcp_post_order_by',
245
- 'type' => 'select',
246
- 'title' => __( 'Order by', 'wp-carousel-free' ),
247
- 'desc' => __( 'Select an order by option.', 'wp-carousel-free' ),
248
- 'options' => array(
249
- 'ID' => array(
250
- 'text' => __( 'ID', 'wp-carousel-free' ),
251
- ),
252
- 'date' => array(
253
- 'text' => __( 'Date', 'wp-carousel-free' ),
254
- ),
255
- 'rand' => array(
256
- 'text' => __( 'Random', 'wp-carousel-free' ),
257
- ),
258
- 'title' => array(
259
- 'text' => __( 'Title', 'wp-carousel-free' ),
260
- ),
261
- 'modified' => array(
262
- 'text' => __( 'Modified', 'wp-carousel-free' ),
263
- ),
264
- 'menu_order' => array(
265
- 'text' => __( 'Menu Order', 'wp-carousel-free' ),
266
- ),
267
- ),
268
- 'default' => 'menu_order',
269
- 'dependency' => array( 'wpcp_carousel_type', 'any', 'post-carousel,product-carousel' ),
270
- ),
271
- array(
272
- 'id' => 'wpcp_post_order',
273
- 'type' => 'select',
274
- 'title' => __( 'Order', 'wp-carousel-free' ),
275
- 'desc' => __( 'Select an order option.', 'wp-carousel-free' ),
276
- 'options' => array(
277
- 'ASC' => array(
278
- 'text' => __( 'Ascending', 'wp-carousel-free' )
279
- ),
280
- 'DESC' => array(
281
- 'text' => __( 'Descending', 'wp-carousel-free' )
282
- ),
283
- ),
284
- 'default' => 'rand',
285
- 'dependency' => array( 'wpcp_carousel_type', 'any', 'post-carousel,product-carousel' ),
286
- ),
287
- ), // End: fields.
288
- ), // End: General section.
289
-
290
- // Begin Carousel Settings.
291
- array(
292
- 'name' => 'sp_wcpcp_shortcode_option_2',
293
- 'title' => __( 'Carousel Settings', 'wp-carousel-free' ),
294
- 'icon' => 'fa fa-sliders',
295
- 'fields' => array(
296
- array(
297
- 'id' => 'wpcp_carousel_auto_play',
298
- 'type' => 'switcher',
299
- 'title' => __( 'AutoPlay', 'wp-carousel-free' ),
300
- 'desc' => __( 'On/Off auto play.', 'wp-carousel-free' ),
301
- 'default' => true,
302
- //'dependency' => array( 'wpcp_carousel_mode', '==', 'standard' ),
303
- ),
304
- array(
305
- 'id' => 'carousel_auto_play_speed',
306
- 'type' => 'number',
307
- 'title' => __( 'AutoPlay Speed', 'wp-carousel-free' ),
308
- 'desc' => __( 'Set auto play speed. Default value is 3000 ms.', 'wp-carousel-free' ),
309
- 'after' => __( '(millisecond)', 'wp-carousel-free' ),
310
- 'default' => '3000',
311
- 'attributes' => array(
312
- 'min' => 0,
313
- ),
314
- 'dependency' => array( 'wpcp_carousel_auto_play', '==', 'true'),
315
- ),
316
- array(
317
- 'id' => 'standard_carousel_scroll_speed',
318
- 'type' => 'number',
319
- 'title' => __( 'Pagination Speed', 'wp-carousel-free' ),
320
- 'desc' => __( 'Set pagination/slide scroll speed. Default value is 600 ms.', 'wp-carousel-free' ),
321
- 'after' => __( '(millisecond)', 'wp-carousel-free' ),
322
- 'default' => '600',
323
- 'attributes' => array(
324
- 'min' => 0,
325
- ),
326
- ),
327
- array(
328
- 'id' => 'carousel_pause_on_hover',
329
- 'type' => 'switcher',
330
- 'title' => __( 'Pause on Hover', 'wp-carousel-free' ),
331
- 'desc' => __( 'On/Off carousel pause on hover.', 'wp-carousel-free' ),
332
- 'default' => true,
333
- ),
334
- array(
335
- 'id' => 'carousel_infinite',
336
- 'type' => 'switcher',
337
- 'title' => __( 'Infinite Loop', 'wp-carousel-free' ),
338
- 'desc' => __( 'On/Off infinite loop mode.', 'wp-carousel-free' ),
339
- 'default' => true,
340
- ),
341
- array(
342
- 'type' => 'subheading',
343
- 'content' => __( 'Navigation Settings', 'wp-carousel-free' ),
344
- ),
345
- // Navigation Settings.
346
- array(
347
- 'id' => 'wpcp_navigation',
348
- 'type' => 'button_set',
349
- 'title' => __( 'Navigation', 'wp-carousel-free' ),
350
- 'desc' => __( 'Show/Hide carousel navigation.', 'wp-carousel-free' ),
351
- 'options' => array(
352
- 'show' => __( 'Show', 'wp-carousel-free' ),
353
- 'hide' => __( 'Hide', 'wp-carousel-free' ),
354
- 'hide_mobile' => __( 'Hide on Mobile', 'wp-carousel-free' ),
355
- ),
356
- 'radio' => true,
357
- 'default' => 'show',
358
- 'attributes' => array(
359
- 'data-depend-id' => 'wpcp_navigation',
360
- ),
361
- ),
362
- array(
363
- 'id' => 'wpcp_nav_colors',
364
- 'type' => 'color_set',
365
- 'title' => __( 'Navigation Color', 'wp-carousel-free' ),
366
- 'desc' => __( 'Set color for the carousel navigation.', 'wp-carousel-free' ),
367
- 'color1' => true,
368
- 'color2' => true,
369
- 'default' => array(
370
- 'title1' => __( 'Color', 'wp-carousel-free' ),
371
- 'color1' => '#aaa',
372
- 'title2' => __( 'Hover Color', 'wp-carousel-free' ),
373
- 'color2' => '#18AFB9',
374
- ),
375
- 'dependency' => array( 'wpcp_navigation', '!=', 'hide' ),
376
- ),
377
- // Pagination Settings.
378
- array(
379
- 'type' => 'subheading',
380
- 'content' => __( 'Pagination Settings', 'wp-carousel-free' ),
381
- ),
382
- array(
383
- 'id' => 'wpcp_pagination',
384
- 'type' => 'button_set',
385
- 'title' => __( 'Pagination', 'wp-carousel-free' ),
386
- 'desc' => __( 'Show/Hide carousel pagination.', 'wp-carousel-free' ),
387
- 'options' => array(
388
- 'show' => __( 'Show', 'wp-carousel-free' ),
389
- 'hide' => __( 'Hide', 'wp-carousel-free' ),
390
- 'hide_mobile' => __( 'Hide on Mobile', 'wp-carousel-free' ),
391
- ),
392
- 'radio' => true,
393
- 'default' => 'hide_mobile',
394
- 'attributes' => array(
395
- 'data-depend-id' => 'wpcp_pagination',
396
- ),
397
- ),
398
- array(
399
- 'id' => 'wpcp_pagination_color',
400
- 'type' => 'color_set',
401
- 'title' => __( 'Pagination Color', 'wp-carousel-free' ),
402
- 'desc' => __( 'Set color for the carousel pagination dots.', 'wp-carousel-free' ),
403
- 'color1' => true,
404
- 'color2' => true,
405
- 'default' => array(
406
- 'title1' => __( 'Color', 'wp-carousel-free' ),
407
- 'color1' => '#cccccc',
408
- 'title2' => __( 'Active Color', 'wp-carousel-free' ),
409
- 'color2' => '#18AFB9',
410
- ),
411
- 'dependency' => array( 'wpcp_pagination', '!=', 'hide' ),
412
- ),
413
-
414
- // Miscellaneous Settings.
415
- array(
416
- 'type' => 'subheading',
417
- 'content' => __( 'Misc. Settings', 'wp-carousel-free' ),
418
- ),
419
- array(
420
- 'id' => 'wpcp_accessibility',
421
- 'type' => 'switcher',
422
- 'title' => __( 'Tab and Key Navigation', 'wp-carousel-free' ),
423
- 'desc' => __( 'Enable/Disable carousel scroll with tab and keyboard.', 'wp-carousel-free' ),
424
- 'default' => true,
425
- ),
426
- array(
427
- 'id' => 'slider_swipe',
428
- 'type' => 'switcher',
429
- 'title' => __( 'Swipe', 'wp-carousel-free' ),
430
- 'desc' => __( 'On/Off swipe mode.', 'wp-carousel-free' ),
431
- 'default' => true,
432
- ),
433
- array(
434
- 'id' => 'slider_draggable',
435
- 'type' => 'switcher',
436
- 'title' => __( 'Mouse Draggable', 'wp-carousel-free' ),
437
- 'desc' => __( 'On/Off mouse draggable mode.', 'wp-carousel-free' ),
438
- 'default' => true,
439
- 'dependency' => array( 'slider_swipe', '==', 'true'),
440
- ),
441
- array(
442
- 'id' => 'rtl_mode',
443
- 'type' => 'switcher',
444
- 'title' => __( 'RTL', 'wp-carousel-free' ),
445
- 'desc' => __( 'On/Off right to left mode.', 'wp-carousel-free' ),
446
- 'default' => false,
447
- ),
448
- array(
449
- 'type' => 'notice',
450
- 'class' => 'danger',
451
- 'content' => __( 'To make the RTL Mode work, please select an rtl language in the dashboard e.g. Arabic, Hebrew.', 'wp-carousel-free' ),
452
- 'dependency' => array( 'rtl_mode', '==', 'true' ),
453
- ),
454
- ), // End Fields.
455
- ), // End Carousel section.
456
-
457
- // Begin Style Settings.
458
- array(
459
- 'name' => 'sp_wcpcp_shortcode_option_3',
460
- 'title' => __( 'Style Settings', 'wp-carousel-free' ),
461
- 'icon' => 'fa fa-paint-brush',
462
- 'fields' => array(
463
- array(
464
- 'id' => 'wpcp_post_detail_position',
465
- 'type' => 'select',
466
- 'title' => __( 'Content Position', 'wp-carousel-free' ),
467
- 'desc' => __( 'Select a position for the title, content, meta etc.', 'wp-carousel-free' ),
468
- 'options' => array(
469
- 'bottom' => array(
470
- 'text' => __( 'Bottom', 'wp-carousel-free' ),
471
- ),
472
- 'on_right' => array(
473
- 'text' => __( 'Right (Pro)', 'wp-carousel-free' ),
474
- 'pro_only' => true,
475
- ),
476
- 'with_overlay' => array(
477
- 'text' => __( 'Overlay (Pro)', 'wp-carousel-free' ),
478
- 'pro_only' => true,
479
- ),
480
- ),
481
- 'default' => 'bottom',
482
- 'dependency' => array( 'wpcp_carousel_type', 'any', 'image-carousel,post-carousel,product-carousel' ),
483
- ),
484
- array(
485
- 'id' => 'wpcp_slide_border',
486
- 'type' => 'border',
487
- 'title' => __( 'Slide Border', 'wp-carousel-free' ),
488
- 'desc' => __( 'Set border for the slide.', 'wp-carousel-free' ),
489
- 'default' => array(
490
- 'width' => '1',
491
- 'style' => 'solid',
492
- 'color' => '#dddddd',
493
- // 'hover_color' => '#dddddd',
494
- ),
495
- // 'hover_color' => true,
496
- ),
497
- // Post Settings.
498
- array(
499
- 'id' => 'wpcp_post_title',
500
- 'type' => 'switcher',
501
- 'title' => __( 'Post Title', 'wp-carousel-free' ),
502
- 'desc' => __( 'Show/Hide post title.', 'wp-carousel-free' ),
503
- 'default' => true,
504
- 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
505
- ),
506
- array(
507
- 'id' => 'wpcp_post_content_show',
508
- 'type' => 'switcher',
509
- 'title' => __( 'Post Content', 'wp-carousel-free' ),
510
- 'desc' => __( 'Show/Hide post content.', 'wp-carousel-free' ),
511
- 'default' => true,
512
- 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
513
- ),
514
- array(
515
- 'id' => 'wpcp_post_content_type',
516
- 'type' => 'select',
517
- 'title' => __( 'Content Display Type', 'wp-carousel-free' ),
518
- 'desc' => __( 'Select a content display type.', 'wp-carousel-free' ),
519
- 'options' => array(
520
- 'excerpt' => array(
521
- 'text' => __( 'Excerpt', 'wp-carousel-free' ),
522
- ),
523
- 'content' => array(
524
- 'text' => __( 'Full Content (Pro)', 'wp-carousel-free' ),
525
- 'pro_only' => true,
526
- ),
527
- 'content_with_limit' => array(
528
- 'text' => __( 'Content with Limit (Pro)', 'wp-carousel-free' ),
529
- 'pro_only' => true,
530
- ),
531
- ),
532
- 'default' => 'excerpt',
533
- 'class' => 'chosen',
534
- 'dependency' => array( 'wpcp_carousel_type|wpcp_post_content_show', '==|==', 'post-carousel|true' ),
535
- ),
536
- array(
537
- 'type' => 'subheading',
538
- 'content' => __( 'Post Meta', 'wp-carousel-free' ),
539
- 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
540
- ),
541
- array(
542
- 'id' => 'wpcp_post_author_show',
543
- 'type' => 'switcher',
544
- 'title' => __( 'Post Author', 'wp-carousel-free' ),
545
- 'desc' => __( 'Show/Hide post author name.', 'wp-carousel-free' ),
546
- 'default' => true,
547
- 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
548
- ),
549
- array(
550
- 'id' => 'wpcp_post_date_show',
551
- 'type' => 'switcher',
552
- 'title' => __( 'Post Date', 'wp-carousel-free' ),
553
- 'desc' => __( 'Show/Hide post date.', 'wp-carousel-free' ),
554
- 'default' => true,
555
- 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
556
- ),
557
-
558
- // Product Settings.
559
- array(
560
- 'type' => 'subheading',
561
- 'content' => __( 'Product Settings', 'wp-carousel-free' ),
562
- 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
563
- ),
564
- array(
565
- 'id' => 'wpcp_product_name',
566
- 'type' => 'switcher',
567
- 'title' => __( 'Product Name', 'wp-carousel-free' ),
568
- 'desc' => __( 'Show/Hide product name.', 'wp-carousel-free' ),
569
- 'default' => true,
570
- 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
571
- ),
572
- array(
573
- 'id' => 'wpcp_product_price',
574
- 'type' => 'switcher',
575
- 'title' => __( 'Product Price', 'wp-carousel-free' ),
576
- 'desc' => __( 'Show/Hide product price.', 'wp-carousel-free' ),
577
- 'default' => true,
578
- 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
579
- ),
580
- array(
581
- 'id' => 'wpcp_product_rating',
582
- 'type' => 'switcher',
583
- 'title' => __( 'Product Rating', 'wp-carousel-free' ),
584
- 'desc' => __( 'Show/Hide product rating.', 'wp-carousel-free' ),
585
- 'default' => true,
586
- 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
587
- ),
588
- array(
589
- 'id' => 'wpcp_product_cart',
590
- 'type' => 'switcher',
591
- 'title' => __( 'Add to Cart Button', 'wp-carousel-free' ),
592
- 'desc' => __( 'Show/Hide add to cart button.', 'wp-carousel-free' ),
593
- 'default' => true,
594
- 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
595
- ),
596
- // Image Settings.
597
- array(
598
- 'type' => 'subheading',
599
- 'content' => __( 'Image Settings', 'wp-carousel-free' ),
600
- 'dependency' => array( 'wpcp_carousel_type', 'any', 'image-carousel,post-carousel,product-carousel' ),
601
- ),
602
- array(
603
- 'id' => 'show_image',
604
- 'type' => 'switcher',
605
- 'title' => __( 'Image', 'wp-carousel-free' ),
606
- 'desc' => __( 'Show/Hide slide image.', 'wp-carousel-free' ),
607
- 'default' => true,
608
- 'dependency' => array( 'wpcp_carousel_type', 'any', 'post-carousel,product-carousel' ),
609
- ),
610
- array(
611
- 'id' => 'wpcp_image_sizes',
612
- 'type' => 'image_sizes',
613
- 'class' => 'chosen',
614
- 'title' => __( 'Image Sizes', 'wp-carousel-free' ),
615
- 'default' => 'full',
616
- 'desc' => __( 'Select a image size.', 'wp-carousel-free' ),
617
- 'dependency' => array( 'wpcp_carousel_type', 'any', 'image-carousel,post-carousel,product-carousel' ),
618
- ),
619
- array(
620
- 'id' => '_image_title_attr',
621
- 'type' => 'checkbox',
622
- 'title' => __( 'Image Title Attribute', 'wp-carousel-free' ),
623
- 'desc' => __( 'Check to add image title attribute.', 'wp-carousel-free' ),
624
- 'default' => false,
625
- 'dependency' => array( 'wpcp_carousel_type', 'any', 'image-carousel,post-carousel,product-carousel' ),
626
- ),
627
- ), // End Fields.
628
- ), // End a section.
629
-
630
- // Begin Typography the section.
631
- array(
632
- 'name' => 'sp_wpcp_shortcode_option_4',
633
- 'title' => __( 'Typography', 'wp-carousel-free' ),
634
- 'icon' => 'fa fa-font',
635
- // begin fields.
636
- 'fields' => array(
637
- array(
638
- 'type' => 'pronotice',
639
- 'content' => __( 'These Typography (840+ Google Fonts) options are available in the <a href="https://shapedplugin.com/plugin/wordpress-carousel-pro/" target="_blank">Pro Version</a> only.', 'wp-carousel-free' ),
640
- ),
641
- array(
642
- 'id' => 'section_title_font_load',
643
- 'type' => 'switcher',
644
- 'title' => __( 'Load Carousel Section Title Font', 'wp-carousel-free' ),
645
- 'desc' => __( 'On/Off google font for the carousel section title.', 'wp-carousel-free' ),
646
- 'default' => true,
647
- ),
648
- array(
649
- 'id' => 'wpcp_section_title_typography',
650
- 'type' => 'typography_advanced',
651
- 'title' => __( 'Carousel Section Title Font', 'wp-carousel-free' ),
652
- 'desc' => __( 'Set Carousel section title font properties.', 'wp-carousel-free' ),
653
- 'default' => array(
654
- 'family' => 'Open Sans',
655
- 'variant' => '600',
656
- 'font' => 'google',
657
- 'size' => '24',
658
- 'height' => '28',
659
- 'alignment' => 'center',
660
- 'transform' => 'none',
661
- 'spacing' => 'normal',
662
- 'color' => '#444444',
663
- ),
664
- 'color' => true,
665
- 'preview' => true,
666
- 'preview_text' => 'The Carousel Section Title', // Replace preview text with any text you like.
667
- ),
668
- array(
669
- 'id' => 'wpcp_image_caption_font_load',
670
- 'type' => 'switcher',
671
- 'title' => __( 'Load Caption Font', 'wp-carousel-free' ),
672
- 'desc' => __( 'On/Off google font for the image caption.', 'wp-carousel-free' ),
673
- 'default' => true,
674
- ),
675
- array(
676
- 'id' => 'wpcp_image_caption_typography',
677
- 'type' => 'typography_advanced',
678
- 'title' => __( 'Caption Font', 'wp-carousel-free' ),
679
- 'desc' => __( 'Set caption font properties.', 'wp-carousel-free' ),
680
- 'default' => array(
681
- 'family' => 'Open Sans',
682
- 'variant' => '600',
683
- 'font' => 'google',
684
- 'size' => '15',
685
- 'height' => '23',
686
- 'alignment' => 'center',
687
- 'transform' => 'capitalize',
688
- 'spacing' => 'normal',
689
- 'color' => '#333',
690
- ),
691
- 'color' => true,
692
- 'preview' => true,
693
- 'preview_text' => 'The Caption', // Replace preview text with any text you like.
694
- ),
695
- array(
696
- 'id' => 'wpcp_image_desc_font_load',
697
- 'type' => 'switcher',
698
- 'title' => __( 'Load Description Font', 'wp-carousel-free' ),
699
- 'desc' => __( 'On/Off google font for the image description.', 'wp-carousel-free' ),
700
- 'default' => true,
701
- ),
702
- array(
703
- 'id' => 'wpcp_image_desc_typography',
704
- 'type' => 'typography_advanced',
705
- 'title' => __( 'Description Font', 'wp-carousel-free' ),
706
- 'desc' => __( 'Set description font properties.', 'wp-carousel-free' ),
707
- 'default' => array(
708
- 'family' => 'Open Sans',
709
- 'variant' => '400',
710
- 'font' => 'google',
711
- 'size' => '14',
712
- 'height' => '21',
713
- 'alignment' => 'center',
714
- 'transform' => 'none',
715
- 'spacing' => 'normal',
716
- 'color' => '#333',
717
- ),
718
- 'color' => true,
719
- 'preview' => true,
720
- 'preview_text' => 'The image description', // Replace preview text with any text you like.
721
- ),
722
- ), // End fields.
723
- ), // End Typography section.
724
- ),
725
- );
726
-
727
- SP_WPCP_Framework_Metabox::instance( $options );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/fields/border/border.php DELETED
@@ -1,114 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die;
3
- } // Cannot access pages directly.
4
-
5
- /**
6
- *
7
- * Field: Border
8
- *
9
- * @since 1.0
10
- * @version 1.0
11
- */
12
- class SP_WPCP_Framework_Option_border extends SP_WPCP_Framework_Options {
13
-
14
- public function __construct( $field, $value = '', $unique = '' ) {
15
- parent::__construct( $field, $value, $unique );
16
- }
17
-
18
- public function output() {
19
-
20
- echo $this->element_before();
21
-
22
- $defaults_value = array(
23
- 'width' => '',
24
- 'style' => '',
25
- 'color' => '',
26
- 'hover_color' => '',
27
- );
28
-
29
- $value = wp_parse_args( $this->element_value(), $defaults_value );
30
-
31
- // Container.
32
- echo '<div class="sp_wpcp_border_field" data-id="' . $this->field['id'] . '">';
33
-
34
- echo sp_wpcp_add_element(
35
- array(
36
- 'pseudo' => true,
37
- 'type' => 'number',
38
- 'name' => $this->element_name( '[width]' ),
39
- 'value' => $value['width'],
40
- 'default' => ( isset( $this->field['default']['width'] ) ) ? $this->field['default']['width'] : '',
41
- 'wrap_class' => 'small-input sp-border-width',
42
- 'before' => 'Width<br>',
43
- 'after' => '(px)',
44
- 'attributes' => array(
45
- 'min' => 0,
46
- 'title' => __( 'Border Width', 'logo-carousel-pro' ),
47
- ),
48
- )
49
- );
50
- echo sp_wpcp_add_element(
51
- array(
52
- 'pseudo' => true,
53
- 'type' => 'select_typo',
54
- 'name' => $this->element_name( '[style]' ),
55
- 'value' => $value['style'],
56
- 'default' => ( isset( $this->field['default']['style'] ) ) ? $this->field['default']['style'] : '',
57
- 'wrap_class' => 'small-input sp-border-style sp-wpcp-select-wrapper',
58
- 'class' => 'sp-wpcp-select-css',
59
- 'before' => 'Style<br>',
60
- 'attributes' => array(
61
- 'title' => __( 'Border Style', 'logo-carousel-pro' ),
62
- ),
63
- 'options' => array(
64
- 'none' => __( 'None', 'logo-carousel-pro' ),
65
- 'solid' => __( 'Solid', 'logo-carousel-pro' ),
66
- 'dotted' => __( 'Dotted', 'logo-carousel-pro' ),
67
- 'dashed' => __( 'Dashed', 'logo-carousel-pro' ),
68
- 'double' => __( 'Double', 'logo-carousel-pro' ),
69
- 'groove' => __( 'Groove', 'logo-carousel-pro' ),
70
- 'ridge' => __( 'Ridge', 'logo-carousel-pro' ),
71
- 'inset' => __( 'Inset', 'logo-carousel-pro' ),
72
- 'outset' => __( 'Outset', 'logo-carousel-pro' ),
73
- ),
74
- )
75
- );
76
- echo sp_wpcp_add_element(
77
- array(
78
- 'pseudo' => true,
79
- 'type' => 'color_picker',
80
- 'name' => $this->element_name( '[color]' ),
81
- 'value' => $value['color'],
82
- 'default' => ( isset( $this->field['default']['color'] ) ) ? $this->field['default']['color'] : '',
83
- 'wrap_class' => 'small-input sp-border-color',
84
- 'before' => 'Color<br>',
85
- 'attributes' => array(
86
- 'title' => __( 'Border Color', 'logo-carousel-pro' ),
87
- ),
88
- )
89
- );
90
- if ( isset( $this->field['hover_color'] ) && $this->field['hover_color'] == true ) {
91
- echo sp_wpcp_add_element(
92
- array(
93
- 'pseudo' => true,
94
- 'type' => 'color_picker',
95
- 'name' => $this->element_name( '[hover_color]' ),
96
- 'value' => $value['hover_color'],
97
- 'default' => ( isset( $this->field['default']['hover_color'] ) ) ? $this->field['default']['hover_color'] : '',
98
- 'wrap_class' => 'small-input sp-border-hover-color',
99
- 'before' => 'Hover Color<br>',
100
- 'attributes' => array(
101
- 'title' => __( 'Border Hover Color', 'logo-carousel-pro' ),
102
- ),
103
- )
104
- );
105
- }
106
-
107
- // end container.
108
- echo '</div>';
109
-
110
- echo $this->element_after();
111
-
112
- }
113
-
114
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/fields/button_set/button_set.php DELETED
@@ -1,47 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access pages directly.
3
- /**
4
- *
5
- * Field: Button set
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
- class SP_WPCP_Framework_Option_button_set extends SP_WPCP_Framework_Options {
11
-
12
- /**
13
- * Button set constructor.
14
- *
15
- * @param array $field The field array.
16
- * @param string $value The value of the button set.
17
- * @param string $unique The id for the button set field.
18
- */
19
- public function __construct( $field, $value = '', $unique = '' ) {
20
- parent::__construct( $field, $value, $unique );
21
- }
22
-
23
- /**
24
- * Function for the button set field.
25
- *
26
- * @return void
27
- */
28
- public function output() {
29
-
30
- $input_type = ( ! empty( $this->field['radio'] ) ) ? 'radio' : 'checkbox';
31
- $input_attr = ( ! empty( $this->field['multi_select'] ) ) ? '[]' : '';
32
-
33
- echo $this->element_before();
34
- echo ( empty( $input_attr ) ) ? '<div class="sp-field-button-set">' : '';
35
-
36
- if ( isset( $this->field['options'] ) ) {
37
- $options = $this->field['options'];
38
- foreach ( $options as $key => $value ) {
39
- echo '<label><input type="' . $input_type . '" name="' . $this->element_name( $input_attr ) . '" value="' . $key . '"' . $this->element_class() . $this->element_attributes( $key ) . $this->checked( $this->element_value(), $key ) . '/><span class="sp-button-set">' . $value . '</span></label>';
40
- }
41
- }
42
-
43
- echo ( empty( $input_attr ) ) ? '</div>' : '';
44
- echo $this->element_after();
45
-
46
- }
47
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/fields/carousel_type/carousel_type.php DELETED
@@ -1,48 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access pages directly.
3
- /**
4
- *
5
- * Field: carousel_type
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
- class SP_WPCP_Framework_Option_carousel_type extends SP_WPCP_Framework_Options {
11
-
12
- /**
13
- * Carousel type constructor.
14
- *
15
- * @param array $field The field array.
16
- * @param string $value The value of the carousel type.
17
- * @param string $unique The id for the carousel type field.
18
- */
19
- public function __construct( $field, $value = '', $unique = '' ) {
20
- parent::__construct( $field, $value, $unique );
21
- }
22
-
23
- /**
24
- * Function for the button set field.
25
- *
26
- * @return void
27
- */
28
- public function output() {
29
- $input_type = ( ! empty( $this->field['radio'] ) ) ? 'radio' : 'checkbox';
30
- $input_attr = ( ! empty( $this->field['multi_select'] ) ) ? '[]' : '';
31
-
32
- echo $this->element_before();
33
- echo ( empty( $input_attr ) ) ? '<div class="sp-field-carousel-type">' : '';
34
-
35
- if ( isset( $this->field['options'] ) ) {
36
- $options = $this->field['options'];
37
- foreach ( $options as $key => $value ) {
38
- $pro_only = true == $value['pro_only'] ? 'disabled' : '';
39
- $pro_only_text = true == $value['pro_only'] ? '<strong class="ct-pro-only">PRO</strong>' : '';
40
- echo '<label><input ' . $pro_only . ' type="' . $input_type . '" name="' . $this->element_name( $input_attr ) . '" value="' . $key . '"' . $this->element_class() . $this->element_attributes( $key ) . $this->checked( $this->element_value(), $key ) . '/><span>' . $pro_only_text . '<i class="' . $value['icon'] . '"></i><p class="sp-carousel-type">' . $value['text'] . '</p></span></label>';
41
- }
42
- }
43
-
44
- echo ( empty( $input_attr ) ) ? '</div>' : '';
45
- echo $this->element_after();
46
-
47
- }
48
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/fields/checkbox/checkbox.php DELETED
@@ -1,42 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access pages directly.
3
- /**
4
- *
5
- * Field: Checkbox
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
- class SP_WPCP_Framework_Option_checkbox extends SP_WPCP_Framework_Options {
11
-
12
- public function __construct( $field, $value = '', $unique = '' ) {
13
- parent::__construct( $field, $value, $unique );
14
- }
15
-
16
- public function output() {
17
-
18
- echo $this->element_before();
19
-
20
- if ( isset( $this->field['options'] ) ) {
21
-
22
- $options = $this->field['options'];
23
- $options = ( is_array( $options ) ) ? $options : array_filter( $this->element_data( $options ) );
24
-
25
- if ( ! empty( $options ) ) {
26
-
27
- echo '<ul' . $this->element_class() . '>';
28
- foreach ( $options as $key => $value ) {
29
- echo '<li><label><input type="checkbox" name="' . $this->element_name( '[]' ) . '" value="' . $key . '"' . $this->element_attributes( $key ) . $this->checked( $this->element_value(), $key ) . '/> ' . $value . '</label></li>';
30
- }
31
- echo '</ul>';
32
- }
33
- } else {
34
- $label = ( isset( $this->field['label'] ) ) ? $this->field['label'] : '';
35
- echo '<label><input type="checkbox" name="' . $this->element_name() . '" value="1"' . $this->element_class() . $this->element_attributes() . checked( $this->element_value(), 1, false ) . '/> ' . $label . '</label>';
36
- }
37
-
38
- echo $this->element_after();
39
-
40
- }
41
-
42
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/fields/color_picker/color_picker.php DELETED
@@ -1,44 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access pages directly.
3
- /**
4
- *
5
- * Field: Color Picker
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
- class SP_WPCP_Framework_Option_color_picker extends SP_WPCP_Framework_Options {
11
-
12
- public function __construct( $field, $value = '', $unique = '' ) {
13
- parent::__construct( $field, $value, $unique );
14
- }
15
-
16
- public function output() {
17
-
18
- echo $this->element_before();
19
- echo '<input' . $this->element_pro_only() . ' type="text" name="' . $this->element_name() . '" value="' . $this->element_value() . '"' . $this->element_class( 'sp-field-color-picker' ) . $this->element_attributes( $this->extra_attributes() ) . '/>';
20
- echo $this->element_after();
21
-
22
- }
23
-
24
- public function extra_attributes() {
25
-
26
- $atts = array();
27
-
28
- if ( isset( $this->field['id'] ) ) {
29
- $atts['data-depend-id'] = $this->field['id'];
30
- }
31
-
32
- if ( isset( $this->field['rgba'] ) && $this->field['rgba'] === false ) {
33
- $atts['data-rgba'] = 'false';
34
- }
35
-
36
- if ( isset( $this->field['default'] ) ) {
37
- $atts['data-default-color'] = $this->field['default'];
38
- }
39
-
40
- return $atts;
41
-
42
- }
43
-
44
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/fields/color_set/color_set.php DELETED
@@ -1,136 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die;
3
- } // Cannot access pages directly.
4
-
5
- /**
6
- *
7
- * Field: Color Set
8
- *
9
- * @since 1.0.0
10
- * @version 1.0.0
11
- */
12
- class SP_WPCP_Framework_Option_color_set extends SP_WPCP_Framework_Options {
13
- /**
14
- * The field constructor.
15
- */
16
- public function __construct( $field, $value = '', $unique = '' ) {
17
- parent::__construct( $field, $value, $unique );
18
- }
19
-
20
- /**
21
- * Output
22
- *
23
- * @return void
24
- */
25
- public function output() {
26
-
27
- echo $this->element_before();
28
-
29
- $defaults_value = array(
30
- 'color1' => '',
31
- 'color2' => '',
32
- 'color3' => '',
33
- 'color4' => '',
34
- 'color5' => '',
35
- 'color6' => '',
36
- 'title1' => '',
37
- 'title2' => '',
38
- 'title3' => '',
39
- 'title4' => '',
40
- 'title5' => '',
41
- 'title6' => '',
42
- );
43
-
44
- $value = wp_parse_args( $this->element_value(), $defaults_value );
45
- $title = wp_parse_args( $this->field['default'], $defaults_value );
46
-
47
- // Container.
48
- echo '<div class="sp_wpcp_color_set_field" data-id="' . $this->field['id'] . '">';
49
-
50
- if ( isset( $this->field['color1'] ) && $this->field['color1'] == true ) {
51
- echo sp_wpcp_add_element(
52
- array(
53
- 'pseudo' => true,
54
- 'type' => 'color_picker',
55
- 'name' => $this->element_name( '[color1]' ),
56
- 'value' => $value['color1'],
57
- 'default' => ( isset( $this->field['default']['color1'] ) ) ? $this->field['default']['color1'] : '',
58
- 'wrap_class' => 'sp-color-set',
59
- 'before' => $title['title1'] . '<br>',
60
- )
61
- );
62
- }
63
- if ( isset( $this->field['color2'] ) && $this->field['color2'] == true ) {
64
- echo sp_wpcp_add_element(
65
- array(
66
- 'pseudo' => true,
67
- 'type' => 'color_picker',
68
- 'name' => $this->element_name( '[color2]' ),
69
- 'value' => $value['color2'],
70
- 'default' => ( isset( $this->field['default']['color2'] ) ) ? $this->field['default']['color2'] : '',
71
- 'wrap_class' => 'sp-color-set',
72
- 'before' => $title['title2'] . '<br>',
73
- )
74
- );
75
- }
76
- if ( isset( $this->field['color3'] ) && $this->field['color3'] == true ) {
77
- echo sp_wpcp_add_element(
78
- array(
79
- 'pseudo' => true,
80
- 'type' => 'color_picker',
81
- 'name' => $this->element_name( '[color3]' ),
82
- 'value' => $value['color3'],
83
- 'default' => ( isset( $this->field['default']['color3'] ) ) ? $this->field['default']['color3'] : '',
84
- 'wrap_class' => 'sp-color-set',
85
- 'before' => $title['title3'] . '<br>',
86
- )
87
- );
88
- }
89
- if ( isset( $this->field['color4'] ) && $this->field['color4'] == true ) {
90
- echo sp_wpcp_add_element(
91
- array(
92
- 'pseudo' => true,
93
- 'type' => 'color_picker',
94
- 'name' => $this->element_name( '[color4]' ),
95
- 'value' => $value['color4'],
96
- 'default' => ( isset( $this->field['default']['color4'] ) ) ? $this->field['default']['color4'] : '',
97
- 'wrap_class' => 'sp-color-set',
98
- 'before' => $title['title4'] . '<br>',
99
- )
100
- );
101
- }
102
- if ( isset( $this->field['color5'] ) && $this->field['color5'] == true ) {
103
- echo sp_wpcp_add_element(
104
- array(
105
- 'pseudo' => true,
106
- 'type' => 'color_picker',
107
- 'name' => $this->element_name( '[color5]' ),
108
- 'value' => $value['color5'],
109
- 'default' => ( isset( $this->field['default']['color5'] ) ) ? $this->field['default']['color5'] : '',
110
- 'wrap_class' => 'sp-color-set',
111
- 'before' => $title['title5'] . '<br>',
112
- )
113
- );
114
- }
115
- if ( isset( $this->field['color6'] ) && $this->field['color6'] == true ) {
116
- echo sp_wpcp_add_element(
117
- array(
118
- 'pseudo' => true,
119
- 'type' => 'color_picker',
120
- 'name' => $this->element_name( '[color6]' ),
121
- 'value' => $value['color6'],
122
- 'default' => ( isset( $this->field['default']['color6'] ) ) ? $this->field['default']['color6'] : '',
123
- 'wrap_class' => 'sp-color-set',
124
- 'before' => $title['title6'] . '<br>',
125
- )
126
- );
127
- }
128
-
129
- // end container.
130
- echo '</div>';
131
-
132
- echo $this->element_after();
133
-
134
- }
135
-
136
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/fields/column/column.php DELETED
@@ -1,161 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die;
3
- } // Cannot access pages directly.
4
- /**
5
- *
6
- * Field: Column
7
- *
8
- * @since 1.0.0
9
- * @version 1.0.0
10
- */
11
- class SP_WPCP_Framework_Option_Column extends SP_WPCP_Framework_Options {
12
-
13
- /**
14
- * The column field constructor.
15
- *
16
- * @param string $field The filed type.
17
- * @param string $value The field value.
18
- * @param string $unique The unique ID of the field.
19
- */
20
- public function __construct( $field, $value = '', $unique = '' ) {
21
- parent::__construct( $field, $value, $unique );
22
- }
23
-
24
- /**
25
- * The column field output.
26
- *
27
- * @return void
28
- */
29
- public function output() {
30
-
31
- echo $this->element_before();
32
-
33
- $defaults_value = array(
34
- 'column1' => '',
35
- 'column2' => '',
36
- 'column3' => '',
37
- 'column4' => '',
38
- 'column5' => '',
39
- 'title1' => '',
40
- 'title2' => '',
41
- 'title3' => '',
42
- 'title4' => '',
43
- 'title5' => '',
44
- 'help1' => '',
45
- 'help2' => '',
46
- 'help3' => '',
47
- 'help4' => '',
48
- 'help5' => '',
49
- 'min1' => '',
50
- 'max1' => '',
51
- 'min2' => '',
52
- 'max2' => '',
53
- 'min3' => '',
54
- 'max3' => '',
55
- 'min4' => '',
56
- 'max4' => '',
57
- 'min5' => '',
58
- 'max5' => '',
59
- );
60
-
61
- $value = wp_parse_args( $this->element_value(), $defaults_value );
62
- $title = wp_parse_args( $this->field['default'], $defaults_value );
63
- $help = wp_parse_args( $this->field['default'], $defaults_value );
64
- $minmax = wp_parse_args( $this->field['default'], $defaults_value );
65
-
66
- if ( isset( $this->field['column1'] ) && true == $this->field['column1'] ) {
67
- echo sp_wpcp_add_element(
68
- array(
69
- 'pseudo' => true,
70
- 'type' => 'number',
71
- 'name' => $this->element_name( '[column1]' ),
72
- 'value' => $value['column1'],
73
- 'default' => ( isset( $this->field['default']['column1'] ) ) ? $this->field['default']['column1'] : '',
74
- 'wrap_class' => 'small-input sp-column-field',
75
- 'before' => '<span>' . $title['title1'] . '</span><br>',
76
- 'help' => $help['help1'],
77
- 'attributes' => array(
78
- 'min' => $minmax['min1'],
79
- 'max' => $minmax['max1'],
80
- ),
81
- )
82
- );
83
- }
84
- if ( isset( $this->field['column2'] ) && true == $this->field['column2'] ) {
85
- echo sp_wpcp_add_element(
86
- array(
87
- 'pseudo' => true,
88
- 'type' => 'number',
89
- 'name' => $this->element_name( '[column2]' ),
90
- 'value' => $value['column2'],
91
- 'default' => ( isset( $this->field['default']['column2'] ) ) ? $this->field['default']['column2'] : '',
92
- 'wrap_class' => 'small-input sp-column-field',
93
- 'before' => '<span>' . $title['title2'] . '</span><br>',
94
- 'help' => $help['help2'],
95
- 'attributes' => array(
96
- 'min' => $minmax['min2'],
97
- 'max' => $minmax['max2'],
98
- ),
99
- )
100
- );
101
- }
102
- if ( isset( $this->field['column3'] ) && true == $this->field['column3'] ) {
103
- echo sp_wpcp_add_element(
104
- array(
105
- 'pseudo' => true,
106
- 'type' => 'number',
107
- 'name' => $this->element_name( '[column3]' ),
108
- 'value' => $value['column3'],
109
- 'default' => ( isset( $this->field['default']['column3'] ) ) ? $this->field['default']['column3'] : '',
110
- 'wrap_class' => 'small-input sp-column-field',
111
- 'before' => '<span>' . $title['title3'] . '</span><br>',
112
- 'help' => $help['help3'],
113
- 'attributes' => array(
114
- 'min' => $minmax['min3'],
115
- 'max' => $minmax['max3'],
116
- ),
117
- )
118
- );
119
- }
120
- if ( isset( $this->field['column4'] ) && true == $this->field['column4'] ) {
121
- echo sp_wpcp_add_element(
122
- array(
123
- 'pseudo' => true,
124
- 'type' => 'number',
125
- 'name' => $this->element_name( '[column4]' ),
126
- 'value' => $value['column4'],
127
- 'default' => ( isset( $this->field['default']['column4'] ) ) ? $this->field['default']['column4'] : '',
128
- 'wrap_class' => 'small-input sp-column-field',
129
- 'before' => '<span>' . $title['title4'] . '</span><br>',
130
- 'help' => $help['help4'],
131
- 'attributes' => array(
132
- 'min' => $minmax['min4'],
133
- 'max' => $minmax['max4'],
134
- ),
135
- )
136
- );
137
- }
138
- if ( isset( $this->field['column5'] ) && true == $this->field['column5'] ) {
139
- echo sp_wpcp_add_element(
140
- array(
141
- 'pseudo' => true,
142
- 'type' => 'number',
143
- 'name' => $this->element_name( '[column5]' ),
144
- 'value' => $value['column5'],
145
- 'default' => ( isset( $this->field['default']['column5'] ) ) ? $this->field['default']['column5'] : '',
146
- 'wrap_class' => 'small-input sp-column-field',
147
- 'before' => '<span>' . $title['title5'] . '</span><br>',
148
- 'help' => $help['help5'],
149
- 'attributes' => array(
150
- 'min' => $minmax['min5'],
151
- 'max' => $minmax['max5'],
152
- ),
153
- )
154
- );
155
- }
156
-
157
- echo $this->element_after();
158
-
159
- }
160
-
161
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/fields/gallery/gallery.php DELETED
@@ -1,58 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access pages directly.
3
- /**
4
- *
5
- * Field: Gallery
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
- class SP_WPCP_Framework_Option_Gallery extends SP_WPCP_Framework_Options {
11
-
12
- /**
13
- * The gallery field construcor.
14
- *
15
- * @param string $field The field type.
16
- * @param string $value The field value.
17
- * @param string $unique The unique field ID.
18
- */
19
- public function __construct( $field, $value = '', $unique = '' ) {
20
- parent::__construct( $field, $value, $unique );
21
- }
22
-
23
- /**
24
- * The gallery field output.
25
- *
26
- * @return void
27
- */
28
- public function output() {
29
-
30
- echo $this->element_before();
31
-
32
- $value = $this->element_value();
33
- $add = ( ! empty( $this->field['add_title'] ) ) ? $this->field['add_title'] : __( 'Add Gallery', 'wp-carousel-free' );
34
- $edit = ( ! empty( $this->field['edit_title'] ) ) ? $this->field['edit_title'] : __( 'Edit Gallery', 'wp-carousel-free' );
35
- $clear = ( ! empty( $this->field['clear_title'] ) ) ? $this->field['clear_title'] : __( 'Clear', 'wp-carousel-free' );
36
- $hidden = ( empty( $value ) ) ? ' hidden' : '';
37
- echo '<a href="#" class="button button-primary sp-add"><i class="fa fa-plus-circle"></i>' . $add . '</a>';
38
- echo '<ul class="sp-gallery-images">';
39
-
40
- if ( ! empty( $value ) ) {
41
-
42
- $values = explode( ',', $value );
43
-
44
- foreach ( $values as $id ) {
45
- $attachment = wp_get_attachment_image_src( $id, 'thumbnail' );
46
- echo '<li><img src="' . $attachment[0] . '" alt="" /></li>';
47
- }
48
- }
49
-
50
- echo '</ul>';
51
- echo '<ul><li><a href="#" class="button sp-edit' . $hidden . '"><i class="fa fa-pencil-square-o"></i>' . $edit . '</a></li></ul>';
52
- echo '<ul><li><a href="#" class="button sp-warning-primary sp-remove' . $hidden . '"><i class="fa fa-trash"></i>' . $clear . '</a></li></ul>';
53
- echo '<input type="text" name="' . $this->element_name() . '" value="' . $value . '"' . $this->element_class() . $this->element_attributes() . '/>';
54
-
55
- echo $this->element_after();
56
-
57
- }
58
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/fields/image_sizes/image_sizes.php DELETED
@@ -1,81 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access pages directly.
3
- /**
4
- * Image Sizes field.
5
- *
6
- * @package SP MetaBox Framework.
7
- */
8
- class SP_WPCP_Framework_Option_image_sizes extends SP_WPCP_Framework_Options {
9
- /**
10
- * Field: Image Sizes
11
- *
12
- * @param options $field The field options.
13
- * @param string $value The field value.
14
- * @param string $unique The Unique ID of the field.
15
- */
16
- public function __construct( $field, $value = '', $unique = '' ) {
17
- parent::__construct( $field, $value, $unique );
18
- }
19
-
20
- /**
21
- * The image sizes output.
22
- *
23
- * @return void
24
- */
25
- public function output() {
26
-
27
- echo $this->element_before();
28
-
29
- global $_wp_additional_image_sizes;
30
-
31
- $sizes = array();
32
-
33
- foreach ( get_intermediate_image_sizes() as $_size ) {
34
- if ( in_array( $_size, array( 'thumbnail', 'medium', 'medium_large', 'large' ) ) ) {
35
-
36
- $width = get_option( "{$_size}_size_w" );
37
- $height = get_option( "{$_size}_size_h" );
38
- $crop = (bool) get_option( "{$_size}_crop" ) ? 'hard' : 'soft';
39
-
40
- $sizes[ $_size ] = "{$_size} - $crop:{$width}x{$height}";
41
-
42
- } elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {
43
-
44
- $width = $_wp_additional_image_sizes[ $_size ]['width'];
45
- $height = $_wp_additional_image_sizes[ $_size ]['height'];
46
- $crop = $_wp_additional_image_sizes[ $_size ]['crop'] ? 'hard' : 'soft';
47
-
48
- $sizes[ $_size ] = "{$_size} - $crop:{$width}x{$height}";
49
- }
50
- }
51
-
52
- $sizes = array_merge(
53
- $sizes, array(
54
- 'full' => __( 'original uploaded image', 'wp-carousel-free' ),
55
- )
56
- );
57
- $extra_name = ( isset( $this->field['attributes']['multiple'] ) ) ? '[]' : '';
58
- $placeholder = ( isset( $this->field['attributes']['placeholder'] ) ) ? $this->field['attributes']['placeholder'] : '';
59
- $placeholder_data = ( isset( $this->field['attributes']['placeholder'] ) ) ? 'data-placeholder="' . $placeholder . '"' : '';
60
- $chosen_rtl = ( is_rtl() && strpos( $class, 'chosen' ) ) ? 'chosen-rtl' : '';
61
-
62
- echo '<select ' . $placeholder_data . ' id="sp_' . $this->field['id'] . '" name="' . $this->element_name( $extra_name ) . '"' .
63
- $this->element_class( $chosen_rtl )
64
- . $this->element_attributes() . '>';
65
-
66
- echo ( isset( $this->field['default_option'] ) ) ? '<option value="">' . $this->field['default_option'] . '</option>' : '';
67
-
68
- if ( ! empty( $sizes ) ) {
69
-
70
- foreach ( $sizes as $key => $value ) {
71
- echo '<option value="' . $key . '" ' . $this->checked( $this->element_value(), $key, 'selected' ) . '>' . $value . '</option>';
72
- }
73
- }
74
-
75
- echo '</select>';
76
-
77
- echo $this->element_after();
78
-
79
- }
80
-
81
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/fields/notice/notice.php DELETED
@@ -1,24 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access pages directly.
3
- /**
4
- *
5
- * Field: Notice
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
- class SP_WPCP_Framework_Option_notice extends SP_WPCP_Framework_Options {
11
-
12
- public function __construct( $field, $value = '', $unique = '' ) {
13
- parent::__construct( $field, $value, $unique );
14
- }
15
-
16
- public function output() {
17
-
18
- echo $this->element_before();
19
- echo '<div class="sp-notice sp-' . $this->field['class'] . '">' . $this->field['content'] . '</div>';
20
- echo $this->element_after();
21
-
22
- }
23
-
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/fields/number/number.php DELETED
@@ -1,37 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access pages directly.
3
- /**
4
- *
5
- * Field: Number
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
- class SP_WPCP_Framework_Option_number extends SP_WPCP_Framework_Options {
11
-
12
- /**
13
- * Number field constructor.
14
- *
15
- * @param string $field The field type.
16
- * @param string $value The value of the field.
17
- * @param string $unique The unique ID of the field.
18
- */
19
- public function __construct( $field, $value = '', $unique = '' ) {
20
- parent::__construct( $field, $value, $unique );
21
- }
22
-
23
- /**
24
- * Number field output.
25
- *
26
- * @return void
27
- */
28
- public function output() {
29
-
30
- echo $this->element_before();
31
- $unit = ( isset( $this->field['unit'] ) ) ? '<em>' . $this->field['unit'] . '</em>' : '';
32
- echo '<input' . $this->element_pro_only() . ' type="number" name="' . $this->element_name() . '" value="' . $this->element_value() . '"' . $this->element_class() . $this->element_attributes() . '/>' . $unit;
33
- echo $this->element_after();
34
-
35
- }
36
-
37
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/fields/pronotice/pronotice.php DELETED
@@ -1,24 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
2
- /**
3
- *
4
- * Field: Pro Notice
5
- *
6
- * @since 1.0.0
7
- * @version 1.0.0
8
- *
9
- */
10
- class SP_WPCP_Framework_Option_pronotice extends SP_WPCP_Framework_Options {
11
-
12
- public function __construct( $field, $value = '', $unique = '' ) {
13
- parent::__construct( $field, $value, $unique );
14
- }
15
-
16
- public function output() {
17
-
18
- echo $this->element_before();
19
- echo $this->field['content'];
20
- echo $this->element_after();
21
-
22
- }
23
-
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/fields/select/select.php DELETED
@@ -1,59 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access pages directly.
3
- /**
4
- *
5
- * Field: Select
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
- class SP_WPCP_Framework_Option_select extends SP_WPCP_Framework_Options {
11
-
12
- /**
13
- * Select field constructor.
14
- *
15
- * @param string $field Field type.
16
- * @param string $value The field value.
17
- * @param string $unique The field ID.
18
- */
19
- public function __construct( $field, $value = '', $unique = '' ) {
20
- parent::__construct( $field, $value, $unique );
21
- }
22
-
23
- /**
24
- * Select field output.
25
- *
26
- * @return void
27
- */
28
- public function output() {
29
-
30
- echo $this->element_before();
31
-
32
- if ( isset( $this->field['options'] ) ) {
33
- $options = $this->field['options'];
34
- $class = $this->element_class();
35
- $options = ( is_array( $options ) ) ? $options : array_filter( $this->element_data( $options ) );
36
- $extra_name = ( isset( $this->field['attributes']['multiple'] ) ) ? '[]' : '';
37
- $placeholder = ( isset( $this->field['attributes']['placeholder'] ) ) ? $this->field['attributes']['placeholder'] : '';
38
- $placeholder_data = ( isset( $this->field['attributes']['placeholder'] ) ) ? 'data-placeholder="' . $placeholder . '"' : '';
39
- $chosen_rtl = ( is_rtl() && strpos( $class, 'chosen' ) ) ? 'chosen-rtl' : '';
40
- echo '<select ' . $placeholder_data . ' id="sp_' . $this->field['id'] . '" name="' . $this->element_name( $extra_name ) . '"' .
41
- $this->element_class( $chosen_rtl )
42
- . $this->element_attributes() . '>';
43
-
44
- echo ( isset( $this->field['default_option'] ) ) ? '<option value="">' . $this->field['default_option'] . '</option>' : '';
45
-
46
- if ( ! empty( $options ) ) {
47
- foreach ( $options as $key => $value ) {
48
- $pro_only = true == $value['pro_only'] ? ' disabled' : '';
49
- echo '<option' . $pro_only . ' value="' . $key . '" ' . $this->checked( $this->element_value(), $key, 'selected' ) . '>' . $value['text'] . '</option>';
50
- }
51
- }
52
- echo '</select>';
53
-
54
- }
55
- echo $this->element_after();
56
-
57
- }
58
-
59
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/fields/select_typo/select_typo.php DELETED
@@ -1,48 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access pages directly.
3
- /**
4
- *
5
- * Field: select_typo
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
- class SP_WPCP_Framework_Option_select_typo extends SP_WPCP_Framework_Options {
11
-
12
- public function __construct( $field, $value = '', $unique = '' ) {
13
- parent::__construct( $field, $value, $unique );
14
- }
15
-
16
- public function output() {
17
-
18
- echo $this->element_before();
19
-
20
- if ( isset( $this->field['options'] ) ) {
21
-
22
- $options = $this->field['options'];
23
- $class = $this->element_class();
24
- $options = ( is_array( $options ) ) ? $options : array_filter( $this->element_data( $options ) );
25
- $extra_name = ( isset( $this->field['attributes']['multiple'] ) ) ? '[]' : '';
26
- $placeholder = ( isset( $this->field['attributes']['placeholder'] ) ) ? $this->field['attributes']['placeholder'] : '';
27
- $placeholder_data = ( isset( $this->field['attributes']['placeholder'] ) ) ? 'data-placeholder="' . $placeholder . '"' : '';
28
- $chosen_rtl = ( is_rtl() && strpos( $class, 'chosen' ) ) ? 'chosen-rtl' : '';
29
-
30
- echo '<select' . $this->element_pro_only() . ' ' . $placeholder_data . ' name="' . $this->element_name( $extra_name ) . '"' . $this->element_class( $chosen_rtl ) . $this->element_attributes() . '>';
31
-
32
- echo ( isset( $this->field['default_option'] ) ) ? '<option value="">' . $this->field['default_option'] . '</option>' : '';
33
-
34
- if ( ! empty( $options ) ) {
35
- foreach ( $options as $key => $value ) {
36
- echo '<option value="' . $key . '" ' . $this->checked( $this->element_value(), $key, 'selected' ) . '>' . $value . '</option>';
37
- }
38
- }
39
-
40
- echo '</select>';
41
-
42
- }
43
-
44
- echo $this->element_after();
45
-
46
- }
47
-
48
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/fields/subheading/subheading.php DELETED
@@ -1,24 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access pages directly.
3
- /**
4
- *
5
- * Field: Sub Heading
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
- class SP_WPCP_Framework_Option_subheading extends SP_WPCP_Framework_Options {
11
-
12
- public function __construct( $field, $value = '', $unique = '' ) {
13
- parent::__construct( $field, $value, $unique );
14
- }
15
-
16
- public function output() {
17
-
18
- echo $this->element_before();
19
- echo $this->field['content'];
20
- echo $this->element_after();
21
-
22
- }
23
-
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/fields/switcher/switcher.php DELETED
@@ -1,25 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access pages directly.
3
- /**
4
- *
5
- * Field: Switcher
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
- class SP_WPCP_Framework_Option_switcher extends SP_WPCP_Framework_Options {
11
-
12
- public function __construct( $field, $value = '', $unique = '' ) {
13
- parent::__construct( $field, $value, $unique );
14
- }
15
-
16
- public function output() {
17
-
18
- echo $this->element_before();
19
- $label = ( isset( $this->field['label'] ) ) ? '<div class="sp-text-desc">' . $this->field['label'] . '</div>' : '';
20
- echo '<label><input type="checkbox" name="' . $this->element_name() . '" value="1"' . $this->element_class() . $this->element_attributes() . checked( $this->element_value(), 1, false ) . '/><em data-on="' . __( 'on', 'wp-carousel-free' ) . '" data-off="' . __( 'off', 'wp-carousel-free' ) . '"></em><span></span></label>' . $label;
21
- echo $this->element_after();
22
-
23
- }
24
-
25
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/fields/textarea/textarea.php DELETED
@@ -1,23 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access pages directly.
3
- /**
4
- *
5
- * Field: Textarea
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
- class SP_WPCP_Framework_Option_textarea extends SP_WPCP_Framework_Options {
11
-
12
- public function __construct( $field, $value = '', $unique = '' ) {
13
- parent::__construct( $field, $value, $unique );
14
- }
15
-
16
- public function output() {
17
-
18
- echo $this->element_before();
19
- echo '<textarea name="' . $this->element_name() . '"' . $this->element_class() . $this->element_attributes() . '>' . $this->element_value() . '</textarea>';
20
- echo $this->element_after();
21
-
22
- }
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/fields/typography_advanced/google-fonts.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "kind": "webfonts#webfontList",
3
- "items": [
4
-
5
- ]
6
- }
 
 
 
 
 
 
admin/views/meta-box/fields/typography_advanced/typography_advanced.php DELETED
@@ -1,197 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die;
3
- } // Cannot access pages directly.
4
-
5
- /**
6
- *
7
- * Field: Typography Advanced
8
- *
9
- * @since 1.0.0
10
- * @version 1.0.0
11
- */
12
- class SP_WPCP_Framework_Option_typography_advanced extends SP_WPCP_Framework_Options {
13
-
14
- public function __construct( $field, $value = '', $unique = '' ) {
15
- parent::__construct( $field, $value, $unique );
16
- }
17
-
18
- public function output() {
19
-
20
- echo $this->element_before();
21
-
22
- $defaults_value = array();
23
-
24
- $default_variants = apply_filters(
25
- 'sp_websafe_fonts_variants', array(
26
- 'regular',
27
- )
28
- );
29
-
30
- $websafe_fonts = apply_filters(
31
- 'sp_websafe_fonts', array(
32
- 'Open Sans',
33
- )
34
- );
35
-
36
- $value = wp_parse_args( $this->element_value(), $defaults_value );
37
- $family_value = $value['family'];
38
- $variant_value = $value['variant'];
39
- $is_variant = ( isset( $this->field['variant'] ) && $this->field['variant'] === false ) ? false : true;
40
- $google_json = sp_wpcp_get_google_fonts();
41
-
42
- // Container.
43
- echo '<div class="sp_wpcp_font_field" data-id="' . $this->field['id'] . '">';
44
-
45
- if ( is_object( $google_json ) ) {
46
-
47
- $googlefonts = array();
48
-
49
- foreach ( $google_json->items as $key => $font ) {
50
- $googlefonts[ $font->family ] = $font->variants;
51
- }
52
-
53
- $is_google = ( array_key_exists( $family_value, $googlefonts ) ) ? true : false;
54
-
55
- echo '<div class="sp-element sp-typography-family sp-wpcp-select-wrapper">Font Family<br>';
56
- echo '<select disabled name="' . $this->element_name( '[family]' ) . '" class="sp-wpcp-select-css sp-typo-family" data-atts="family"' . $this->element_attributes() . '>';
57
-
58
- do_action( 'sp_typography_family', $family_value, $this );
59
-
60
- echo '<optgroup label="' . __( 'Web Safe Fonts', 'wp-carousel-free' ) . '">';
61
- foreach ( $websafe_fonts as $websafe_value ) {
62
- echo '<option value="' . $websafe_value . '" data-variants="' . implode( '|', $default_variants ) . '" data-type="websafe"' . selected( $websafe_value, $family_value, true ) . '>' . $websafe_value . '</option>';
63
- }
64
- echo '</optgroup>';
65
-
66
- echo '<optgroup label="' . __( 'Google Fonts', 'wp-carousel-free' ) . '">';
67
- foreach ( $googlefonts as $google_key => $google_value ) {
68
-
69
- echo '<option disabled value="' . $google_key . '" data-variants="' . implode( '|', $google_value ) . '" data-type="google" ' . selected( $google_key, $family_value, true ) . '>' . $google_key . '</option>';
70
- }
71
- echo '</optgroup>';
72
-
73
- echo '</select>';
74
- echo '</div>';
75
-
76
- if ( ! empty( $is_variant ) ) {
77
-
78
- $variants = ( $is_google ) ? $googlefonts[ $family_value ] : $default_variants;
79
- $variants = ( $value['font'] === 'google' || $value['font'] === 'websafe' ) ? $variants : 'regular';
80
- echo '<div class="sp-element sp-typography-variant sp-wpcp-select-wrapper">Font Weight<br>';
81
- echo '<select disabled name="' . $this->element_name( '[variant]' ) . '" class="sp-wpcp-select-css sp-typo-variant" data-atts="variant">';
82
- foreach ( $variants as $variant ) {
83
- echo '<option value="' . $variant . '" ' . $this->checked( $variant_value, $variant, 'selected' ) . '>' . $variant . '</option>';
84
- }
85
- echo '</select>';
86
- echo '</div>';
87
-
88
- }
89
-
90
- echo sp_wpcp_add_element(
91
- array(
92
- 'pseudo' => true,
93
- 'type' => 'number',
94
- 'value' => $value['height'],
95
- 'wrap_class' => 'small-input sp-font-size',
96
- 'before' => 'Font Size<br>',
97
- 'pro_only' => true,
98
- 'attributes' => array(
99
- 'title' => __( 'Font Size', 'wp-carousel-free' ),
100
- ),
101
- )
102
- );
103
-
104
- echo sp_wpcp_add_element(
105
- array(
106
- 'pseudo' => true,
107
- 'type' => 'number',
108
- 'value' => $value['height'],
109
- 'wrap_class' => 'small-input sp-font-height',
110
- 'before' => 'Line Height<br>',
111
- 'pro_only' => true,
112
- 'attributes' => array(
113
- 'title' => __( 'Line Height', 'wp-carousel-free' ),
114
- ),
115
- )
116
- );
117
- echo '<div class="sp-divider"></div>';
118
- echo sp_wpcp_add_element(
119
- array(
120
- 'pseudo' => true,
121
- 'type' => 'select_typo',
122
- 'wrap_class' => 'small-input sp-font-alignment sp-wpcp-select-wrapper',
123
- 'class' => 'sp-wpcp-select-css',
124
- 'before' => 'Alignment<br>',
125
- 'pro_only' => true,
126
- 'options' => array(
127
- 'inherit' => __( 'Inherit', 'wp-carousel-free' ),
128
- ),
129
-
130
- )
131
- );
132
- echo sp_wpcp_add_element(
133
- array(
134
- 'pseudo' => true,
135
- 'type' => 'select_typo',
136
- 'wrap_class' => 'small-input sp-font-transform sp-wpcp-select-wrapper',
137
- 'class' => 'sp-wpcp-select-css',
138
- 'before' => 'Transform<br>',
139
- 'pro_only' => true,
140
- 'options' => array(
141
- 'none' => __( 'None', 'wp-carousel-free' ),
142
- ),
143
- )
144
- );
145
- echo sp_wpcp_add_element(
146
- array(
147
- 'pseudo' => true,
148
- 'type' => 'select_typo',
149
- 'wrap_class' => 'small-input sp-font-spacing sp-wpcp-select-wrapper',
150
- 'class' => 'sp-wpcp-select-css',
151
- 'before' => 'Letter Spacing<br>',
152
- 'pro_only' => true,
153
- 'options' => array(
154
- 'normal' => __( 'Normal', 'wp-carousel-free' ),
155
- ),
156
- )
157
- );
158
- echo '<div class="sp-divider"></div>';
159
- if ( isset( $this->field['color'] ) && $this->field['color'] == true ) {
160
- echo '<div class="sp-element sp-typography-color">' . __( 'Color', 'wp-carousel-free' ) . '<br>';
161
- echo sp_wpcp_add_element(
162
- array(
163
- 'pseudo' => true,
164
- 'id' => $this->field['id'] . '_color',
165
- 'type' => 'color_picker',
166
- 'pro_only' => true,
167
- 'rgba' => ( isset( $this->field['rgba'] ) && $this->field['rgba'] === false ) ? false : '',
168
- )
169
- );
170
- echo '</div>';
171
- }
172
-
173
- /**
174
- * Font Preview
175
- */
176
- if ( isset( $this->field['preview'] ) && $this->field['preview'] == true ) {
177
- if ( isset( $this->field['preview_text'] ) ) {
178
- $preview_text = $this->field['preview_text'];
179
- } else {
180
- $preview_text = 'Lorem ipsum dolor sit amet, pro ad sanctus admodum, vim at insolens appellantur. Eum veri adipiscing an, probo nonumy an vis.';
181
- }
182
- echo '<div id="preview-' . $this->field['id'] . '" class="sp-font-preview">' . $preview_text . '</div>';
183
- }
184
- } else {
185
-
186
- echo __( 'Error! Can not load json file.', 'wp-carousel-free' );
187
-
188
- }
189
-
190
- // end container.
191
- echo '</div>';
192
-
193
- echo $this->element_after();
194
-
195
- }
196
-
197
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/functions/actions.php DELETED
@@ -1,6 +0,0 @@
1
- <?php
2
- /**
3
- * The actions of the sp framework.
4
- *
5
- * @package SP Framework.
6
- */
 
 
 
 
 
 
admin/views/meta-box/functions/enqueue.php DELETED
@@ -1,49 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die;
3
- } // Cannot access pages directly.
4
-
5
-
6
- if ( ! function_exists( 'sp_wpcp_admin_enqueue_scripts' ) ) {
7
- /**
8
- *
9
- * Framework admin enqueue style and scripts
10
- *
11
- * @since 1.0.0
12
- * @version 1.0.0
13
- * @return void
14
- */
15
- function sp_wpcp_admin_enqueue_scripts() {
16
- $current_screen = get_current_screen();
17
- $the_current_post_type = $current_screen->post_type;
18
- if ( 'sp_wp_carousel' === $the_current_post_type ) {
19
-
20
- // Admin utilities.
21
- wp_enqueue_media();
22
-
23
- // wp core styles.
24
- wp_enqueue_style( 'wp-color-picker' );
25
- wp_enqueue_style( 'wp-jquery-ui-dialog' );
26
-
27
- // Framework core styles.
28
- wp_enqueue_style( 'sp-wpcp-framework', WPCAROUSELF_URL . 'admin/views/meta-box/assets/css/sp-framework.css', array(), WPCAROUSELF_VERSION, 'all' );
29
- wp_enqueue_style( 'sp-wpcp-custom', WPCAROUSELF_URL . 'admin/views/meta-box/assets/css/sp-custom.css', array(), WPCAROUSELF_VERSION, 'all' );
30
- wp_enqueue_style( 'wpcp-mb-style', WPCAROUSELF_URL . 'admin/views/meta-box/assets/css/sp-style.css', array(), WPCAROUSELF_VERSION, 'all' );
31
- wp_enqueue_style( 'wpcp-font-awesome', WPCAROUSELF_URL . 'public/css/font-awesome.min.css', array(), WPCAROUSELF_VERSION, 'all' );
32
-
33
- if ( is_rtl() ) {
34
- wp_enqueue_style( 'sp-framework-rtl', WPCAROUSELF_URL . 'admin/views/meta-box/assets/css/sp-framework-rtl.css', array(), WPCAROUSELF_VERSION, 'all' );
35
- }
36
-
37
- // wp core scripts.
38
- wp_enqueue_script( 'wp-color-picker' );
39
-
40
- // framework core scripts.
41
- wp_enqueue_script( 'sp-wpcp-dependency', WPCAROUSELF_URL . 'admin/views/meta-box/assets/js/dependency.js', array( 'jquery' ), WPCAROUSELF_VERSION, true );
42
- wp_enqueue_script( 'sp-wpcp-plugins', WPCAROUSELF_URL . 'admin/views/meta-box/assets/js/sp-plugins.js', array(), WPCAROUSELF_VERSION, true );
43
- wp_enqueue_script( 'sp-wpcp-framework', WPCAROUSELF_URL . 'admin/views/meta-box/assets/js/sp-framework.js', array( 'sp-wpcp-plugins' ), WPCAROUSELF_VERSION, true );
44
- }
45
-
46
- }
47
-
48
- add_action( 'admin_enqueue_scripts', 'sp_wpcp_admin_enqueue_scripts' );
49
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/functions/fallback.php DELETED
@@ -1,83 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access pages directly.
3
- /**
4
- *
5
- * A fallback for get term meta
6
- * get_term_meta added since WP 4.4
7
- *
8
- * @since 1.0.2
9
- * @version 1.0.0
10
- */
11
- if ( ! function_exists( 'get_term_meta' ) ) {
12
- function get_term_meta( $term_id, $key = '', $single = false ) {
13
-
14
- $terms = get_option( 'sp_term_' . $key );
15
-
16
- return ( ! empty( $terms[ $term_id ] ) ) ? $terms[ $term_id ] : false;
17
-
18
- }
19
- }
20
-
21
- /**
22
- *
23
- * A fallback for add term meta
24
- * add_term_meta added since WP 4.4
25
- *
26
- * @since 1.0.2
27
- * @version 1.0.0
28
- */
29
- if ( ! function_exists( 'add_term_meta' ) ) {
30
- function add_term_meta( $term_id, $meta_key = '', $meta_value, $unique = false ) {
31
-
32
- return update_term_meta( $term_id, $meta_key, $meta_value, $unique );
33
-
34
- }
35
- }
36
-
37
- /**
38
- *
39
- * A fallback for update term meta
40
- * update_term_meta added since WP 4.4
41
- *
42
- * @since 1.0.2
43
- * @version 1.0.0
44
- */
45
- if ( ! function_exists( 'update_term_meta' ) ) {
46
- function update_term_meta( $term_id, $meta_key, $meta_value, $prev_value = '' ) {
47
-
48
- if ( ! empty( $term_id ) || ! empty( $meta_key ) || ! empty( $meta_value ) ) {
49
-
50
- $terms = get_option( 'sp_term_' . $meta_key );
51
-
52
- $terms[ $term_id ] = $meta_value;
53
-
54
- update_option( 'sp_term_' . $meta_key, $terms );
55
-
56
- }
57
-
58
- }
59
- }
60
-
61
- /**
62
- *
63
- * A fallback for delete term meta
64
- * delete_term_meta added since WP 4.4
65
- *
66
- * @since 1.0.2
67
- * @version 1.0.0
68
- */
69
- if ( ! function_exists( 'delete_term_meta' ) ) {
70
- function delete_term_meta( $term_id, $meta_key, $meta_value = '', $delete_all = false ) {
71
-
72
- if ( ! empty( $term_id ) || ! empty( $meta_key ) ) {
73
-
74
- $terms = get_option( 'sp_term_' . $meta_key );
75
-
76
- unset( $terms[ $term_id ] );
77
-
78
- update_option( 'sp_term_' . $meta_key, $terms );
79
-
80
- }
81
-
82
- }
83
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/functions/helpers.php DELETED
@@ -1,259 +0,0 @@
1
- <?php
2
- /**
3
- *
4
- * Helper functions of the framework.get_the_generator
5
- *
6
- * @since 1.0.0
7
- * @version 1.0.0
8
- * @package SP Framework
9
- */
10
-
11
- if ( ! defined( 'ABSPATH' ) ) {
12
- die;
13
- } // Cannot access pages directly.
14
-
15
- if ( ! function_exists( 'sp_wpcp_add_element' ) ) {
16
- /**
17
- * Add framework element
18
- *
19
- * @param array $field fields array.
20
- * @param string $value Field value.
21
- * @param string $unique The unique for the ID.
22
- * @return mix
23
- */
24
- function sp_wpcp_add_element( $field = array(), $value = '', $unique = '' ) {
25
-
26
- $output = '';
27
- $depend = '';
28
- $sub = ( isset( $field['sub'] ) ) ? 'sub-': '';
29
- $unique = ( isset( $unique ) ) ? $unique : '';
30
- $languages = sp_language_defaults();
31
- $class = 'SP_WPCP_Framework_Option_' . $field['type'];
32
- $wrap_class = ( isset( $field['wrap_class'] ) ) ? ' ' . $field['wrap_class'] : '';
33
- $hidden = ( isset( $field['show_only_language'] ) && ( $field['show_only_language'] != $languages['current'] ) ) ? ' hidden' : '';
34
- $is_pseudo = ( isset( $field['pseudo'] ) ) ? ' sp-pseudo-field' : '';
35
- $is_pro = ( isset( $field['is_pro'] ) ) ? ' disabled' : '';
36
-
37
- if ( isset( $field['dependency'] ) ) {
38
- $hidden = ' hidden';
39
- $depend .= ' data-' . $sub . 'controller="' . $field['dependency'][0] . '"';
40
- $depend .= ' data-' . $sub . 'condition="' . $field['dependency'][1] . '"';
41
- $depend .= ' data-' . $sub . 'value="' . $field['dependency'][2] . '"';
42
- }
43
-
44
- $output .= '<div class="sp-element sp-field-' . $field['type'] . $is_pseudo . $wrap_class . $hidden . '"' . $depend . '>';
45
-
46
- if ( isset( $field['title'] ) ) {
47
- $field_desc = ( isset( $field['desc'] ) ) ? '<p class="sp-text-desc">' . $field['desc'] . '</p>' : '';
48
- $output .= '<div class="sp-title"><h4>' . $field['title'] . '</h4>' . $field_desc . '</div>';
49
- }
50
-
51
- $output .= ( isset( $field['title'] ) ) ? '<div class="sp-fieldset">' : '';
52
- $value = ( ! isset( $value ) && isset( $field['default'] ) ) ? $field['default'] : $value;
53
- $value = ( isset( $field['value'] ) ) ? $field['value'] : $value;
54
-
55
- if ( class_exists( $class ) ) {
56
- ob_start();
57
- $element = new $class( $field, $value, $unique );
58
- $element->output();
59
- $output .= ob_get_clean();
60
- } else {
61
- $output .= '<p>' . __( 'This field class is not available!', 'wp-carousel-free' ) . '</p>';
62
- }
63
-
64
- $output .= ( isset( $field['title'] ) ) ? '</div>' : '';
65
- $output .= '<div class="clear"></div>';
66
- $output .= '</div>';
67
-
68
- return $output;
69
-
70
- }
71
- }
72
-
73
- if ( ! function_exists( 'sp_encode_string' ) ) {
74
- /**
75
- * Encode string for backup options
76
- *
77
- * @param mix $string All the setting options.
78
- * @since 1.0.0
79
- * @return mix
80
- */
81
- function sp_encode_string( $string ) {
82
- return serialize( $string );
83
- }
84
- }
85
-
86
- if ( ! function_exists( 'sp_decode_string' ) ) {
87
- /**
88
- * Decode string for backup options
89
- *
90
- * @param mix $string all the setting in string.
91
- * @since 1.0.0
92
- * @return mix
93
- */
94
- function sp_decode_string( $string ) {
95
- return unserialize( $string );
96
- }
97
- }
98
-
99
- if ( ! function_exists( 'sp_wpcp_get_google_fonts' ) ) {
100
- /**
101
- * Get google font from json file.
102
- *
103
- * @since 1.0.0
104
- * @return mix
105
- */
106
- function sp_wpcp_get_google_fonts() {
107
-
108
- global $sp_google_fonts;
109
-
110
- if ( ! empty( $sp_google_fonts ) ) {
111
-
112
- return $sp_google_fonts;
113
-
114
- } else {
115
-
116
- ob_start();
117
- sp_wpcp_locate_template( 'fields/typography_advanced/google-fonts.json' );
118
- $json = ob_get_clean();
119
-
120
- $sp_google_fonts = json_decode( $json );
121
-
122
- return $sp_google_fonts;
123
- }
124
-
125
- }
126
- }
127
-
128
- if ( ! function_exists( 'sp_get_icon_fonts' ) ) {
129
- /**
130
- * Get icon fonts from json file
131
- *
132
- * @since 1.0.0
133
- * @param string $file The icon name.
134
- * @return statement
135
- */
136
- function sp_get_icon_fonts( $file ) {
137
-
138
- ob_start();
139
- sp_wpcp_locate_template( $file );
140
- $json = ob_get_clean();
141
-
142
- return json_decode( $json );
143
-
144
- }
145
- }
146
-
147
- if ( ! function_exists( 'sp_array_search' ) ) {
148
- /**
149
- * Array search key & value
150
- *
151
- * @since 1.0.0
152
- * @param array $array The search array.
153
- * @param string $key The array key.
154
- * @param mix $value The array value.
155
- * @return mix
156
- */
157
- function sp_array_search( $array, $key, $value ) {
158
-
159
- $results = array();
160
-
161
- if ( is_array( $array ) ) {
162
- if ( isset( $array[ $key ] ) && $array[ $key ] == $value ) {
163
- $results[] = $array;
164
- }
165
-
166
- foreach ( $array as $sub_array ) {
167
- $results = array_merge( $results, sp_array_search( $sub_array, $key, $value ) );
168
- }
169
- }
170
-
171
- return $results;
172
-
173
- }
174
- }
175
-
176
- if ( ! function_exists( 'sp_get_var' ) ) {
177
- /**
178
- * Getting POST Var
179
- *
180
- * @since 1.0.0
181
- * @param variable $var The post var.
182
- * @param string $default The post value.
183
- * @return statement
184
- */
185
- function sp_get_var( $var, $default = '' ) {
186
-
187
- if ( isset( $_POST[ $var ] ) ) {
188
- return $_POST[ $var ];
189
- }
190
-
191
- if ( isset( $_GET[ $var ] ) ) {
192
- return $_GET[ $var ];
193
- }
194
-
195
- return $default;
196
-
197
- }
198
- }
199
-
200
- if ( ! function_exists( 'sp_get_vars' ) ) {
201
- /**
202
- * Getting POST Vars
203
- *
204
- * @since 1.0.0
205
- * @param variable $var The post variable.
206
- * @param string $depth the depth of the post.
207
- * @param string $default the default value.
208
- * @return statement
209
- */
210
- function sp_get_vars( $var, $depth, $default = '' ) {
211
-
212
- if ( isset( $_POST[ $var ][ $depth ] ) ) {
213
- return $_POST[ $var ][ $depth ];
214
- }
215
-
216
- if ( isset( $_GET[ $var ][ $depth ] ) ) {
217
- return $_GET[ $var ][ $depth ];
218
- }
219
-
220
- return $default;
221
-
222
- }
223
- }
224
-
225
- if ( ! function_exists( 'sp_wpcp_load_option_fields' ) ) {
226
- /**
227
- * Load options fields
228
- *
229
- * @since 1.0.0
230
- * @return void
231
- */
232
- function sp_wpcp_load_option_fields() {
233
-
234
- $located_fields = array();
235
-
236
- foreach ( glob( SP_WPCP_F_DIR . '/fields/*/*.php' ) as $sp_field ) {
237
- $located_fields[] = basename( $sp_field );
238
- sp_wpcp_locate_template( str_replace( SP_WPCP_F_DIR, '', $sp_field ) );
239
- }
240
-
241
- $override_name = apply_filters( 'sp_wpcp_framework_override', 'sp-framework-override' );
242
- $override_dir = get_template_directory() . '/' . $override_name . '/fields';
243
-
244
- if ( is_dir( $override_dir ) ) {
245
-
246
- foreach ( glob( $override_dir . '/*/*.php' ) as $override_field ) {
247
-
248
- if ( ! in_array( basename( $override_field ), $located_fields ) ) {
249
-
250
- sp_wpcp_locate_template( str_replace( $override_dir, '/fields', $override_field ) );
251
-
252
- }
253
- }
254
- }
255
-
256
- do_action( 'sp_wpcp_load_option_fields' );
257
-
258
- }
259
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/functions/sanitize.php DELETED
@@ -1,132 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access pages directly.
3
-
4
- if ( ! function_exists( 'sp_sanitize_text' ) ) {
5
- /**
6
- * Text sanitize
7
- *
8
- * @since 1.0.0
9
- * @version 1.0.0
10
- *
11
- * @param string $value Sanitize text field value.
12
- * @param string $field The field type.
13
- * @return statement
14
- */
15
- function sp_sanitize_text( $value, $field ) {
16
- return wp_filter_nohtml_kses( $value );
17
- }
18
- add_filter( 'sp_sanitize_text', 'sp_sanitize_text', 10, 2 );
19
- }
20
-
21
- /**
22
- *
23
- * Textarea sanitize
24
- *
25
- * @since 1.0.0
26
- * @version 1.0.0
27
- */
28
- if ( ! function_exists( 'sp_sanitize_textarea' ) ) {
29
- function sp_sanitize_textarea( $value ) {
30
-
31
- global $allowedposttags;
32
- return wp_kses( $value, $allowedposttags );
33
-
34
- }
35
- add_filter( 'sp_sanitize_textarea', 'sp_sanitize_textarea' );
36
- }
37
-
38
- /**
39
- *
40
- * Checkbox sanitize
41
- * Do not touch, or think twice.
42
- *
43
- * @since 1.0.0
44
- * @version 1.0.0
45
- */
46
- if ( ! function_exists( 'sp_sanitize_checkbox' ) ) {
47
- function sp_sanitize_checkbox( $value ) {
48
-
49
- if ( ! empty( $value ) && $value == 1 ) {
50
- $value = true;
51
- }
52
-
53
- if ( empty( $value ) ) {
54
- $value = false;
55
- }
56
-
57
- return $value;
58
-
59
- }
60
- add_filter( 'sp_sanitize_checkbox', 'sp_sanitize_checkbox' );
61
- add_filter( 'sp_sanitize_switcher', 'sp_sanitize_checkbox' );
62
- }
63
-
64
- /**
65
- *
66
- * Image select sanitize
67
- * Do not touch, or think twice.
68
- *
69
- * @since 1.0.0
70
- * @version 1.0.0
71
- */
72
- if ( ! function_exists( 'sp_sanitize_image_select' ) ) {
73
- function sp_sanitize_image_select( $value ) {
74
-
75
- if ( isset( $value ) && is_array( $value ) ) {
76
- if ( count( $value ) ) {
77
- $value = $value;
78
- } else {
79
- $value = $value[0];
80
- }
81
- } elseif ( empty( $value ) ) {
82
- $value = '';
83
- }
84
-
85
- return $value;
86
-
87
- }
88
- add_filter( 'sp_sanitize_image_select', 'sp_sanitize_image_select' );
89
- }
90
-
91
- /**
92
- *
93
- * Group sanitize
94
- * Do not touch, or think twice.
95
- *
96
- * @since 1.0.0
97
- * @version 1.0.0
98
- */
99
- if ( ! function_exists( 'sp_sanitize_group' ) ) {
100
- function sp_sanitize_group( $value ) {
101
- return ( empty( $value ) ) ? '' : $value;
102
- }
103
- add_filter( 'sp_sanitize_group', 'sp_sanitize_group' );
104
- }
105
-
106
- /**
107
- *
108
- * Title sanitize
109
- *
110
- * @since 1.0.0
111
- * @version 1.0.0
112
- */
113
- if ( ! function_exists( 'sp_sanitize_title' ) ) {
114
- function sp_sanitize_title( $value ) {
115
- return sanitize_title( $value );
116
- }
117
- add_filter( 'sp_sanitize_title', 'sp_sanitize_title' );
118
- }
119
-
120
- /**
121
- *
122
- * Text clean
123
- *
124
- * @since 1.0.0
125
- * @version 1.0.0
126
- */
127
- if ( ! function_exists( 'sp_sanitize_clean' ) ) {
128
- function sp_sanitize_clean( $value ) {
129
- return $value;
130
- }
131
- add_filter( 'sp_sanitize_clean', 'sp_sanitize_clean', 10, 2 );
132
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/functions/validate.php DELETED
@@ -1,74 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access pages directly.
3
- /**
4
- *
5
- * Email validate
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
- if ( ! function_exists( 'sp_wpcp_validate_email' ) ) {
11
-
12
- /**
13
- * Validate email address.
14
- *
15
- * @param email $value the value of the field.
16
- * @param string $field The field.
17
- * @return statement
18
- */
19
- function sp_wpcp_validate_email( $value, $field ) {
20
-
21
- if ( ! sanitize_email( $value ) ) {
22
- return __( 'Please write a valid email address!', 'wp-carousel-free' );
23
- }
24
-
25
- }
26
- add_filter( 'sp_wpcp_validate_email', 'sp_wpcp_validate_email', 10, 2 );
27
- }
28
-
29
- /**
30
- *
31
- * Numeric validate
32
- *
33
- * @since 1.0.0
34
- * @version 1.0.0
35
- */
36
- if ( ! function_exists( 'sp_wpcp_validate_numeric' ) ) {
37
- /**
38
- * Validate numeric value.
39
- *
40
- * @param mix $value Verify the number.
41
- * @param string $field The field.
42
- * @return statement
43
- */
44
- function sp_wpcp_validate_numeric( $value, $field ) {
45
-
46
- if ( ! is_numeric( $value ) ) {
47
- return __( 'Please write a numeric data!', 'wp-carousel-free' );
48
- }
49
-
50
- }
51
- add_filter( 'sp_wpcp_validate_numeric', 'sp_wpcp_validate_numeric', 10, 2 );
52
- }
53
-
54
- /**
55
- *
56
- * Required validate
57
- *
58
- * @since 1.0.0
59
- * @version 1.0.0
60
- */
61
- if ( ! function_exists( 'sp_wpcp_validate_required' ) ) {
62
- /**
63
- * Validate required.
64
- *
65
- * @param mix $value Value of the field.
66
- * @return statement
67
- */
68
- function sp_wpcp_validate_required( $value ) {
69
- if ( empty( $value ) ) {
70
- return __( 'Fatal Error! This field is required!', 'wp-carousel-free' );
71
- }
72
- }
73
- add_filter( 'sp_wpcp_validate_required', 'sp_wpcp_validate_required' );
74
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/sp-framework-path.php DELETED
@@ -1,381 +0,0 @@
1
- <?php if ( ! defined( 'ABSPATH' ) ) {
2
- die; } // Cannot access pages directly.
3
- /**
4
- *
5
- * Framework constants
6
- *
7
- * @since 1.0.0
8
- * @version 1.0.0
9
- */
10
- defined( 'SP_WPCP_F_VERSION' ) || define( 'SP_WPCP_F_VERSION', '1.1.0' );
11
- defined( 'SP_OPTION' ) || define( 'SP_OPTION', '_sp_options' );
12
-
13
- if ( ! function_exists( 'sp_wpcp_get_path_locate' ) ) {
14
- /**
15
- *
16
- * Framework path finder
17
- *
18
- * @since 1.0.0
19
- * @version 1.0.0
20
- */
21
- function sp_wpcp_get_path_locate() {
22
-
23
- $dirname = wp_normalize_path( dirname( __FILE__ ) );
24
- $plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
25
- $located_plugin = ( preg_match( '#' . $plugin_dir . '#', $dirname ) ) ? true : false;
26
- $directory = ( $located_plugin ) ? $plugin_dir : get_template_directory();
27
- $directory_uri = ( $located_plugin ) ? WP_PLUGIN_URL : get_template_directory_uri();
28
- $basename = str_replace( wp_normalize_path( $directory ), '', $dirname );
29
- $dir = $directory . $basename;
30
- $uri = $directory_uri . $basename;
31
-
32
- return apply_filters(
33
- 'sp_wpcp_get_path_locate', array(
34
- 'basename' => wp_normalize_path( $basename ),
35
- 'dir' => wp_normalize_path( $dir ),
36
- 'uri' => $uri,
37
- )
38
- );
39
-
40
- }
41
- }
42
-
43
- /**
44
- *
45
- * Framework set paths
46
- *
47
- * @since 1.0.0
48
- * @version 1.0.0
49
- */
50
- $get_path = sp_wpcp_get_path_locate();
51
-
52
- defined( 'SP_WPCP_F_BASENAME' ) || define( 'SP_WPCP_F_BASENAME', $get_path['basename'] );
53
- defined( 'SP_WPCP_F_DIR' ) || define( 'SP_WPCP_F_DIR', $get_path['dir'] );
54
- defined( 'SP_WPCP_F_URI' ) || define( 'SP_WPCP_F_URI', $get_path['uri'] );
55
-
56
- if ( ! function_exists( 'sp_wpcp_locate_template' ) ) {
57
- /**
58
- *
59
- * Framework locate template and override files
60
- *
61
- * @since 1.0.0
62
- * @version 1.0.0
63
- * @param string $template_name The template name.
64
- * @return statement
65
- */
66
- function sp_wpcp_locate_template( $template_name ) {
67
-
68
- $located = '';
69
- $override = apply_filters( 'sp_wpcp_framework_override', 'sp-framework-override' );
70
- $dir_plugin = WP_PLUGIN_DIR;
71
- $dir_theme = get_template_directory();
72
- $dir_child = get_stylesheet_directory();
73
- $dir_override = '/' . $override . '/' . $template_name;
74
- $dir_template = SP_WPCP_F_BASENAME . '/' . $template_name;
75
-
76
- // child theme override
77
- $child_force_overide = $dir_child . $dir_override;
78
- $child_normal_override = $dir_child . $dir_template;
79
-
80
- // theme override paths
81
- $theme_force_override = $dir_theme . $dir_override;
82
- $theme_normal_override = $dir_theme . $dir_template;
83
-
84
- // plugin override
85
- $plugin_force_override = $dir_plugin . $dir_override;
86
- $plugin_normal_override = $dir_plugin . $dir_template;
87
-
88
- if ( file_exists( $child_force_overide ) ) {
89
-
90
- $located = $child_force_overide;
91
-
92
- } elseif ( file_exists( $child_normal_override ) ) {
93
-
94
- $located = $child_normal_override;
95
-
96
- } elseif ( file_exists( $theme_force_override ) ) {
97
-
98
- $located = $theme_force_override;
99
-
100
- } elseif ( file_exists( $theme_normal_override ) ) {
101
-
102
- $located = $theme_normal_override;
103
-
104
- } elseif ( file_exists( $plugin_force_override ) ) {
105
-
106
- $located = $plugin_force_override;
107
-
108
- } elseif ( file_exists( $plugin_normal_override ) ) {
109
-
110
- $located = $plugin_normal_override;
111
- }
112
-
113
- $located = apply_filters( 'sp_wpcp_locate_template', $located, $template_name );
114
-
115
- if ( ! empty( $located ) ) {
116
- load_template( $located, true );
117
- }
118
-
119
- return $located;
120
-
121
- }
122
- }
123
-
124
- if ( ! function_exists( 'sp_get_option' ) ) {
125
- /**
126
- *
127
- * Get option
128
- *
129
- * @since 1.0.0
130
- * @version 1.0.0
131
- */
132
- function sp_get_option( $option_name = '', $default = '' ) {
133
-
134
- $options = apply_filters( 'sp_get_option', get_option( SP_OPTION ), $option_name, $default );
135
-
136
- if ( ! empty( $option_name ) && ! empty( $options[ $option_name ] ) ) {
137
- return $options[ $option_name ];
138
- } else {
139
- return ( ! empty( $default ) ) ? $default : null;
140
- }
141
-
142
- }
143
- }
144
-
145
- if ( ! function_exists( 'sp_set_option' ) ) {
146
- /**
147
- *
148
- * Set option
149
- *
150
- * @since 1.0.0
151
- * @version 1.0.0
152
- */
153
- function sp_set_option( $option_name = '', $new_value = '' ) {
154
-
155
- $options = apply_filters( 'sp_set_option', get_option( SP_OPTION ), $option_name, $new_value );
156
-
157
- if ( ! empty( $option_name ) ) {
158
- $options[ $option_name ] = $new_value;
159
- update_option( SP_OPTION, $options );
160
- }
161
-
162
- }
163
- }
164
-
165
- if ( ! function_exists( 'sp_get_all_option' ) ) {
166
- /**
167
- *
168
- * Get all option
169
- *
170
- * @since 1.0.0
171
- * @version 1.0.0
172
- */
173
- function sp_get_all_option() {
174
- return get_option( SP_OPTION );
175
- }
176
- }
177
-
178
- if ( ! function_exists( 'sp_get_multilang_option' ) ) {
179
- /**
180
- *
181
- * Multi language option
182
- *
183
- * @since 1.0.0
184
- * @version 1.0.0
185
- */
186
- function sp_get_multilang_option( $option_name = '', $default = '' ) {
187
-
188
- $value = sp_get_option( $option_name, $default );
189
- $languages = sp_language_defaults();
190
- $default = $languages['default'];
191
- $current = $languages['current'];
192
-
193
- if ( is_array( $value ) && is_array( $languages ) && isset( $value[ $current ] ) ) {
194
- return $value[ $current ];
195
- } elseif ( $default != $current ) {
196
- return '';
197
- }
198
-
199
- return $value;
200
-
201
- }
202
- }
203
-
204
- if ( ! function_exists( 'sp_get_multilang_value' ) ) {
205
- /**
206
- *
207
- * Multi language value
208
- *
209
- * @since 1.0.0
210
- * @version 1.0.0
211
- */
212
- function sp_get_multilang_value( $value = '', $default = '' ) {
213
-
214
- $languages = sp_language_defaults();
215
- $default = $languages['default'];
216
- $current = $languages['current'];
217
-
218
- if ( is_array( $value ) && is_array( $languages ) && isset( $value[ $current ] ) ) {
219
- return $value[ $current ];
220
- } elseif ( $default != $current ) {
221
- return '';
222
- }
223
-
224
- return $value;
225
-
226
- }
227
- }
228
-
229
- if ( ! function_exists( 'sp_is_wpml_activated' ) ) {
230
- /**
231
- *
232
- * WPML plugin is activated
233
- *
234
- * @since 1.0.0
235
- * @version 1.0.0
236
- */
237
- function sp_is_wpml_activated() {
238
- if ( class_exists( 'SitePress' ) ) {
239
- return true;
240
- } else {
241
- return false; }
242
- }
243
- }
244
-
245
- if ( ! function_exists( 'sp_is_qtranslate_activated' ) ) {
246
- /**
247
- *
248
- * qTranslate plugin is activated
249
- *
250
- * @since 1.0.0
251
- * @version 1.0.0
252
- */
253
- function sp_is_qtranslate_activated() {
254
- if ( function_exists( 'qtrans_getSortedLanguages' ) ) {
255
- return true;
256
- } else {
257
- return false; }
258
- }
259
- }
260
-
261
- if ( ! function_exists( 'sp_is_polylang_activated' ) ) {
262
- /**
263
- *
264
- * Polylang plugin is activated
265
- *
266
- * @since 1.0.0
267
- * @version 1.0.0
268
- */
269
- function sp_is_polylang_activated() {
270
- if ( class_exists( 'Polylang' ) ) {
271
- return true;
272
- } else {
273
- return false; }
274
- }
275
- }
276
-
277
- if ( ! function_exists( 'sp_language_defaults' ) ) {
278
- /**
279
- *
280
- * Get language defaults
281
- *
282
- * @since 1.0.0
283
- * @version 1.0.0
284
- */
285
- function sp_language_defaults() {
286
-
287
- $multilang = array();
288
-
289
- if ( sp_is_wpml_activated() || sp_is_qtranslate_activated() || sp_is_polylang_activated() ) {
290
-
291
- if ( sp_is_wpml_activated() ) {
292
-
293
- global $sitepress;
294
- $multilang['default'] = $sitepress->get_default_language();
295
- $multilang['current'] = $sitepress->get_current_language();
296
- $multilang['languages'] = $sitepress->get_active_languages();
297
-
298
- } elseif ( sp_is_polylang_activated() ) {
299
-
300
- global $polylang;
301
- $current = pll_current_language();
302
- $default = pll_default_language();
303
- $current = ( empty( $current ) ) ? $default : $current;
304
- $poly_langs = $polylang->model->get_languages_list();
305
- $languages = array();
306
-
307
- foreach ( $poly_langs as $p_lang ) {
308
- $languages[ $p_lang->slug ] = $p_lang->slug;
309
- }
310
-
311
- $multilang['default'] = $default;
312
- $multilang['current'] = $current;
313
- $multilang['languages'] = $languages;
314
-
315
- } elseif ( sp_is_qtranslate_activated() ) {
316
-
317
- global $q_config;
318
- $multilang['default'] = $q_config['default_language'];
319
- $multilang['current'] = $q_config['language'];
320
- $multilang['languages'] = array_flip( qtrans_getSortedLanguages() );
321
-
322
- }
323
- }
324
-
325
- $multilang = apply_filters( 'sp_language_defaults', $multilang );
326
-
327
- return ( ! empty( $multilang ) ) ? $multilang : false;
328
-
329
- }
330
- }
331
-
332
- if ( ! function_exists( 'sp_get_locale' ) ) {
333
- /**
334
- *
335
- * Get locate for load textdomain
336
- *
337
- * @since 1.0.0
338
- * @version 1.0.0
339
- */
340
- function sp_get_locale() {
341
-
342
- global $locale, $wp_local_package;
343
-
344
- if ( isset( $locale ) ) {
345
- return apply_filters( 'locale', $locale );
346
- }
347
-
348
- if ( isset( $wp_local_package ) ) {
349
- $locale = $wp_local_package;
350
- }
351
-
352
- if ( defined( 'WPLANG' ) ) {
353
- $locale = WPLANG;
354
- }
355
-
356
- if ( is_multisite() ) {
357
-
358
- if ( defined( 'WP_INSTALLING' ) || ( false === $ms_locale = get_option( 'WPLANG' ) ) ) {
359
- $ms_locale = get_site_option( 'WPLANG' );
360
- }
361
-
362
- if ( $ms_locale !== false ) {
363
- $locale = $ms_locale;
364
- }
365
- } else {
366
-
367
- $db_locale = get_option( 'WPLANG' );
368
-
369
- if ( $db_locale !== false ) {
370
- $locale = $db_locale;
371
- }
372
- }
373
-
374
- if ( empty( $locale ) ) {
375
- $locale = 'en_US';
376
- }
377
-
378
- return apply_filters( 'locale', $locale );
379
-
380
- }
381
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/meta-box/sp-framework.php DELETED
@@ -1,50 +0,0 @@
1
- <?php
2
- /**
3
- * The main file for the SP meta-box framework.
4
- *
5
- * @package WP_Carousel_Free
6
- * @subpackage WP_Carousel_Free/admin/views/meta-box
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- die;
11
- } // Cannot access pages directly.
12
-
13
- // ------------------------------------------------------------------------------------------------
14
- require_once plugin_dir_path( __FILE__ ) . '/sp-framework-path.php';
15
- // ------------------------------------------------------------------------------------------------
16
- if ( ! function_exists( 'sp_wpcp_framework_init' ) && ! class_exists( 'SP_WPCP_Framework' ) ) {
17
-
18
- /**
19
- * SP meta box framework for ShapedPlugin
20
- *
21
- * @since 2.0.0
22
- * @return void
23
- */
24
- function sp_wpcp_framework_init() {
25
-
26
- // Active modules.
27
- defined( 'SP_WPCP_F_ACTIVE_METABOX' ) || define( 'SP_WPCP_F_ACTIVE_METABOX', true );
28
- defined( 'SP_WPCP_F_ACTIVE_FRAMEWORK' ) || define( 'SP_WPCP_F_ACTIVE_FRAMEWORK', true );
29
-
30
- // Helpers.
31
- sp_wpcp_locate_template( 'functions/fallback.php' );
32
- sp_wpcp_locate_template( 'functions/helpers.php' );
33
- sp_wpcp_locate_template( 'functions/actions.php' );
34
- sp_wpcp_locate_template( 'functions/enqueue.php' );
35
- sp_wpcp_locate_template( 'functions/sanitize.php' );
36
- sp_wpcp_locate_template( 'functions/validate.php' );
37
-
38
- // Classes.
39
- sp_wpcp_locate_template( 'classes/abstract.class.php' );
40
- sp_wpcp_locate_template( 'classes/options.class.php' );
41
- sp_wpcp_locate_template( 'classes/metabox.class.php' );
42
- sp_wpcp_locate_template( 'classes/framework.class.php' );
43
-
44
- // Configs.
45
- sp_wpcp_locate_template( 'config/metabox.config.php' );
46
- sp_wpcp_locate_template( 'config/framework.config.php' );
47
-
48
- }
49
- add_action( 'init', 'sp_wpcp_framework_init', 10 );
50
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/metabox-config.php ADDED
@@ -0,0 +1,990 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access pages directly.
3
+
4
+ //
5
+ // Metabox of the uppers section / Upload section.
6
+ // Set a unique slug-like ID.
7
+ //
8
+ $wpcp_carousel_content_source_settings = 'sp_wpcp_upload_options';
9
+
10
+ //
11
+ // Create a metabox.
12
+ //
13
+ SP_WPCF::createMetabox(
14
+ $wpcp_carousel_content_source_settings,
15
+ array(
16
+ 'title' => __( 'WordPress Carousel Pro', 'wp-carousel-pro' ),
17
+ 'post_type' => 'sp_wp_carousel',
18
+ 'show_restore' => false,
19
+ 'context' => 'normal',
20
+ )
21
+ );
22
+
23
+ //
24
+ // Create a section.
25
+ //
26
+ SP_WPCF::createSection(
27
+ $wpcp_carousel_content_source_settings,
28
+ array(
29
+ 'fields' => array(
30
+ array(
31
+ 'type' => 'heading',
32
+ 'image' => plugin_dir_url( __DIR__ ) . 'img/wpcp-logo.png',
33
+ 'after' => '<i class="fa fa-life-ring"></i> Support',
34
+ 'link' => 'https://shapedplugin.com/support/',
35
+ 'class' => 'wpcp-admin-header',
36
+ ),
37
+ array(
38
+ 'id' => 'wpcp_carousel_type',
39
+ 'type' => 'carousel_type',
40
+ 'title' => __( 'Carousel Type', 'wp-carousel-pro' ),
41
+ 'options' => array(
42
+ 'image-carousel' => array(
43
+ 'icon' => 'fa fa-image',
44
+ 'text' => __( 'Image', 'wp-carousel-pro' ),
45
+ ),
46
+ 'post-carousel' => array(
47
+ 'icon' => 'dashicons dashicons-admin-post',
48
+ 'text' => __( 'Post', 'wp-carousel-pro' ),
49
+ ),
50
+ 'product-carousel' => array(
51
+ 'icon' => 'fa fa-cart-plus',
52
+ 'text' => __( 'Product', 'wp-carousel-pro' ),
53
+ ),
54
+ 'content-carousel' => array(
55
+ 'icon' => 'fa fa-file-text-o',
56
+ 'text' => __( 'Content', 'wp-carousel-pro' ),
57
+ 'pro_only' => true,
58
+ ),
59
+ 'video-carousel' => array(
60
+ 'icon' => 'fa fa-play-circle-o',
61
+ 'text' => __( 'Video', 'wp-carousel-pro' ),
62
+ 'pro_only' => true,
63
+ ),
64
+ ),
65
+ 'default' => 'image-carousel',
66
+ ),
67
+ array(
68
+ 'id' => 'wpcp_gallery',
69
+ 'type' => 'gallery',
70
+ 'title' => 'Gallery Images',
71
+ 'wrap_class' => 'wpcp-gallery-filed-wrapper',
72
+ 'add_title' => __( 'ADD IMAGE', 'wp-carousel-pro' ),
73
+ 'edit_title' => __( 'EDIT IMAGE', 'wp-carousel-pro' ),
74
+ 'clear_title' => __( 'REMOVE ALL', 'wp-carousel-pro' ),
75
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'image-carousel' ),
76
+ ),
77
+ array(
78
+ 'id' => 'wpcp_display_posts_from',
79
+ 'type' => 'selectf',
80
+ 'title' => __( 'Display Posts From', 'wp-carousel-pro' ),
81
+ 'subtitle' => __( 'Select an option to display the posts.', 'wp-carousel-pro' ),
82
+ 'options' => array(
83
+ 'latest' => array(
84
+ 'text' => __( 'Latest', 'wp-carousel-free' ),
85
+ ),
86
+ 'taxonomy' => array(
87
+ 'text' => __( 'Taxonomy (Pro)', 'wp-carousel-free' ),
88
+ 'pro_only' => true,
89
+ ),
90
+ 'specific_post' => array(
91
+ 'text' => __( 'Specific Posts (Pro)', 'wp-carousel-free' ),
92
+ 'pro_only' => true,
93
+ ),
94
+ ),
95
+ 'default' => 'latest',
96
+ 'class' => 'chosen',
97
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
98
+ ),
99
+
100
+ array(
101
+ 'id' => 'number_of_total_posts',
102
+ 'type' => 'spinner',
103
+ 'title' => __( 'Total Posts', 'wp-carousel-pro' ),
104
+ 'subtitle' => __( 'Number of total posts to show. Default value is 10.', 'wp-carousel-pro' ),
105
+ 'default' => '10',
106
+ 'min' => 1,
107
+ 'max' => 1000,
108
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
109
+ ),
110
+ // Product Carousel.
111
+ array(
112
+ 'id' => 'wpcp_display_product_from',
113
+ 'type' => 'selectf',
114
+ 'title' => __( 'Display Product From', 'wp-carousel-pro' ),
115
+ 'subtitle' => __( 'Select an option to display the products.', 'wp-carousel-pro' ),
116
+ 'options' => array(
117
+ 'latest' => array(
118
+ 'text' => __( 'Latest Product', 'wp-carousel-pro' ),
119
+ ),
120
+ 'taxonomy' => array(
121
+ 'text' => __( 'Product Category (Pro)', 'wp-carousel-pro' ),
122
+ 'pro_only' => true,
123
+ ),
124
+ 'specific_products' => array(
125
+ 'text' => __( 'Specific Product (Pro)', 'wp-carousel-pro' ),
126
+ 'pro_only' => true,
127
+ ),
128
+ ),
129
+ 'default' => 'latest',
130
+ 'class' => 'chosen',
131
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
132
+ ),
133
+
134
+ array(
135
+ 'id' => 'wpcp_total_products',
136
+ 'type' => 'spinner',
137
+ 'title' => __( 'Total Products', 'wp-carousel-pro' ),
138
+ 'subtitle' => __( 'Number of total products to display. Default value is 10.', 'wp-carousel-pro' ),
139
+ 'default' => '10',
140
+ 'min' => 1,
141
+ 'max' => 1000,
142
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
143
+ ),
144
+ ), // End of fields array.
145
+ )
146
+ );
147
+
148
+ //
149
+ // Metabox for the Carousel Post Type.
150
+ // Set a unique slug-like ID.
151
+ //
152
+ $wpcp_carousel_shortcode_settings = 'sp_wpcp_shortcode_options';
153
+
154
+ //
155
+ // Create a metabox.
156
+ //
157
+ SP_WPCF::createMetabox(
158
+ $wpcp_carousel_shortcode_settings,
159
+ array(
160
+ 'title' => __( 'Shortcode Section', 'wp-carousel-pro' ),
161
+ 'post_type' => 'sp_wp_carousel',
162
+ 'show_restore' => false,
163
+ 'theme' => 'light',
164
+ )
165
+ );
166
+
167
+ //
168
+ // Create a section.
169
+ //
170
+ SP_WPCF::createSection(
171
+ $wpcp_carousel_shortcode_settings,
172
+ array(
173
+ 'title' => __( 'General Settings', 'wp-carousel-pro' ),
174
+ 'icon' => 'fa fa-wrench',
175
+ 'fields' => array(
176
+ array(
177
+ 'id' => 'section_title',
178
+ 'type' => 'switcher',
179
+ 'title' => __( 'Carousel Section Title', 'wp-carousel-pro' ),
180
+ 'subtitle' => __( 'Show/Hide the carousel section title.', 'wp-carousel-pro' ),
181
+ 'default' => false,
182
+ 'text_on' => __( 'Show', 'wp-carousel-pro' ),
183
+ 'text_off' => __( 'Hide', 'wp-carousel-pro' ),
184
+ 'text_width' => 75,
185
+ ),
186
+ array(
187
+ 'id' => 'section_title_margin_bottom',
188
+ 'type' => 'spacing',
189
+ 'title' => __( 'Carousel Title Margin Bottom', 'wp-carousel-pro' ),
190
+ 'subtitle' => __( 'Set margin bottom for the carousel section title. Default value is 30px.', 'wp-carousel-pro' ),
191
+ 'all' => true,
192
+ 'all_text' => '<i class="fa fa-long-arrow-down"></i>',
193
+ 'units' => array(
194
+ 'px',
195
+ ),
196
+ 'all_placeholder' => 'margin',
197
+ 'default' => array(
198
+ 'all' => '30',
199
+ ),
200
+ 'dependency' => array(
201
+ 'section_title',
202
+ '==',
203
+ 'true',
204
+ true,
205
+ ),
206
+ ),
207
+ array(
208
+ 'id' => 'wpcp_number_of_columns',
209
+ 'type' => 'column',
210
+ 'title' => __( 'Carousel Column(s)', 'wp-carousel-pro' ),
211
+ 'subtitle' => __( 'Set number of column on devices.', 'wp-carousel-pro' ),
212
+ 'default' => array(
213
+ 'lg_desktop' => '5',
214
+ 'desktop' => '4',
215
+ 'laptop' => '3',
216
+ 'tablet' => '2',
217
+ 'mobile' => '1',
218
+ ),
219
+ 'min' => '0',
220
+ ),
221
+ array(
222
+ 'id' => 'wpcp_image_order_by',
223
+ 'type' => 'select',
224
+ 'title' => __( 'Order by', 'wp-carousel-pro' ),
225
+ 'subtitle' => __( 'Set an order by option.', 'wp-carousel-pro' ),
226
+ 'options' => array(
227
+ 'menu_order' => __( 'Drag & Drop', 'wp-carousel-pro' ),
228
+ 'rand' => __( 'Random', 'wp-carousel-pro' ),
229
+ ),
230
+ 'default' => 'menu_order',
231
+ 'dependency' => array( 'wpcp_carousel_type', 'any', 'image-carousel', true ),
232
+ ),
233
+ array(
234
+ 'id' => 'wpcp_post_order_by',
235
+ 'type' => 'select',
236
+ 'title' => __( 'Order by', 'wp-carousel-pro' ),
237
+ 'subtitle' => __( 'Select an order by option.', 'wp-carousel-pro' ),
238
+ 'options' => array(
239
+ 'ID' => __( 'ID', 'wp-carousel-pro' ),
240
+ 'date' => __( 'Date', 'wp-carousel-pro' ),
241
+ 'rand' => __( 'Random', 'wp-carousel-pro' ),
242
+ 'title' => __( 'Title', 'wp-carousel-pro' ),
243
+ 'modified' => __( 'Modified', 'wp-carousel-pro' ),
244
+ 'menu_order' => __( 'Menu Order', 'wp-carousel-pro' ),
245
+ ),
246
+ 'default' => 'menu_order',
247
+ 'dependency' => array( 'wpcp_carousel_type', 'any', 'post-carousel,product-carousel', true ),
248
+ ),
249
+ array(
250
+ 'id' => 'wpcp_post_order',
251
+ 'type' => 'select',
252
+ 'title' => __( 'Order', 'wp-carousel-pro' ),
253
+ 'subtitle' => __( 'Select an order option.', 'wp-carousel-pro' ),
254
+ 'options' => array(
255
+ 'ASC' => __( 'Ascending', 'wp-carousel-pro' ),
256
+ 'DESC' => __( 'Descending', 'wp-carousel-pro' ),
257
+ ),
258
+ 'default' => 'rand',
259
+ 'dependency' => array( 'wpcp_carousel_type', 'any', 'post-carousel,product-carousel', true ),
260
+ ),
261
+ array(
262
+ 'id' => 'wpcp_preloader',
263
+ 'type' => 'switcher',
264
+ 'title' => __( 'Preloader', 'wp-carousel-pro' ),
265
+ 'subtitle' => __( 'Carousel will be hidden until page load completed.', 'wp-carousel-pro' ),
266
+ 'default' => true,
267
+ ),
268
+ ), // Fields array end.
269
+ )
270
+ ); // End of Upload section.
271
+
272
+ //
273
+ // Carousel settings section begin.
274
+ //
275
+ SP_WPCF::createSection(
276
+ $wpcp_carousel_shortcode_settings,
277
+ array(
278
+ 'title' => __( 'Carousel Settings', 'wp-carousel-pro' ),
279
+ 'icon' => 'fa fa-sliders',
280
+ 'fields' => array(
281
+ array(
282
+ 'id' => 'wpcp_carousel_auto_play',
283
+ 'type' => 'switcher',
284
+ 'title' => __( 'AutoPlay', 'wp-carousel-pro' ),
285
+ 'subtitle' => __( 'On/Off auto play.', 'wp-carousel-pro' ),
286
+ 'default' => true,
287
+ ),
288
+ array(
289
+ 'id' => 'carousel_auto_play_speed',
290
+ 'type' => 'spacing',
291
+ 'title' => __( 'AutoPlay Speed', 'wp-carousel-pro' ),
292
+ 'subtitle' => __( 'Set auto play speed. Default value is 3000 milliseconds.', 'wp-carousel-pro' ),
293
+ 'all' => true,
294
+ 'all_text' => false,
295
+ 'all_placeholder' => 'speed',
296
+ 'default' => array(
297
+ 'all' => '3000',
298
+ ),
299
+ 'units' => array(
300
+ 'ms',
301
+ ),
302
+ 'attributes' => array(
303
+ 'min' => 0,
304
+ ),
305
+ 'dependency' => array(
306
+ 'wpcp_carousel_auto_play',
307
+ '==',
308
+ 'true',
309
+ ),
310
+ ),
311
+ array(
312
+ 'id' => 'standard_carousel_scroll_speed',
313
+ 'type' => 'spacing',
314
+ 'title' => __( 'Pagination Speed', 'wp-carousel-pro' ),
315
+ 'subtitle' => __( 'Set pagination/slide scroll speed. Default value is 600 milliseconds.', 'wp-carousel-pro' ),
316
+ 'all' => true,
317
+ 'all_text' => false,
318
+ 'all_placeholder' => 'speed',
319
+ 'default' => array(
320
+ 'all' => '600',
321
+ ),
322
+ 'units' => array(
323
+ 'ms',
324
+ ),
325
+ 'attributes' => array(
326
+ 'min' => 0,
327
+ ),
328
+ ),
329
+
330
+ array(
331
+ 'id' => 'carousel_pause_on_hover',
332
+ 'type' => 'switcher',
333
+ 'title' => __( 'Pause on Hover', 'wp-carousel-pro' ),
334
+ 'subtitle' => __( 'On/Off carousel pause on hover.', 'wp-carousel-pro' ),
335
+ 'default' => true,
336
+ ),
337
+ array(
338
+ 'id' => 'carousel_infinite',
339
+ 'type' => 'switcher',
340
+ 'title' => __( 'Infinite Loop', 'wp-carousel-pro' ),
341
+ 'subtitle' => __( 'On/Off infinite loop mode.', 'wp-carousel-pro' ),
342
+ 'default' => true,
343
+ ),
344
+ array(
345
+ 'type' => 'subheading',
346
+ 'content' => __( 'Navigation Settings', 'wp-carousel-pro' ),
347
+ ),
348
+ // Navigation Settings.
349
+ array(
350
+ 'id' => 'wpcp_navigation',
351
+ 'type' => 'button_set',
352
+ 'title' => __( 'Navigation', 'wp-carousel-pro' ),
353
+ 'subtitle' => __( 'Show/Hide carousel navigation.', 'wp-carousel-pro' ),
354
+ 'options' => array(
355
+ 'show' => __( 'Show', 'wp-carousel-pro' ),
356
+ 'hide' => __( 'Hide', 'wp-carousel-pro' ),
357
+ 'hide_mobile' => __( 'Hide on Mobile', 'wp-carousel-pro' ),
358
+ ),
359
+ 'radio' => true,
360
+ 'default' => 'hide_mobile',
361
+ 'attributes' => array(
362
+ 'data-depend-id' => 'wpcp_navigation',
363
+ ),
364
+ ),
365
+
366
+ array(
367
+ 'id' => 'wpcp_nav_colors',
368
+ 'type' => 'color_group',
369
+ 'title' => __( 'Navigation Color', 'wp-carousel-pro' ),
370
+ 'subtitle' => __( 'Set color for the carousel navigation.', 'wp-carousel-pro' ),
371
+ 'options' => array(
372
+ 'color1' => __( 'Color', 'wp-carousel-pro' ),
373
+ 'color2' => __( 'Hover Color', 'wp-carousel-pro' ),
374
+ ),
375
+ 'default' => array(
376
+ 'color1' => '#aaa',
377
+ 'color2' => '#52b3d9',
378
+ ),
379
+ 'dependency' => array(
380
+ 'wpcp_navigation',
381
+ '!=',
382
+ 'hide',
383
+ ),
384
+ ),
385
+ // Pagination Settings.
386
+ array(
387
+ 'type' => 'subheading',
388
+ 'content' => __( 'Pagination Settings', 'wp-carousel-pro' ),
389
+ ),
390
+ array(
391
+ 'id' => 'wpcp_pagination',
392
+ 'type' => 'button_set',
393
+ 'title' => __( 'Pagination', 'wp-carousel-pro' ),
394
+ 'subtitle' => __( 'Show/Hide carousel pagination.', 'wp-carousel-pro' ),
395
+ 'options' => array(
396
+ 'show' => __( 'Show', 'wp-carousel-pro' ),
397
+ 'hide' => __( 'Hide', 'wp-carousel-pro' ),
398
+ 'hide_mobile' => __( 'Hide on Mobile', 'wp-carousel-pro' ),
399
+ ),
400
+ 'radio' => true,
401
+ 'default' => 'show',
402
+ 'attributes' => array(
403
+ 'data-depend-id' => 'wpcp_pagination',
404
+ ),
405
+ ),
406
+ array(
407
+ 'id' => 'wpcp_pagination_color',
408
+ 'type' => 'color_group',
409
+ 'title' => __( 'Pagination Color', 'wp-carousel-pro' ),
410
+ 'subtitle' => __( 'Set color for the carousel pagination dots.', 'wp-carousel-pro' ),
411
+ 'options' => array(
412
+ 'color1' => __( 'Color', 'wp-carousel-pro' ),
413
+ 'color2' => __( 'Active Color', 'wp-carousel-pro' ),
414
+ ),
415
+ 'default' => array(
416
+ 'color1' => '#cccccc',
417
+ 'color2' => '#52b3d9',
418
+ ),
419
+ 'dependency' => array( 'wpcp_pagination', '!=', 'hide' ),
420
+ ),
421
+
422
+ // Miscellaneous Settings.
423
+ array(
424
+ 'type' => 'subheading',
425
+ 'content' => __( 'Misc. Settings', 'wp-carousel-pro' ),
426
+ ),
427
+
428
+ array(
429
+ 'id' => 'wpcp_accessibility',
430
+ 'type' => 'switcher',
431
+ 'title' => __( 'Tab and Key Navigation', 'wp-carousel-pro' ),
432
+ 'subtitle' => __( 'Enable/Disable carousel scroll with tab and keyboard.', 'wp-carousel-pro' ),
433
+ 'default' => true,
434
+ ),
435
+ array(
436
+ 'id' => 'slider_swipe',
437
+ 'type' => 'switcher',
438
+ 'title' => __( 'Touch Swipe', 'wp-carousel-pro' ),
439
+ 'subtitle' => __( 'On/Off touch swipe mode.', 'wp-carousel-pro' ),
440
+ 'default' => true,
441
+ ),
442
+ array(
443
+ 'id' => 'slider_draggable',
444
+ 'type' => 'switcher',
445
+ 'title' => __( 'Mouse Draggable', 'wp-carousel-pro' ),
446
+ 'subtitle' => __( 'On/Off mouse draggable mode.', 'wp-carousel-pro' ),
447
+ 'default' => true,
448
+ 'dependency' => array(
449
+ 'slider_swipe',
450
+ '==',
451
+ 'true',
452
+ ),
453
+ ),
454
+ ),
455
+ )
456
+ ); // Carousel settings section end.
457
+
458
+ //
459
+ // Style settings section begin.
460
+ //
461
+ SP_WPCF::createSection(
462
+ $wpcp_carousel_shortcode_settings,
463
+ array(
464
+ 'title' => __( 'Style Settings', 'wp-carousel-pro' ),
465
+ 'icon' => 'fa fa-paint-brush',
466
+ 'fields' => array(
467
+
468
+ array(
469
+ 'id' => 'wpcp_post_detail_position',
470
+ 'type' => 'selectf',
471
+ 'title' => __( 'Content Position', 'wp-carousel-pro' ),
472
+ 'subtitle' => __( 'Select a position for the title, content, meta etc.', 'wp-carousel-pro' ),
473
+ 'options' => array(
474
+ 'bottom' => array(
475
+ 'text' => __( 'Bottom', 'wp-carousel-free' ),
476
+ ),
477
+ 'on_right' => array(
478
+ 'text' => __( 'Right (Pro)', 'wp-carousel-pro' ),
479
+ 'pro_only' => true,
480
+ ),
481
+ 'on_left' => array(
482
+ 'text' => __( 'Left (Pro)', 'wp-carousel-pro' ),
483
+ 'pro_only' => true,
484
+ ),
485
+ 'with_overlay' => array(
486
+ 'text' => __( 'Overlay (Pro)', 'wp-carousel-pro' ),
487
+ 'pro_only' => true,
488
+ ),
489
+ ),
490
+ 'default' => 'bottom',
491
+ 'dependency' => array( 'wpcp_carousel_type', 'any', 'image-carousel,post-carousel,product-carousel', true ),
492
+ ),
493
+
494
+ array(
495
+ 'id' => 'wpcp_slide_border',
496
+ 'type' => 'border',
497
+ 'title' => __( 'Slide Border', 'wp-carousel-pro' ),
498
+ 'subtitle' => __( 'Set border for the slide.', 'wp-carousel-pro' ),
499
+ 'all' => true,
500
+ 'default' => array(
501
+ 'all' => '1',
502
+ 'style' => 'solid',
503
+ 'color' => '#dddddd',
504
+ ),
505
+ 'dependency' => array( 'wpcp_carousel_type', '!=', 'product-carousel' ),
506
+ ),
507
+
508
+ array(
509
+ 'id' => 'wpcp_slide_background',
510
+ 'type' => 'color',
511
+ 'title' => __( 'Slide Background', 'wp-carousel-pro' ),
512
+ 'subtitle' => __( 'Set background color for the slide.', 'wp-carousel-pro' ),
513
+ 'default' => '#f9f9f9',
514
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
515
+ ),
516
+
517
+ // Post Settings.
518
+ array(
519
+ 'id' => 'wpcp_post_title',
520
+ 'type' => 'switcher',
521
+ 'title' => __( 'Post Title', 'wp-carousel-pro' ),
522
+ 'subtitle' => __( 'Show/Hide post title.', 'wp-carousel-pro' ),
523
+ 'text_on' => __( 'Show', 'wp-carousel-pro' ),
524
+ 'text_off' => __( 'Hide', 'wp-carousel-pro' ),
525
+ 'text_width' => 77,
526
+ 'default' => true,
527
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
528
+ ),
529
+
530
+ array(
531
+ 'id' => 'wpcp_post_content_show',
532
+ 'type' => 'switcher',
533
+ 'title' => __( 'Post Content', 'wp-carousel-pro' ),
534
+ 'subtitle' => __( 'Show/Hide post content.', 'wp-carousel-pro' ),
535
+ 'text_on' => __( 'Show', 'wp-carousel-pro' ),
536
+ 'text_off' => __( 'Hide', 'wp-carousel-pro' ),
537
+ 'text_width' => 77,
538
+ 'default' => true,
539
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
540
+ ),
541
+ array(
542
+ 'id' => 'wpcp_post_content_type',
543
+ 'type' => 'selectf',
544
+ 'title' => __( 'Content Display Type', 'wp-carousel-pro' ),
545
+ 'subtitle' => __( 'Select a content display type.', 'wp-carousel-pro' ),
546
+ 'options' => array(
547
+ 'excerpt' => array(
548
+ 'text' => __( 'Excerpt', 'wp-carousel-pro' ),
549
+ ),
550
+ 'content' => array(
551
+ 'text' => __( 'Full Content (Pro)', 'wp-carousel-pro' ),
552
+ 'pro_only' => true,
553
+ ),
554
+ 'content_with_limit' => array(
555
+ 'text' => __( 'Content with Limit (Pro)', 'wp-carousel-pro' ),
556
+ 'pro_only' => true,
557
+ ),
558
+ ),
559
+ 'default' => 'excerpt',
560
+ 'dependency' => array( 'wpcp_carousel_type|wpcp_post_content_show', '==|==', 'post-carousel|true' ),
561
+ ),
562
+
563
+ array(
564
+ 'type' => 'subheading',
565
+ 'content' => __( 'Post Meta', 'wp-carousel-pro' ),
566
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
567
+ ),
568
+
569
+ array(
570
+ 'id' => 'wpcp_post_date_show',
571
+ 'type' => 'switcher',
572
+ 'title' => __( 'Post Date', 'wp-carousel-pro' ),
573
+ 'subtitle' => __( 'Show/Hide post date.', 'wp-carousel-pro' ),
574
+ 'text_on' => __( 'Show', 'wp-carousel-pro' ),
575
+ 'text_off' => __( 'Hide', 'wp-carousel-pro' ),
576
+ 'text_width' => 77,
577
+ 'default' => true,
578
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
579
+ ),
580
+ array(
581
+ 'id' => 'wpcp_post_author_show',
582
+ 'type' => 'switcher',
583
+ 'title' => __( 'Post Author', 'wp-carousel-pro' ),
584
+ 'subtitle' => __( 'Show/Hide post author name.', 'wp-carousel-pro' ),
585
+ 'text_on' => __( 'Show', 'wp-carousel-pro' ),
586
+ 'text_off' => __( 'Hide', 'wp-carousel-pro' ),
587
+ 'text_width' => 77,
588
+ 'default' => true,
589
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
590
+ ),
591
+
592
+ // Product Settings.
593
+ array(
594
+ 'type' => 'subheading',
595
+ 'content' => __( 'Product Settings', 'wp-carousel-pro' ),
596
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
597
+ ),
598
+ array(
599
+ 'id' => 'wpcp_product_name',
600
+ 'type' => 'switcher',
601
+ 'title' => __( 'Product Name', 'wp-carousel-pro' ),
602
+ 'subtitle' => __( 'Show/Hide product name.', 'wp-carousel-pro' ),
603
+ 'text_on' => __( 'Show', 'wp-carousel-pro' ),
604
+ 'text_off' => __( 'Hide', 'wp-carousel-pro' ),
605
+ 'text_width' => 77,
606
+ 'default' => true,
607
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
608
+ ),
609
+ array(
610
+ 'id' => 'wpcp_product_price',
611
+ 'type' => 'switcher',
612
+ 'title' => __( 'Product Price', 'wp-carousel-pro' ),
613
+ 'subtitle' => __( 'Show/Hide product price.', 'wp-carousel-pro' ),
614
+ 'text_on' => __( 'Show', 'wp-carousel-pro' ),
615
+ 'text_off' => __( 'Hide', 'wp-carousel-pro' ),
616
+ 'text_width' => 77,
617
+ 'default' => true,
618
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
619
+ ),
620
+ array(
621
+ 'id' => 'wpcp_product_rating',
622
+ 'type' => 'switcher',
623
+ 'title' => __( 'Product Rating', 'wp-carousel-pro' ),
624
+ 'subtitle' => __( 'Show/Hide product rating.', 'wp-carousel-pro' ),
625
+ 'text_on' => __( 'Show', 'wp-carousel-pro' ),
626
+ 'text_off' => __( 'Hide', 'wp-carousel-pro' ),
627
+ 'text_width' => 77,
628
+ 'default' => true,
629
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
630
+ ),
631
+ array(
632
+ 'id' => 'wpcp_product_cart',
633
+ 'type' => 'switcher',
634
+ 'title' => __( 'Add to Cart Button', 'wp-carousel-pro' ),
635
+ 'subtitle' => __( 'Show/Hide add to cart button.', 'wp-carousel-pro' ),
636
+ 'text_on' => __( 'Show', 'wp-carousel-pro' ),
637
+ 'text_off' => __( 'Hide', 'wp-carousel-pro' ),
638
+ 'text_width' => 77,
639
+ 'default' => true,
640
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
641
+ ),
642
+ // Image Settings.
643
+ array(
644
+ 'type' => 'subheading',
645
+ 'content' => __( 'Image Settings', 'wp-carousel-pro' ),
646
+ ),
647
+ array(
648
+ 'id' => 'show_image',
649
+ 'type' => 'switcher',
650
+ 'title' => __( 'Image', 'wp-carousel-pro' ),
651
+ 'subtitle' => __( 'Show/Hide slide image.', 'wp-carousel-pro' ),
652
+ 'text_on' => __( 'Show', 'wp-carousel-pro' ),
653
+ 'text_off' => __( 'Hide', 'wp-carousel-pro' ),
654
+ 'text_width' => 77,
655
+ 'default' => true,
656
+ 'dependency' => array( 'wpcp_carousel_type', 'any', 'post-carousel,product-carousel' ),
657
+ ),
658
+ array(
659
+ 'id' => 'wpcp_image_sizes',
660
+ 'type' => 'image_sizes',
661
+ 'chosen' => true,
662
+ 'title' => __( 'Image Sizes', 'wp-carousel-pro' ),
663
+ 'default' => 'full',
664
+ 'subtitle' => __( 'Select a image size.', 'wp-carousel-pro' ),
665
+ 'dependency' => array( 'wpcp_carousel_type|show_image', 'any|==', 'image-carousel,post-carousel,product-carousel|true' ),
666
+ ),
667
+ array(
668
+ 'id' => 'wpcp_product_image_border',
669
+ 'type' => 'border',
670
+ 'title' => __( 'Image Border', 'wp-carousel-pro' ),
671
+ 'subtitle' => __( 'Set border for the product image.', 'wp-carousel-pro' ),
672
+ 'all' => true,
673
+ 'default' => array(
674
+ 'all' => '1',
675
+ 'style' => 'solid',
676
+ 'color' => '#dddddd',
677
+ ),
678
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'product-carousel' ),
679
+ ),
680
+ array(
681
+ 'id' => '_image_title_attr',
682
+ 'type' => 'checkbox',
683
+ 'title' => __( 'Image Title Attribute', 'wp-carousel-pro' ),
684
+ 'subtitle' => __( 'Check to add image title attribute.', 'wp-carousel-pro' ),
685
+ 'default' => false,
686
+ 'dependency' => array( 'wpcp_carousel_type|show_image', 'any|==', 'image-carousel,post-carousel,product-carousel|true' ),
687
+ ),
688
+ ), // End of fields array.
689
+ )
690
+ ); // Style settings section end.
691
+
692
+
693
+ //
694
+ // Typography section begin.
695
+ //
696
+ SP_WPCF::createSection(
697
+ $wpcp_carousel_shortcode_settings,
698
+ array(
699
+ 'title' => __( 'Typography', 'wp-carousel-pro' ),
700
+ 'icon' => 'fa fa-font',
701
+ 'enqueue_webfont' => false,
702
+ 'fields' => array(
703
+ array(
704
+ 'type' => 'notice',
705
+ 'style' => 'normal',
706
+ 'content' => __( 'The Following Typography (840+ Google Fonts) options are available in the <a href="https://shapedplugin.com/plugin/wordpress-carousel-pro/" target="_blank">Pro Version</a> only.', 'wp-carousel-free' ),
707
+ ),
708
+ array(
709
+ 'id' => 'section_title_font_load',
710
+ 'type' => 'switcherf',
711
+ 'title' => __( 'Load Carousel Section Title Font', 'wp-carousel-pro' ),
712
+ 'subtitle' => __( 'On/Off google font for the carousel section title.', 'wp-carousel-pro' ),
713
+ 'default' => false,
714
+ ),
715
+ array(
716
+ 'id' => 'wpcp_section_title_typography',
717
+ 'type' => 'typography',
718
+ 'title' => __( 'Carousel Section Title Font', 'wp-carousel-pro' ),
719
+ 'subtitle' => __( 'Set Carousel section title font properties.', 'wp-carousel-pro' ),
720
+ 'default' => array(
721
+ 'color' => '#444444',
722
+ 'font-family' => 'Open Sans',
723
+ 'font-weight' => '600',
724
+ 'font-size' => '24',
725
+ 'line-height' => '28',
726
+ 'letter-spacing' => '0',
727
+ 'text-align' => 'center',
728
+ 'text-transform' => 'none',
729
+ 'type' => 'google',
730
+ 'unit' => 'px',
731
+ ),
732
+ 'preview' => 'always',
733
+ 'preview_text' => 'Carousel Section Title',
734
+ ),
735
+ array(
736
+ 'id' => 'wpcp_image_caption_font_load',
737
+ 'type' => 'switcherf',
738
+ 'title' => __( 'Load Caption Font', 'wp-carousel-pro' ),
739
+ 'subtitle' => __( 'On/Off google font for the image caption.', 'wp-carousel-pro' ),
740
+ 'default' => false,
741
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'image-carousel' ),
742
+ ),
743
+ array(
744
+ 'id' => 'wpcp_image_caption_typography',
745
+ 'type' => 'typography',
746
+ 'title' => __( 'Caption Font', 'wp-carousel-pro' ),
747
+ 'subtitle' => __( 'Set caption font properties.', 'wp-carousel-pro' ),
748
+ 'default' => array(
749
+ 'color' => '#333',
750
+ 'font-family' => 'Open Sans',
751
+ 'font-weight' => '600',
752
+ 'font-size' => '15',
753
+ 'line-height' => '23',
754
+ 'letter-spacing' => '0',
755
+ 'text-align' => 'center',
756
+ 'text-transform' => 'capitalize',
757
+ 'type' => 'google',
758
+ ),
759
+ 'preview_text' => 'The image caption',
760
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'image-carousel', true ),
761
+ ),
762
+ array(
763
+ 'id' => 'wpcp_image_desc_font_load',
764
+ 'type' => 'switcherf',
765
+ 'title' => __( 'Load Description Font', 'wp-carousel-pro' ),
766
+ 'subtitle' => __( 'On/Off google font for the image description.', 'wp-carousel-pro' ),
767
+ 'default' => false,
768
+ 'dependency' => array( 'wpcp_carousel_type|wpcp_post_title', '==|==', 'image-carousel|true' ),
769
+ ),
770
+ array(
771
+ 'id' => 'wpcp_image_desc_typography',
772
+ 'type' => 'typography',
773
+ 'title' => __( 'Description Font', 'wp-carousel-pro' ),
774
+ 'subtitle' => __( 'Set description font properties.', 'wp-carousel-pro' ),
775
+ 'default' => array(
776
+ 'color' => '#333',
777
+ 'font-family' => 'Open Sans',
778
+ 'font-weight' => '400',
779
+ 'font-style' => 'normal',
780
+ 'font-size' => '14',
781
+ 'line-height' => '21',
782
+ 'letter-spacing' => '0',
783
+ 'text-align' => 'center',
784
+ 'type' => 'google',
785
+ ),
786
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'image-carousel' ),
787
+ ),
788
+ // Post Typography.
789
+ array(
790
+ 'id' => 'wpcp_title_font_load',
791
+ 'type' => 'switcherf',
792
+ 'title' => __( 'Load Title Font', 'wp-carousel-pro' ),
793
+ 'subtitle' => __( 'On/Off google font for the slide title.', 'wp-carousel-pro' ),
794
+ 'default' => false,
795
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
796
+ ),
797
+ array(
798
+ 'id' => 'wpcp_title_typography',
799
+ 'type' => 'typography',
800
+ 'title' => __( 'Post Title Font', 'wp-carousel-pro' ),
801
+ 'subtitle' => __( 'Set title font properties.', 'wp-carousel-pro' ),
802
+ 'default' => array(
803
+ 'color' => '#444',
804
+ 'hover_color' => '#555',
805
+ 'font-family' => 'Open Sans',
806
+ 'font-style' => '600',
807
+ 'font-size' => '20',
808
+ 'line-height' => '30',
809
+ 'letter-spacing' => '0',
810
+ 'text-align' => 'center',
811
+ 'text-transform' => 'capitalize',
812
+ 'type' => 'google',
813
+ ),
814
+ 'hover_color' => true,
815
+ 'preview_text' => 'The Post Title',
816
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
817
+ ),
818
+
819
+ array(
820
+ 'id' => 'wpcp_post_content_font_load',
821
+ 'type' => 'switcherf',
822
+ 'title' => __( 'Post Content Font Load', 'wp-carousel-pro' ),
823
+ 'subtitle' => __( 'On/Off google font for post the content.', 'wp-carousel-pro' ),
824
+ 'default' => false,
825
+ 'dependency' => array(
826
+ 'wpcp_carousel_type',
827
+ '==',
828
+ 'post-carousel',
829
+ ),
830
+ ),
831
+ array(
832
+ 'id' => 'wpcp_post_content_typography',
833
+ 'type' => 'typography',
834
+ 'title' => __( 'Post Content Font', 'wp-carousel-pro' ),
835
+ 'subtitle' => __( 'Set post content font properties.', 'wp-carousel-pro' ),
836
+ 'default' => array(
837
+ 'color' => '#333',
838
+ 'font-family' => 'Open Sans',
839
+ 'font-style' => '400',
840
+ 'font-size' => '16',
841
+ 'line-height' => '26',
842
+ 'letter-spacing' => '0',
843
+ 'text-align' => 'center',
844
+ 'type' => 'google',
845
+ ),
846
+ 'dependency' => array( 'wpcp_carousel_type', '==', 'post-carousel' ),
847
+ ),
848
+ array(
849
+ 'id' => 'wpcp_post_meta_font_load',
850
+ 'type' => 'switcherf',
851
+ 'title' => __( 'Post Meta Font Load', 'wp-carousel-pro' ),
852
+ 'subtitle' => __( 'On/Off google font for the post meta.', 'wp-carousel-pro' ),
853
+ 'default' => false,
854
+ 'dependency' => array(
855
+ 'wpcp_carousel_type',
856
+ '==',
857
+ 'post-carousel',
858
+ ),
859
+ ),
860
+ array(
861
+ 'id' => 'wpcp_post_meta_typography',
862
+ 'type' => 'typography',
863
+ 'title' => __( 'Post Meta Font', 'wp-carousel-pro' ),
864
+ 'subtitle' => __( 'Set post meta font properties.', 'wp-carousel-pro' ),
865
+ 'default' => array(
866
+ 'color' => '#999',
867
+ 'font-family' => 'Open Sans',
868
+ 'font-style' => '400',
869
+ 'font-size' => '14',
870
+ 'line-height' => '24',
871
+ 'letter-spacing' => '0',
872
+ 'text-align' => 'center',
873
+ 'type' => 'google',
874
+ ),
875
+ 'preview_text' => 'Post Meta', // Replace preview text with any text you like.
876
+ 'dependency' => array(
877
+ 'wpcp_carousel_type',
878
+ '==',
879
+ 'post-carousel',
880
+ ),
881
+ ),
882
+
883
+ // // Product Typography.
884
+ array(
885
+ 'id' => 'wpcp_product_name_font_load',
886
+ 'type' => 'switcherf',
887
+ 'title' => __( 'Product Name Font Load', 'wp-carousel-pro' ),
888
+ 'subtitle' => __( 'On/Off google font for the product name.', 'wp-carousel-pro' ),
889
+ 'default' => false,
890
+ 'dependency' => array(
891
+ 'wpcp_carousel_type',
892
+ '==',
893
+ 'product-carousel',
894
+ ),
895
+ ),
896
+ array(
897
+ 'id' => 'wpcp_product_name_typography',
898
+ 'type' => 'typography',
899
+ 'title' => __( 'Product Name Font', 'wp-carousel-pro' ),
900
+ 'subtitle' => __( 'Set product name font properties.', 'wp-carousel-pro' ),
901
+ 'default' => array(
902
+ 'color' => '#444',
903
+ 'hover_color' => '#555',
904
+ 'font-family' => 'Open Sans',
905
+ 'font-style' => '400',
906
+ 'font-size' => '15',
907
+ 'line-height' => '23',
908
+ 'letter-spacing' => '0',
909
+ 'text-align' => 'center',
910
+ 'type' => 'google',
911
+ ),
912
+ 'hover_color' => true,
913
+ 'preview_text' => 'Product Name', // Replace preview text.
914
+ 'dependency' => array(
915
+ 'wpcp_carousel_type',
916
+ '==',
917
+ 'product-carousel',
918
+ ),
919
+ ),
920
+ array(
921
+ 'id' => 'wpcp_product_price_font_load',
922
+ 'type' => 'switcherf',
923
+ 'title' => __( 'Product Price Font Load', 'wp-carousel-pro' ),
924
+ 'subtitle' => __( 'On/Off google font for the product price.', 'wp-carousel-pro' ),
925
+ 'default' => false,
926
+ 'dependency' => array(
927
+ 'wpcp_carousel_type',
928
+ '==',
929
+ 'product-carousel',
930
+ ),
931
+ ),
932
+ array(
933
+ 'id' => 'wpcp_product_price_typography',
934
+ 'type' => 'typography',
935
+ 'title' => __( 'Product Price Font', 'wp-carousel-pro' ),
936
+ 'subtitle' => __( 'Set product price font properties.', 'wp-carousel-pro' ),
937
+ 'default' => array(
938
+ 'color' => '#222',
939
+ 'font-family' => 'Open Sans',
940
+ 'font-style' => '700',
941
+ 'font-size' => '14',
942
+ 'line-height' => '26',
943
+ 'letter-spacing' => '0',
944
+ 'text-align' => 'center',
945
+ 'type' => 'google',
946
+ ),
947
+ 'preview_text' => '$49.00', // Replace preview text with any text you like.
948
+ 'dependency' => array(
949
+ 'wpcp_carousel_type',
950
+ '==',
951
+ 'product-carousel',
952
+ ),
953
+ ),
954
+ ), // End of fields array.
955
+ )
956
+ ); // Style settings section end.
957
+
958
+
959
+ //
960
+ // Metabox of the footer section / shortocde section.
961
+ // Set a unique slug-like ID.
962
+ //
963
+ $wpcp_display_shortcode = 'sp_wpcp_display_shortcode';
964
+
965
+ //
966
+ // Create a metabox.
967
+ //
968
+ SP_WPCF::createMetabox(
969
+ $wpcp_display_shortcode,
970
+ array(
971
+ 'title' => __( 'WordPress Carousel Pro', 'wp-carousel-pro' ),
972
+ 'post_type' => 'sp_wp_carousel',
973
+ 'show_restore' => false,
974
+ )
975
+ );
976
+
977
+ //
978
+ // Create a section.
979
+ //
980
+ SP_WPCF::createSection(
981
+ $wpcp_display_shortcode,
982
+ array(
983
+ 'fields' => array(
984
+ array(
985
+ 'type' => 'shortcode',
986
+ 'class' => 'wpcp-admin-footer',
987
+ ),
988
+ ),
989
+ )
990
+ );
admin/views/option-config.php ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+
4
+ //
5
+ // Set a unique slug-like ID
6
+ //
7
+ $prefix = 'sp_wpcp_settings';
8
+
9
+ //
10
+ // Create options
11
+ //
12
+ SP_WPCF::createOptions(
13
+ $prefix,
14
+ array(
15
+ 'menu_title' => __( 'Settings', 'wp-carousel-pro' ),
16
+ 'menu_slug' => 'wpcp_settings',
17
+ 'menu_parent' => 'edit.php?post_type=sp_wp_carousel',
18
+ 'menu_type' => 'submenu',
19
+ 'ajax_save' => true,
20
+ 'save_defaults' => true,
21
+ 'show_reset_all' => true,
22
+ 'framework_title' => __( 'WordPress Carousel Pro', 'wp-carousel-pro' ),
23
+ 'framework_class' => 'sp-wpcp-options',
24
+ 'theme' => 'light',
25
+ // menu extras.
26
+ 'show_bar_menu' => false,
27
+ 'show_sub_menu' => false,
28
+ 'show_network_menu' => false,
29
+ 'show_in_customizer' => false,
30
+ 'show_search' => false,
31
+ // 'show_reset_all' => true,
32
+ 'show_reset_section' => true,
33
+ 'show_all_options' => false,
34
+ )
35
+ );
36
+
37
+ //
38
+ // Create a section
39
+ //
40
+ SP_WPCF::createSection(
41
+ $prefix,
42
+ array(
43
+ 'title' => 'Advanced Settings',
44
+ 'icon' => 'fa fa-cogs',
45
+ 'fields' => array(
46
+ array(
47
+ 'id' => 'wpcf_delete_all_data',
48
+ 'type' => 'checkbox',
49
+ 'title' => __( 'Remove Data when Uninstall', 'wp-carousel-pro' ),
50
+ 'subtitle' => __( 'Check to remove plugin\'s data when plugin is uninstalled or deleted.', 'wp-carousel-pro' ),
51
+ 'default' => false,
52
+ ),
53
+ array(
54
+ 'type' => 'subheading',
55
+ 'content' => __( 'Enqueue or Dequeue CSS', 'wp-carousel-pro' ),
56
+ ),
57
+ array(
58
+ 'id' => 'wpcp_enqueue_slick_css',
59
+ 'type' => 'switcher',
60
+ 'title' => __( 'Slick CSS', 'wp-carousel-pro' ),
61
+ 'subtitle' => __( 'Enqueue/Dequeue slick CSS.', 'wp-carousel-pro' ),
62
+ 'text_on' => __( 'Enqueue', 'wp-carousel-pro' ),
63
+ 'text_off' => __( 'Dequeue', 'wp-carousel-pro' ),
64
+ 'text_width' => 95,
65
+ 'default' => true,
66
+ ),
67
+ array(
68
+ 'id' => 'wpcp_enqueue_fa_css',
69
+ 'type' => 'switcher',
70
+ 'title' => __( 'Font Awesome CSS', 'wp-carousel-pro' ),
71
+ 'subtitle' => __( 'Enqueue/Dequeue font awesome CSS.', 'wp-carousel-pro' ),
72
+ 'text_on' => __( 'Enqueue', 'wp-carousel-pro' ),
73
+ 'text_off' => __( 'Dequeue', 'wp-carousel-pro' ),
74
+ 'text_width' => 95,
75
+ 'default' => true,
76
+ ),
77
+ array(
78
+ 'type' => 'subheading',
79
+ 'content' => __( 'Enqueue or Dequeue JS', 'wp-carousel-pro' ),
80
+ ),
81
+ array(
82
+ 'id' => 'wpcp_preloader_js',
83
+ 'type' => 'switcher',
84
+ 'title' => __( 'Preloader JS', 'wp-carousel-pro' ),
85
+ 'subtitle' => __( 'Enqueue/Dequeue carousel preloader JS.', 'wp-carousel-pro' ),
86
+ 'text_on' => __( 'Enqueue', 'wp-carousel-pro' ),
87
+ 'text_off' => __( 'Dequeue', 'wp-carousel-pro' ),
88
+ 'text_width' => 95,
89
+ 'default' => true,
90
+ ),
91
+ array(
92
+ 'id' => 'wpcp_slick_js',
93
+ 'type' => 'switcher',
94
+ 'title' => __( 'Slick JS', 'wp-carousel-pro' ),
95
+ 'subtitle' => __( 'Enqueue/Dequeue slick JS.', 'wp-carousel-pro' ),
96
+ 'text_on' => __( 'Enqueue', 'wp-carousel-pro' ),
97
+ 'text_off' => __( 'Dequeue', 'wp-carousel-pro' ),
98
+ 'text_width' => 95,
99
+ 'default' => true,
100
+ ),
101
+ ),
102
+ )
103
+ );
104
+
105
+ //
106
+ // Custom CSS Fields
107
+ //
108
+ SP_WPCF::createSection(
109
+ $prefix,
110
+ array(
111
+ 'id' => 'custom_css_section',
112
+ 'title' => __( 'Custom CSS', 'wp-carousel-pro' ),
113
+ 'icon' => 'fa fa-css3',
114
+ 'fields' => array(
115
+ array(
116
+ 'id' => 'wpcp_custom_css',
117
+ 'type' => 'code_editor',
118
+ 'title' => __( 'Custom CSS', 'wp-carousel-pro' ),
119
+ 'subtitle' => __( 'Type your css.', 'wp-carousel-pro' ),
120
+ 'settings' => array(
121
+ 'mode' => 'css',
122
+ 'theme' => 'monokai',
123
+ ),
124
+ ),
125
+ ),
126
+ )
127
+ );
128
+
129
+
admin/views/premium.php CHANGED
@@ -255,7 +255,7 @@ class WP_Carousel_Free_Upgrade {
255
  </div>
256
  <hr>
257
  <div class="sp-wpcp-join-community text-center">
258
- <h2>Join the <b>12000+</b> Happy Users Worldwide!</h2>
259
  <a class="wpcf-upgrade-btn" target="_blank" href="https://shapedplugin.com/plugin/wordpress-carousel-pro/">Get a license instantly</a>
260
  <p>Every purchase comes with <b>7-day</b> money back guarantee and access to our incredibly Top-notch Support with lightening-fast response time and 100% satisfaction rate. One-Time payment, lifetime automatic update.</p>
261
  </div>
255
  </div>
256
  <hr>
257
  <div class="sp-wpcp-join-community text-center">
258
+ <h2>Join the <b>20000+</b> Happy Users Worldwide!</h2>
259
  <a class="wpcf-upgrade-btn" target="_blank" href="https://shapedplugin.com/plugin/wordpress-carousel-pro/">Get a license instantly</a>
260
  <p>Every purchase comes with <b>7-day</b> money back guarantee and access to our incredibly Top-notch Support with lightening-fast response time and 100% satisfaction rate. One-Time payment, lifetime automatic update.</p>
261
  </div>
admin/views/wpcfree-metabox/assets/css/spf-rtl.css ADDED
@@ -0,0 +1,537 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1 @@
 
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 ADDED
@@ -0,0 +1,4859 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 {
119
+ float: left;
120
+ font-size: 1.5em;
121
+ line-height: 26px;
122
+ font-weight: 400;
123
+ margin: 0;
124
+ }
125
+
126
+ .spf-header-inner h1 small {
127
+ font-size: 11px;
128
+ font-weight: 500;
129
+ }
130
+
131
+ /**
132
+ * 01. 02. Sticky
133
+ */
134
+
135
+ .spf-sticky .spf-header-inner {
136
+ position: fixed;
137
+ z-index: 20;
138
+ top: 32px;
139
+ -moz-box-shadow: 0 5px 25px rgba(0, 0, 0, 0.125);
140
+ -webkit-box-shadow: 0 5px 25px rgba(0, 0, 0, 0.125);
141
+ box-shadow: 0 5px 25px rgba(0, 0, 0, 0.125);
142
+ }
143
+
144
+ /**
145
+ * 01. 03. Header Buttons
146
+ */
147
+
148
+ .spf-buttons {
149
+ float: right;
150
+ -moz-transition: opacity 0.2s;
151
+ -o-transition: opacity 0.2s;
152
+ -webkit-transition: opacity 0.2s;
153
+ transition: opacity 0.2s;
154
+ }
155
+
156
+ .spf-buttons .button {
157
+ margin: 0 2px;
158
+ line-height: 26px;
159
+ }
160
+
161
+ .spf-buttons .button.spf-save,
162
+ .spf-buttons .button.spf-reset-section,
163
+ .spf-buttons .button.spf-reset-all {
164
+ text-shadow: none;
165
+ border: 0;
166
+ border-radius: 0;
167
+ padding: 3px 15px;
168
+ height: auto;
169
+ color: #fff;
170
+ }
171
+
172
+ .spf-buttons .button.spf-save {
173
+ box-shadow: 0 3px 0 #169ca5;
174
+ background-color: #18AFB9;
175
+ }
176
+
177
+ .spf-buttons .button.spf-save:hover {
178
+ box-shadow: 0 3px 0 #1784af;
179
+ background-color: #21a1d4;
180
+ }
181
+ .spf-buttons .button.spf-reset-section {
182
+ box-shadow: 0 3px 0 #ccc;
183
+ background-color: #ddd;
184
+ color: #000;
185
+ }
186
+
187
+ .spf-buttons .button.spf-reset-section:hover {
188
+ box-shadow: 0 3px 0 rgb(197, 197, 197);
189
+ background-color: rgb(214, 212, 212);
190
+ }
191
+
192
+ .spf-buttons .button.spf-reset-all {
193
+ box-shadow: 0 3px 0 #666666;
194
+ background-color: #888888;
195
+ }
196
+
197
+ .spf-buttons .button.spf-reset-all:hover {
198
+ box-shadow: 0 3px 0 #4a4949;
199
+ background-color: #6b6a6a;
200
+ }
201
+
202
+ .spf-header-left {
203
+ float: left;
204
+ }
205
+
206
+ .spf-header-right {
207
+ float: right;
208
+ }
209
+
210
+ /**
211
+ * 01. 04. Navigation
212
+ */
213
+
214
+ .spf-nav {
215
+ display: block;
216
+ width: auto;
217
+ }
218
+
219
+ /* .spf-nav {
220
+ display: block;
221
+ position: relative;
222
+ z-index: 10;
223
+ float: left;
224
+ width: 225px;
225
+ } */
226
+
227
+ .spf-nav ul {
228
+ clear: left;
229
+ margin: 0;
230
+ list-style-type: none;
231
+ }
232
+
233
+ .spf-nav ul li {
234
+ margin-bottom: 0;
235
+ }
236
+
237
+ .spf-nav ul li a {
238
+ font-size: 13px;
239
+ position: relative;
240
+ display: block;
241
+ padding: 14px 12px;
242
+ text-decoration: none;
243
+ -moz-transition: none;
244
+ -o-transition: none;
245
+ -webkit-transition: none;
246
+ transition: none;
247
+ }
248
+
249
+ #spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header .support a,
250
+ .spf-nav ul li a:focus {
251
+ outline: none;
252
+ -moz-box-shadow: none;
253
+ -webkit-box-shadow: none;
254
+ box-shadow: none;
255
+ }
256
+
257
+ .spf-nav ul li .spf-section-active:after {
258
+ content: " ";
259
+ position: absolute;
260
+ right: 0;
261
+ top: 50%;
262
+ height: 0;
263
+ width: 0;
264
+ pointer-events: none;
265
+ border: solid transparent;
266
+ border-right-color: #fff;
267
+ border-width: 4px;
268
+ margin-top: -4px;
269
+ }
270
+
271
+ .spf-nav ul li .spf-arrow:after {
272
+ content: "\f054";
273
+ display: inline-block;
274
+ font-family: "FontAwesome";
275
+ font-size: 9px;
276
+ line-height: 1;
277
+ position: absolute;
278
+ right: 10px;
279
+ top: 50%;
280
+ margin-top: -4px;
281
+ -moz-transform: rotate(0);
282
+ -ms-transform: rotate(0);
283
+ -webkit-transform: rotate(0);
284
+ transform: rotate(0);
285
+ }
286
+
287
+ .spf-nav ul li.spf-tab-active .spf-arrow:after {
288
+ -moz-transform: rotate(90deg);
289
+ -ms-transform: rotate(90deg);
290
+ -webkit-transform: rotate(90deg);
291
+ transform: rotate(90deg);
292
+ }
293
+
294
+ .spf-nav ul li.spf-tab-active ul {
295
+ display: block;
296
+ }
297
+
298
+ .spf-nav ul ul {
299
+ display: none;
300
+ position: relative;
301
+ }
302
+
303
+ .spf-nav ul ul li a {
304
+ font-size: 12px;
305
+ padding: 12px 14px 12px 24px;
306
+ }
307
+
308
+ .spf-nav .fa {
309
+ width: 20px;
310
+ margin-right: 5px;
311
+ font-size: 14px;
312
+ text-align: center;
313
+ }
314
+
315
+ .spf-nav .spf-label-error {
316
+ margin-left: 4px;
317
+ vertical-align: top;
318
+ }
319
+
320
+ /**
321
+ * 01. 05. Wrapper
322
+ */
323
+
324
+ .spf-wrapper {
325
+ position: relative;
326
+ }
327
+
328
+ /**
329
+ * 01. 06. Content
330
+ */
331
+
332
+ .spf-content {
333
+ background-color: #fff;
334
+ -moz-transition: opacity 0.2s;
335
+ -o-transition: opacity 0.2s;
336
+ -webkit-transition: opacity 0.2s;
337
+ transition: opacity 0.2s;
338
+ }
339
+
340
+ /**
341
+ * 01. 07. Section
342
+ */
343
+
344
+ .spf-sections {
345
+ float: left;
346
+ width: 100%;
347
+ }
348
+
349
+ .spf-section {
350
+ display: none;
351
+ }
352
+
353
+ .spf-section-title {
354
+ display: none;
355
+ padding: 20px 30px;
356
+ /* background-color: #f5f5f5; */
357
+ background-color: #18AFB9;
358
+ border-top: 1px solid #eee;
359
+ border-bottom: 1px solid #eee;
360
+ }
361
+
362
+ .spf-section-title h3 {
363
+ margin: 0;
364
+ padding: 0;
365
+ font-size: 13px;
366
+ font-weight: bold;
367
+ text-transform: uppercase;
368
+ color: #fff;
369
+ }
370
+
371
+ .spf-section-title .fa {
372
+ margin-right: 5px;
373
+ }
374
+
375
+ /*
376
+ WP Carousel Pro Custom CSS.
377
+ */
378
+
379
+ .sp-wpcp-options .spf-nav {
380
+ width: 225px;
381
+ }
382
+
383
+ .sp-wpcp-options .spf-nav {
384
+ display: block;
385
+ position: relative;
386
+ z-index: 10;
387
+ float: left;
388
+ width: 225px;
389
+ }
390
+
391
+ #sp_wpcp_shortcode_options .spf-nav ul li {
392
+ display: inline-block;
393
+ /* custom style */
394
+ }
395
+
396
+ .sp-wpcp-options .spf-nav-background {
397
+ position: absolute;
398
+ top: 0;
399
+ left: 0;
400
+ bottom: 0;
401
+ z-index: 9;
402
+ width: 225px;
403
+ }
404
+
405
+ .sp-wpcp-options .spf-content {
406
+ position: relative;
407
+ margin-left: 225px;
408
+ background-color: #fff;
409
+ -moz-transition: opacity 0.2s;
410
+ -o-transition: opacity 0.2s;
411
+ -webkit-transition: opacity 0.2s;
412
+ transition: opacity 0.2s;
413
+ }
414
+
415
+ /**
416
+ * 01. 08. Footer
417
+ */
418
+
419
+ .spf-footer {
420
+ padding: 20px;
421
+ font-size: 11px;
422
+ }
423
+
424
+ /**
425
+ * 01. 09. Copyright
426
+ */
427
+
428
+ .spf-copyright {
429
+ float: left;
430
+ margin-top: 5px;
431
+ }
432
+
433
+ /**
434
+ * 01. 10. Show All Options
435
+ */
436
+
437
+ .spf-search-all .spf-nav-background,
438
+ .spf-search-all .spf-nav,
439
+ .spf-show-all .spf-nav-background,
440
+ .spf-show-all .spf-nav {
441
+ display: none;
442
+ }
443
+
444
+ .spf-search-all .spf-content,
445
+ .spf-show-all .spf-content {
446
+ margin-left: 0;
447
+ }
448
+
449
+ .spf-search-all .spf-section-title,
450
+ .spf-search-all .spf-section,
451
+ .spf-show-all .spf-section-title,
452
+ .spf-show-all .spf-section {
453
+ display: block !important;
454
+ }
455
+
456
+ .spf-search-all .spf-section-title {
457
+ display: none !important;
458
+ }
459
+
460
+ .spf-expand-all {
461
+ float: left;
462
+ padding: 0 8px;
463
+ margin-right: 4px;
464
+ z-index: 1;
465
+ font-size: 14px;
466
+ line-height: 29px;
467
+ cursor: pointer;
468
+ -webkit-user-select: none;
469
+ user-select: none;
470
+ -moz-border-radius: 2px;
471
+ -webkit-border-radius: 2px;
472
+ border-radius: 2px;
473
+ -moz-transition: all 0.2s;
474
+ -o-transition: all 0.2s;
475
+ -webkit-transition: all 0.2s;
476
+ transition: all 0.2s;
477
+ }
478
+
479
+ .spf-expand-all span {
480
+ font-size: 11px;
481
+ vertical-align: middle;
482
+ }
483
+
484
+ /**
485
+ * 01. 11. Search Input
486
+ */
487
+
488
+ .spf-search {
489
+ float: left;
490
+ }
491
+
492
+ .spf-search input {
493
+ margin: 0 2px 0 0;
494
+ border: none;
495
+ font-size: 12px;
496
+ line-height: 29px;
497
+ text-align: inherit;
498
+ padding: 0 10px;
499
+ -moz-border-radius: 2px;
500
+ -webkit-border-radius: 2px;
501
+ border-radius: 2px;
502
+ -moz-box-shadow: none;
503
+ -webkit-box-shadow: none;
504
+ box-shadow: none;
505
+ }
506
+
507
+ .spf-search input:focus {
508
+ -moz-box-shadow: none;
509
+ -webkit-box-shadow: none;
510
+ box-shadow: none;
511
+ }
512
+
513
+ .spf-saving .spf-buttons,
514
+ .spf-saving .spf-content {
515
+ cursor: default;
516
+ pointer-events: none;
517
+ opacity: 0.75;
518
+ }
519
+
520
+ /**
521
+ * 01. 12. Metabox
522
+ */
523
+
524
+ .spf-metabox {
525
+ margin: -6px -12px -12px -12px;
526
+ }
527
+
528
+ .spf-metabox .spf-section-title {
529
+ padding: 20px;
530
+ }
531
+
532
+ .block-editor-page .spf-metabox {
533
+ margin: -6px -14px -12px -14px;
534
+ }
535
+
536
+ .spf-metabox-restore {
537
+ text-align: right;
538
+ padding: 10px;
539
+ border-top: 1px solid #eee;
540
+ }
541
+
542
+ .spf-metabox-restore .spf-button-cancel,
543
+ .spf-metabox-restore input {
544
+ display: none;
545
+ }
546
+
547
+ .spf-metabox-restore span {
548
+ -webkit-user-select: none;
549
+ user-select: none;
550
+ }
551
+
552
+ .spf-metabox-restore input:checked~.spf-button-restore {
553
+ display: none;
554
+ }
555
+
556
+ .spf-metabox-restore input:checked~.spf-button-cancel {
557
+ display: inline-block;
558
+ }
559
+
560
+ #side-sortables .spf-section-title {
561
+ padding: 12px;
562
+ }
563
+
564
+ #side-sortables .spf-field {
565
+ padding: 12px;
566
+ }
567
+
568
+ #side-sortables .spf-field .spf-title {
569
+ float: none;
570
+ width: 100%;
571
+ margin-bottom: 10px;
572
+ }
573
+
574
+ #side-sortables .spf-field .spf-fieldset {
575
+ margin-left: 0;
576
+ }
577
+
578
+ #side-sortables .spf-notice {
579
+ padding: 12px;
580
+ }
581
+
582
+ /**
583
+ * 01. 13. Help Tooltip
584
+ */
585
+
586
+ .spf-tooltip {
587
+ position: absolute;
588
+ z-index: 5000001;
589
+ font-size: 12px;
590
+ line-height: 1.4;
591
+ text-align: center;
592
+ text-decoration: none;
593
+ padding: 6px 12px;
594
+ max-width: 200px;
595
+ color: #fff;
596
+ background-color: #000;
597
+ background-color: rgba(0, 0, 0, 0.85);
598
+ -moz-border-radius: 4px;
599
+ -webkit-border-radius: 4px;
600
+ border-radius: 4px;
601
+ }
602
+
603
+ /**
604
+ * 02. Themes
605
+ */
606
+
607
+ /**
608
+ * 02. 01. Theme Dark
609
+ */
610
+
611
+ .spf-theme-dark .spf-header-inner {
612
+ background-color: #050505;
613
+ }
614
+
615
+ .spf-theme-dark .spf-header-inner h1 {
616
+ color: #fff;
617
+ }
618
+
619
+ .spf-theme-dark .spf-header-inner h1 small {
620
+ color: #555;
621
+ }
622
+
623
+ .spf-theme-dark .spf-expand-all {
624
+ color: #999;
625
+ background-color: #222;
626
+ }
627
+
628
+ .spf-theme-dark .spf-expand-all:hover {
629
+ color: #fff;
630
+ background-color: #333;
631
+ }
632
+
633
+ .spf-theme-dark .spf-search input {
634
+ color: #fff;
635
+ background-color: #222;
636
+ }
637
+
638
+ .spf-theme-dark .spf-search:focus {
639
+ background-color: #444;
640
+ }
641
+
642
+ .spf-theme-dark .spf-search::-webkit-input-placeholder {
643
+ color: #666;
644
+ }
645
+
646
+ .spf-theme-dark .spf-nav ul li a {
647
+ color: #999;
648
+ background-color: #222;
649
+ border-bottom: 1px solid #2f2f2f;
650
+ }
651
+
652
+ .spf-theme-dark .spf-nav ul li a:hover {
653
+ color: #fff;
654
+ }
655
+
656
+ .spf-theme-dark .spf-nav ul li .spf-section-active {
657
+ color: #fff;
658
+ background-color: #111;
659
+ }
660
+
661
+ .spf-theme-dark .spf-nav ul ul li a {
662
+ background-color: #191919;
663
+ border-bottom: 1px solid #2f2f2f;
664
+ }
665
+
666
+ .spf-theme-dark .spf-nav ul ul li .spf-section-active {
667
+ background-color: #101010;
668
+ }
669
+
670
+ .spf-theme-dark .spf-nav ul ul:before {
671
+ background-color: rgba(34, 34, 34, 0.75);
672
+ }
673
+
674
+ .spf-theme-dark .spf-nav>ul>li:last-child>a {
675
+ border-bottom: none;
676
+ }
677
+
678
+ .spf-theme-dark .spf-nav-background {
679
+ background-color: #222;
680
+ }
681
+
682
+ .spf-theme-dark .spf-footer {
683
+ color: #555;
684
+ background-color: #050505;
685
+ }
686
+
687
+ /**
688
+ * 02. 02. Theme Light
689
+ */
690
+
691
+ .spf-theme-light .spf-container {
692
+ border: 1px solid #e5e5e5;
693
+ -moz-box-shadow: 0 0 15px rgba(0, 0, 0, 0.04);
694
+ -webkit-box-shadow: 0 0 15px rgba(0, 0, 0, 0.04);
695
+ box-shadow: 0 0 15px rgba(0, 0, 0, 0.04);
696
+ }
697
+
698
+ .spf-theme-light .spf-header-inner {
699
+ border-bottom: 1px solid #e5e5e5;
700
+ background-color: #f5f5f5;
701
+ background: linear-gradient(#fefefe, #f5f5f5);
702
+ }
703
+
704
+ .spf-theme-light .spf-header-inner h1 small {
705
+ color: #999;
706
+ }
707
+
708
+ .spf-theme-light .spf-expand-all {
709
+ color: #999;
710
+ background-color: #fff;
711
+ -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
712
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
713
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
714
+ }
715
+
716
+ .spf-theme-light .spf-expand-all:hover {
717
+ color: #555;
718
+ }
719
+
720
+ .spf-theme-light .spf-search input {
721
+ color: #555;
722
+ background-color: #fff;
723
+ -moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
724
+ -webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
725
+ box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05);
726
+ }
727
+
728
+ .spf-theme-light .spf-search input::-webkit-input-placeholder {
729
+ color: #bbb;
730
+ }
731
+
732
+ .spf-theme-light .spf-nav {
733
+ background: #f1f1f1;
734
+ }
735
+
736
+ .spf-theme-light .spf-nav ul li a {
737
+ background-color: #18AFB9;
738
+ border-top: 1px solid #18AFB9;
739
+ border-right: 1px solid #E2E2E1;
740
+ border-bottom: 1px solid #ddd;
741
+ color: #fff;
742
+ font-size: 13px;
743
+ font-weight: 600;
744
+ line-height: 1.4;
745
+ padding: 16px 15px;
746
+ text-transform: uppercase;
747
+ }
748
+
749
+ .spf-theme-light .spf-nav ul li .spf-section-active {
750
+ background-color: #fff;
751
+ color: #000;
752
+ }
753
+
754
+ #sp_wpcp_shortcode_options .spf-theme-light .spf-nav ul li .spf-section-active {
755
+ border-bottom: 1px solid #fff;
756
+ border-top: 1px solid #18AFB9;
757
+ box-shadow: 0 3px 0 0 #18AFB9 inset;
758
+ }
759
+
760
+ .sp-wpcp-options.spf-theme-light .spf-nav ul li a {
761
+ background: #efefef;
762
+ color: #000;
763
+ border-bottom: 1px solid #cecece;
764
+ border-top: 1px solid #cecece;
765
+ }
766
+
767
+ .sp-wpcp-options.spf-theme-light .spf-nav ul li a:first-child {
768
+ border-top: 1px solid transparent;
769
+ }
770
+
771
+ #sp_wpcp_shortcode_options .spf-theme-light .spf-nav ul li .spf-section-active i,
772
+ .sp-wpcp-options.spf-theme-light .spf-nav ul li .spf-section-active i {
773
+ color: #18AFB9;
774
+ }
775
+
776
+ .sp-wpcp-options.spf-theme-light .spf-nav ul li .spf-section-active {
777
+ background-color: #fff;
778
+ border-right: 1px solid #fff;
779
+ border-bottom: 1px solid #fff;
780
+ border-top: 1px solid #fff;
781
+ box-shadow: 4px 0 0 0 #18AFB9 inset;
782
+ }
783
+
784
+ .spf-theme-light .spf-nav ul li .spf-section-active:after {
785
+ display: none;
786
+ }
787
+
788
+ .spf-theme-light .spf-nav ul ul li a {
789
+ background-color: #eee;
790
+ border-bottom: 1px solid #e5e5e5;
791
+ }
792
+
793
+ .spf-theme-light .spf-nav-background {
794
+ background-color: #ddd;
795
+ }
796
+
797
+ .spf-theme-light .spf-footer {
798
+ color: #555;
799
+ border-top: 1px solid #e5e5e5;
800
+ background-color: #f5f5f5;
801
+ background: linear-gradient(#fafafa, #f5f5f5);
802
+ }
803
+
804
+ /**
805
+ * 03. Fields
806
+ */
807
+
808
+ .spf-field {
809
+ position: relative;
810
+ padding: 22px 30px;
811
+ }
812
+ .spf-field.spf-field-carousel_type {
813
+ padding-bottom: 0;
814
+ }
815
+
816
+ .spf-field p:first-child {
817
+ margin-top: 0;
818
+ }
819
+
820
+ .spf-field p:last-child {
821
+ margin-bottom: 0;
822
+ }
823
+
824
+ .spf-field:after,
825
+ .spf-field:before {
826
+ content: " ";
827
+ display: table;
828
+ }
829
+
830
+ .spf-field:after {
831
+ clear: both;
832
+ }
833
+
834
+ .spf-field h4 {
835
+ margin-top: 0;
836
+ }
837
+
838
+ .spf-field .spf-title {
839
+ position: relative;
840
+ width: 20%;
841
+ float: left;
842
+ }
843
+
844
+ .spf-field .spf-title h4 {
845
+ margin: 0;
846
+ color: #23282d;
847
+ }
848
+
849
+ .spf-field .spf-fieldset {
850
+ margin-left: 25%;
851
+ }
852
+
853
+ .spf-pseudo-field {
854
+ padding: 0 5px 0 0 !important;
855
+ display: inline-block;
856
+ }
857
+
858
+ .spf-pseudo-field+.spf-pseudo-field {
859
+ border: 0;
860
+ }
861
+
862
+ .spf-pseudo-field pre {
863
+ display: none;
864
+ }
865
+
866
+ /**
867
+ * 03. 02. Field: accordion
868
+ */
869
+
870
+ .spf-field-accordion .spf-field {
871
+ padding: 20px;
872
+ }
873
+
874
+ .spf-field-accordion .spf-accordion-item {
875
+ position: relative;
876
+ margin-bottom: 5px;
877
+ }
878
+
879
+ .spf-field-accordion .spf-accordion-item h4 {
880
+ font-size: 1em;
881
+ }
882
+
883
+ .spf-field-accordion .spf-accordion-title {
884
+ display: block;
885
+ cursor: pointer;
886
+ position: relative;
887
+ margin: 0;
888
+ padding: 15px;
889
+ min-height: 0;
890
+ font-size: 100%;
891
+ -webkit-user-select: none;
892
+ user-select: none;
893
+ border: 1px solid #e5e5e5;
894
+ background-color: #fafafa;
895
+ -moz-transition: border-color 0.15s;
896
+ -o-transition: border-color 0.15s;
897
+ -webkit-transition: border-color 0.15s;
898
+ transition: border-color 0.15s;
899
+ }
900
+
901
+ .spf-field-accordion .spf-accordion-title:active,
902
+ .spf-field-accordion .spf-accordion-title:hover,
903
+ .spf-field-accordion .spf-accordion-title:focus {
904
+ border: 1px solid #bbb;
905
+ background-color: #fafafa;
906
+ outline: none;
907
+ }
908
+
909
+ .spf-field-accordion .spf-accordion-icon {
910
+ color: #aaa;
911
+ width: 14px;
912
+ text-align: center;
913
+ }
914
+
915
+ .spf-field-accordion .spf--icon {
916
+ width: 18px;
917
+ text-shadow: center;
918
+ }
919
+
920
+ .spf-field-accordion .spf-accordion-content {
921
+ display: none;
922
+ padding: 0;
923
+ border: 1px solid #e5e5e5;
924
+ border-top: none;
925
+ background-color: #fff;
926
+ }
927
+
928
+ .spf-field-accordion .spf-accordion-open {
929
+ display: block;
930
+ }
931
+
932
+ /**
933
+ * 03. 03. Field: background
934
+ */
935
+
936
+ .spf-field-background_adv select,
937
+ .spf-field-background select {
938
+ width: 100%;
939
+ }
940
+
941
+ .spf-field-group .spf-field-background_adv .spf-field,
942
+ .spf-field-background_adv .spf-field,
943
+ .spf-field-background .spf-field {
944
+ float: left;
945
+ padding: 0;
946
+ border: 0;
947
+ }
948
+
949
+ .spf-field-background_adv .spf--block,
950
+ .spf-field-background .spf--block {
951
+ float: left;
952
+ margin-bottom: 15px;
953
+ box-sizing: border-box;
954
+ }
955
+
956
+ .spf-field-background_adv .spf--title,
957
+ .spf-field-background .spf--title {
958
+ float: left;
959
+ color: #999;
960
+ margin-top: 3px;
961
+ margin-right: 5px;
962
+ }
963
+
964
+ .spf-field-background_adv .spf--select,
965
+ .spf-field-background .spf--select {
966
+ width: 25%;
967
+ padding-right: 10px;
968
+ box-sizing: border-box;
969
+ }
970
+
971
+ .spf-field-background_adv .spf--select .spf-field,
972
+ .spf-field-background .spf--select .spf-field {
973
+ width: 100%;
974
+ }
975
+
976
+ .spf-field-background_adv .spf--media,
977
+ .spf-field-background .spf--media {
978
+ width: 100%;
979
+ padding-right: 10px;
980
+ }
981
+
982
+ .spf-field-background_adv .spf--media .spf-field,
983
+ .spf-field-background .spf--media .spf-field {
984
+ width: 100%;
985
+ }
986
+
987
+ /**
988
+ * Custom CSS
989
+ */
990
+
991
+ .spf-field.spf-field-wp_editor.wpcp_carousel_content_source .spf-fieldset,
992
+ .spf-field.spf-field-background_adv.wpcp_carousel_content_bg .spf-fieldset {
993
+ margin-left: 0;
994
+ margin-top: 35px;
995
+ }
996
+
997
+ .spf-field.spf-field-wp_editor.wpcp_carousel_content_source .spf-title,
998
+ .spf-field.spf-field-background_adv.wpcp_carousel_content_bg .spf-title {
999
+ width: 100%;
1000
+ }
1001
+
1002
+ .spf-field.spf-field-background_adv .spf--preview {
1003
+ font-size: 16px;
1004
+ line-height: 20px;
1005
+ padding: 20px;
1006
+ color: #222;
1007
+ border: 1px solid #eee;
1008
+ background-color: #fff;
1009
+ height: 150px;
1010
+ border-radius: 2.5px;
1011
+ user-select: none;
1012
+ -webkit-user-select: none;
1013
+ transition: background-color .2s, border-color .2s;
1014
+ }
1015
+
1016
+ .spf-field.spf-field-background_adv .spf--block-preview {
1017
+ cursor: pointer;
1018
+ position: relative;
1019
+ overflow: hidden;
1020
+ margin-top: 10px;
1021
+ width: 100%;
1022
+ }
1023
+
1024
+ .spf-field.spf-field-background_adv .spf--black-background {
1025
+ border-color: #000;
1026
+ background-color: #000;
1027
+ }
1028
+
1029
+ .spf-field.spf-field-background_adv .spf--toggle {
1030
+ position: absolute;
1031
+ top: 5px;
1032
+ right: 10px;
1033
+ color: #999;
1034
+ }
1035
+
1036
+ /**
1037
+ * 03. 04. Field: backup
1038
+ */
1039
+
1040
+ .spf-field-backup textarea {
1041
+ width: 100%;
1042
+ min-height: 200px;
1043
+ margin-bottom: 5px;
1044
+ }
1045
+
1046
+ .spf-field-backup small {
1047
+ display: inline-block;
1048
+ margin: 5px;
1049
+ }
1050
+
1051
+ .spf-field-backup hr {
1052
+ margin: 20px 0;
1053
+ border: none;
1054
+ border-bottom: 1px solid #e5e5e5;
1055
+ }
1056
+
1057
+ /**
1058
+ * 03. 05. Field: border, spacing, dimensions, column, dimensions_advanced
1059
+ */
1060
+
1061
+ .spf-field-border .spf--left,
1062
+ .spf-field-spacing .spf--left,
1063
+ .spf-field-column .spf--left,
1064
+ .spf-field-dimensions .spf--left,
1065
+ .spf-field-dimensions_advanced .spf--left {
1066
+ float: left;
1067
+ }
1068
+
1069
+ .spf-field-border .spf--input,
1070
+ .spf-field-spacing .spf--input,
1071
+ .spf-field-column .spf--input,
1072
+ .spf-field-dimensions .spf--input,
1073
+ .spf-field-dimensions_advanced .spf--input {
1074
+ float: left;
1075
+ margin-right: 10px;
1076
+ margin-bottom: 7px;
1077
+ }
1078
+
1079
+ .spf-field-border .spf--input select,
1080
+ .spf-field-spacing .spf--input select,
1081
+ .spf-field-column .spf--input select,
1082
+ .spf-field-dimensions .spf--input select,
1083
+ .spf-field-dimensions_advanced .spf--input select {
1084
+ margin: 0;
1085
+ line-height: 26px;
1086
+ }
1087
+
1088
+ .spf-field-border .spf--input input,
1089
+ .spf-field-spacing .spf--input input,
1090
+ .spf-field-column .spf--input input,
1091
+ .spf-field-dimensions .spf--input input,
1092
+ .spf-field-dimensions_advanced .spf--input input {
1093
+ line-height: 26px;
1094
+ float: left;
1095
+ margin: 0;
1096
+ padding: 0;
1097
+ width: 65px;
1098
+ max-width: 100%;
1099
+ text-align: center;
1100
+ }
1101
+
1102
+ .spf-field-border .spf--label,
1103
+ .spf-field-spacing .spf--label,
1104
+ .spf-field-column .spf--label,
1105
+ .spf-field-dimensions .spf--label,
1106
+ .spf-field-dimensions_advanced .spf--label {
1107
+ float: left;
1108
+ max-width: 100%;
1109
+ font-size: 12px;
1110
+ line-height: 26px;
1111
+ vertical-align: top;
1112
+ text-align: center;
1113
+ color: #555;
1114
+ border: 1px solid #ddd;
1115
+ background-color: #eee;
1116
+ padding: 0 6px;
1117
+ }
1118
+
1119
+ .spf-field-border .spf--label-icon,
1120
+ .spf-field-spacing .spf--label-icon,
1121
+ .spf-field-column .spf--label-icon,
1122
+ .spf-field-dimensions .spf--label-icon,
1123
+ .spf-field-dimensions_advanced .spf--label-icon {
1124
+ min-width: 20px;
1125
+ border-right: 0;
1126
+ border-radius: 2px 0 0 2px;
1127
+ }
1128
+
1129
+ .spf-field-border .spf--label-unit,
1130
+ .spf-field-spacing .spf--label-unit,
1131
+ .spf-field-column .spf--label-unit,
1132
+ .spf-field-dimensions .spf--label-unit,
1133
+ .spf-field-dimensions_advanced .spf--label-unit {
1134
+ color: #999;
1135
+ border-left: 0;
1136
+ border-radius: 0 2px 2px 0;
1137
+ }
1138
+
1139
+ /**
1140
+ * 03. 06. Field: button_set
1141
+ */
1142
+
1143
+ .spf-field-button_set .spf--buttons {
1144
+ display: inline-block;
1145
+ }
1146
+
1147
+ .spf-field-button_set .spf--button {
1148
+ position: relative;
1149
+ z-index: 1;
1150
+ float: left;
1151
+ cursor: pointer;
1152
+ padding: 7px 14px;
1153
+ min-width: 40px;
1154
+ text-align: center;
1155
+ color: #555;
1156
+ border: 1px solid #cccccc;
1157
+ background-color: #f7f7f7;
1158
+ user-select: none;
1159
+ -webkit-user-select: none;
1160
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
1161
+ }
1162
+
1163
+ .spf-field-button_set .spf--button:first-child {
1164
+ border-radius: 4px 0 0 4px;
1165
+ }
1166
+
1167
+ .spf-field-button_set .spf--button:last-child {
1168
+ border-radius: 0 4px 4px 0;
1169
+ }
1170
+
1171
+ .spf-field-button_set .spf--button:not(:first-child) {
1172
+ margin-left: -1px;
1173
+ }
1174
+
1175
+ .spf-field-button_set .spf--button:hover {
1176
+ background-color: #eee;
1177
+ }
1178
+
1179
+ .spf-field-button_set .spf--active:hover,
1180
+ .spf-field-button_set .spf--active {
1181
+ z-index: 2;
1182
+ color: #fff;
1183
+ border-color: #006799;
1184
+ background-color: #0085ba;
1185
+ }
1186
+
1187
+ .spf-field-button_set input {
1188
+ display: none;
1189
+ }
1190
+
1191
+ /**
1192
+ * 03. 07. Field: checkbox, radio
1193
+ */
1194
+
1195
+ .spf-field-checkbox ul,
1196
+ .spf-field-radio ul {
1197
+ margin: 0;
1198
+ padding: 0;
1199
+ list-style-type: none;
1200
+ overflow-y: auto;
1201
+ max-height: 305px;
1202
+ }
1203
+
1204
+ .spf-field-checkbox .spf--inline-list li,
1205
+ .spf-field-radio .spf--inline-list li {
1206
+ display: inline-block;
1207
+ margin-right: 15px;
1208
+ }
1209
+
1210
+ .spf-field-checkbox input[type="radio"]:checked:before,
1211
+ .spf-field-radio input[type="radio"]:checked:before {
1212
+ line-height: 10px;
1213
+ }
1214
+
1215
+ .spf-field-checkbox .spf-checker,
1216
+ .spf-field-radio .spf-checker {
1217
+ cursor: pointer;
1218
+ }
1219
+
1220
+ /**
1221
+ * 03. 08. Field: code_editor
1222
+ */
1223
+
1224
+ .spf-field-code_editor .CodeMirror {
1225
+ width: 100%;
1226
+ height: 400px;
1227
+ border: 1px solid #eee;
1228
+ }
1229
+
1230
+ .spf-field-code_editor textarea {
1231
+ width: 100%;
1232
+ height: 400px;
1233
+ }
1234
+
1235
+ /**
1236
+ * 03. 09. Field: color
1237
+ */
1238
+
1239
+ .spf-field-color>input {
1240
+ opacity: 0.75;
1241
+ width: 115px;
1242
+ max-width: 100%;
1243
+ }
1244
+
1245
+ /**
1246
+ * 03. 10. Field: color_group
1247
+ */
1248
+
1249
+ .spf-field-color_group .spf--left {
1250
+ float: left;
1251
+ margin-right: 10px;
1252
+ margin-bottom: 5px;
1253
+ }
1254
+
1255
+ .spf-field-color_group .spf--title {
1256
+ color: #999;
1257
+ margin-bottom: 5px;
1258
+ }
1259
+
1260
+ /**
1261
+ * 03. 11. Field: fieldset
1262
+ */
1263
+
1264
+ .spf-field-fieldset .spf-fieldset-content {
1265
+ border: 1px solid #eee;
1266
+ background-color: #fff;
1267
+ }
1268
+
1269
+ .spf-field-fieldset .spf-field {
1270
+ padding: 20px;
1271
+ }
1272
+
1273
+ /**
1274
+ * 03. 12. Field: date
1275
+ */
1276
+
1277
+ .spf-field-date .spf--to {
1278
+ margin-left: 7px;
1279
+ }
1280
+
1281
+ .spf-datepicker-wrapper {
1282
+ margin-top: 5px;
1283
+ width: auto;
1284
+ background-color: #fff;
1285
+ z-index: 9999999 !important;
1286
+ -moz-box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
1287
+ -webkit-box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
1288
+ box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
1289
+ }
1290
+
1291
+ .spf-datepicker-wrapper * {
1292
+ float: none;
1293
+ margin: 0;
1294
+ padding: 0;
1295
+ font-family: inherit;
1296
+ font-weight: normal;
1297
+ font-style: normal;
1298
+ text-decoration: none;
1299
+ border: none;
1300
+ background: none;
1301
+ -moz-box-shadow: none;
1302
+ -webkit-box-shadow: none;
1303
+ box-shadow: none;
1304
+ -moz-border-radius: none;
1305
+ -webkit-border-radius: none;
1306
+ border-radius: none;
1307
+ }
1308
+
1309
+ .spf-datepicker-wrapper .ui-widget-header,
1310
+ .spf-datepicker-wrapper .ui-datepicker-header {
1311
+ color: #fff;
1312
+ background: #00a0d2;
1313
+ }
1314
+
1315
+ .spf-datepicker-wrapper .ui-datepicker-header .ui-state-hover {
1316
+ cursor: pointer;
1317
+ }
1318
+
1319
+ .spf-datepicker-wrapper .ui-datepicker-title {
1320
+ font-size: 14px;
1321
+ line-height: 40px;
1322
+ text-align: center;
1323
+ }
1324
+
1325
+ .spf-datepicker-wrapper .ui-datepicker-prev,
1326
+ .spf-datepicker-wrapper .ui-datepicker-next {
1327
+ position: static;
1328
+ top: auto;
1329
+ left: auto;
1330
+ right: auto;
1331
+ font-family: "FontAwesome";
1332
+ font-size: 12px;
1333
+ text-align: center;
1334
+ width: 41px;
1335
+ height: 40px;
1336
+ line-height: 40px;
1337
+ color: #fff;
1338
+ background-color: rgba(255, 255, 255, 0.1);
1339
+ text-rendering: auto;
1340
+ -webkit-font-smoothing: antialiased;
1341
+ -moz-osx-font-smoothing: grayscale;
1342
+ }
1343
+
1344
+ .spf-datepicker-wrapper .ui-datepicker-next span,
1345
+ .spf-datepicker-wrapper .ui-datepicker-prev span {
1346
+ display: none;
1347
+ }
1348
+
1349
+ .spf-datepicker-wrapper .ui-datepicker-prev {
1350
+ float: left;
1351
+ }
1352
+
1353
+ .spf-datepicker-wrapper .ui-datepicker-next {
1354
+ float: right;
1355
+ }
1356
+
1357
+ .spf-datepicker-wrapper .ui-datepicker-prev:before {
1358
+ content: '\f053';
1359
+ }
1360
+
1361
+ .spf-datepicker-wrapper .ui-datepicker-next:before {
1362
+ content: '\f054';
1363
+ }
1364
+
1365
+ .spf-datepicker-wrapper .ui-datepicker-prev-hover,
1366
+ .spf-datepicker-wrapper .ui-datepicker-next-hover {
1367
+ opacity: 0.75;
1368
+ }
1369
+
1370
+ .spf-datepicker-wrapper tbody .ui-datepicker-week-col {
1371
+ background-color: #f7f7f7;
1372
+ }
1373
+
1374
+ .spf-datepicker-wrapper .ui-datepicker-buttonpane {
1375
+ padding: 10px;
1376
+ text-align: center;
1377
+ background-color: #f7f7f7;
1378
+ }
1379
+
1380
+ .spf-datepicker-wrapper .ui-datepicker-buttonpane button {
1381
+ cursor: pointer;
1382
+ margin: 0 5px;
1383
+ padding: 7px 14px;
1384
+ border: 1px solid #eee;
1385
+ background-color: #fff;
1386
+ }
1387
+
1388
+ .spf-datepicker-wrapper select {
1389
+ margin: 0 4px;
1390
+ color: #fff;
1391
+ border: 1px solid rgba(255, 255, 255, 0.5);
1392
+ }
1393
+
1394
+ .spf-datepicker-wrapper select option {
1395
+ color: #555;
1396
+ }
1397
+
1398
+ .spf-datepicker-wrapper table {
1399
+ font-size: 13px;
1400
+ border-collapse: collapse;
1401
+ width: 100%;
1402
+ }
1403
+
1404
+ .spf-datepicker-wrapper thead {
1405
+ color: #fff;
1406
+ background: #32373c;
1407
+ }
1408
+
1409
+ .spf-datepicker-wrapper th {
1410
+ text-align: center;
1411
+ padding: 7px;
1412
+ border: 1px solid #444;
1413
+ }
1414
+
1415
+ .spf-datepicker-wrapper td {
1416
+ text-align: center;
1417
+ border: 1px solid #f4f4f4;
1418
+ }
1419
+
1420
+ .spf-datepicker-wrapper td.ui-datepicker-other-month {
1421
+ border: transparent;
1422
+ }
1423
+
1424
+ .spf-datepicker-wrapper td .ui-state-default {
1425
+ color: #555;
1426
+ width: auto;
1427
+ display: block;
1428
+ padding: 6px 12px;
1429
+ }
1430
+
1431
+ .spf-datepicker-wrapper td .ui-state-active,
1432
+ .spf-datepicker-wrapper td .ui-state-hover {
1433
+ color: #fff;
1434
+ background-color: #0073aa;
1435
+ }
1436
+
1437
+ .spf-datepicker-wrapper td.ui-state-disabled .ui-state-default {
1438
+ opacity: 0.5;
1439
+ }
1440
+
1441
+ /**
1442
+ * 03. 13. Field: gallery
1443
+ */
1444
+
1445
+ .spf-field-gallery input {
1446
+ display: none;
1447
+ }
1448
+
1449
+ .spf-field-gallery ul {
1450
+ margin: 0;
1451
+ padding: 0;
1452
+ list-style-type: none;
1453
+ }
1454
+
1455
+ .spf-field-gallery ul.sp-gallery-images li {
1456
+ display: inline-block;
1457
+ position: relative;
1458
+ padding: 4px;
1459
+ margin: 0 5px 10px 0;
1460
+ border: 1px solid #ccc;
1461
+ background-color: #f9f9f9;
1462
+ -moz-border-radius: 2px;
1463
+ -webkit-border-radius: 2px;
1464
+ border-radius: 2px;
1465
+ -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1466
+ -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1467
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1468
+ }
1469
+
1470
+ .spf-field-gallery ul.sp-gallery-images li img {
1471
+ max-height: 100px;
1472
+ display: inline-block;
1473
+ vertical-align: middle;
1474
+ }
1475
+
1476
+ .spf-field-gallery .button:focus,
1477
+ .spf-field-gallery .button:hover,
1478
+ .spf-field-gallery .button {
1479
+ margin-right: 5px;
1480
+ margin-bottom: 5px;
1481
+ /* SP Style */
1482
+ width: 110px;
1483
+ height: 110px;
1484
+ text-align: center;
1485
+ line-height: 15px;
1486
+ color: #fff;
1487
+ border: none;
1488
+ border-radius: 2px;
1489
+ display: flex;
1490
+ justify-content: center;
1491
+ flex-direction: column;
1492
+ font-weight: 600;
1493
+ }
1494
+
1495
+ .spf-field-gallery .button-primary.spf-button {
1496
+ background: #4eb631;
1497
+ box-shadow: none;
1498
+ text-shadow: none;
1499
+ }
1500
+
1501
+ .spf-field-gallery .button.spf-edit-gallery {
1502
+ background: #6a7885;
1503
+ }
1504
+
1505
+ .spf-field-gallery .button i {
1506
+ font-size: 24px;
1507
+ margin-bottom: 10px;
1508
+ }
1509
+
1510
+ .spf-field-gallery a,
1511
+ .spf-field-gallery li {
1512
+ float: left;
1513
+ }
1514
+
1515
+ /**
1516
+ * 03. 14. Field: group
1517
+ */
1518
+
1519
+ .spf-field-group .spf-field {
1520
+ padding: 20px;
1521
+ }
1522
+
1523
+ .spf-field-group .spf-cloneable-hidden {
1524
+ display: none !important;
1525
+ }
1526
+
1527
+ .spf-field-group .spf-cloneable-wrapper {
1528
+ position: relative;
1529
+ }
1530
+
1531
+ .spf-field-group .spf-cloneable-item {
1532
+ display: none;
1533
+ position: relative;
1534
+ margin-bottom: 5px;
1535
+ }
1536
+
1537
+ .spf-field-group .spf-cloneable-item h4 {
1538
+ font-size: 1em;
1539
+ }
1540
+
1541
+ .spf-field-group .ui-accordion .spf-cloneable-item {
1542
+ display: block;
1543
+ }
1544
+
1545
+ .spf-field-group .spf-cloneable-content {
1546
+ border: 1px solid #e5e5e5;
1547
+ background: #fff;
1548
+ }
1549
+
1550
+ .spf-field-group .spf-cloneable-title {
1551
+ display: block;
1552
+ cursor: pointer;
1553
+ position: relative;
1554
+ margin: 0;
1555
+ padding: 15px 65px 15px 10px;
1556
+ min-height: 0;
1557
+ font-size: 100%;
1558
+ border: 1px solid #e5e5e5;
1559
+ background: #fafafa;
1560
+ -webkit-user-select: none;
1561
+ user-select: none;
1562
+ -moz-transition: border-color 0.15s;
1563
+ -o-transition: border-color 0.15s;
1564
+ -webkit-transition: border-color 0.15s;
1565
+ transition: border-color 0.15s;
1566
+ }
1567
+
1568
+ .spf-field-group .spf-cloneable-title:active,
1569
+ .spf-field-group .spf-cloneable-title:hover,
1570
+ .spf-field-group .spf-cloneable-title:focus {
1571
+ border: 1px solid #bbb;
1572
+ background: #fafafa;
1573
+ outline: none;
1574
+ }
1575
+
1576
+ .spf-field-group .spf-cloneable-helper {
1577
+ position: absolute;
1578
+ top: 12px;
1579
+ right: 10px;
1580
+ z-index: 1;
1581
+ font-size: 14px;
1582
+ line-height: 1em;
1583
+ }
1584
+
1585
+ .spf-field-group .spf-cloneable-helper i {
1586
+ display: inline-block;
1587
+ cursor: pointer;
1588
+ padding: 5px;
1589
+ color: #999;
1590
+ }
1591
+
1592
+ .spf-field-group .spf-cloneable-helper i:hover {
1593
+ color: #555;
1594
+ }
1595
+
1596
+ .spf-field-group .spf-cloneable-content {
1597
+ padding: 0;
1598
+ border-top: 0;
1599
+ }
1600
+
1601
+ .spf-field-group .spf-cloneable-title-prefix,
1602
+ .spf-field-group .spf-cloneable-title-number {
1603
+ margin-right: 5px;
1604
+ }
1605
+
1606
+ .spf-field-group .spf-cloneable-alert {
1607
+ display: none;
1608
+ margin-bottom: 5px;
1609
+ padding: 10px 20px;
1610
+ color: #a94442;
1611
+ border: 1px solid #ebccd1;
1612
+ background-color: #f2dede;
1613
+ }
1614
+
1615
+ .spf-field-group .widget-placeholder {
1616
+ margin-bottom: 10px;
1617
+ border: 1px dashed #f1c40f;
1618
+ background-color: #fffae4;
1619
+ }
1620
+
1621
+ .spf-field-group .spf-cloneable-header-icon {
1622
+ display: inline-block;
1623
+ text-align: center;
1624
+ font-size: 14px;
1625
+ width: 17px;
1626
+ color: #aaa;
1627
+ text-indent: 0;
1628
+ vertical-align: text-top;
1629
+ }
1630
+
1631
+ .spf-field-group .spf-cloneable-placeholder {
1632
+ background-color: #ddd;
1633
+ margin-top: 4px;
1634
+ width: 100px;
1635
+ height: 10px;
1636
+ font-size: 10px;
1637
+ line-height: 10px;
1638
+ display: inline-block;
1639
+ vertical-align: top;
1640
+ border-radius: 2px;
1641
+ }
1642
+
1643
+ /**
1644
+ * 03. 15. Field: icon
1645
+ */
1646
+
1647
+ .spf-field-icon input {
1648
+ display: none;
1649
+ }
1650
+
1651
+ .spf-field-icon .button {
1652
+ margin-right: 5px;
1653
+ }
1654
+
1655
+ .spf-field-icon .spf-icon-preview i {
1656
+ display: inline-block;
1657
+ font-size: 14px;
1658
+ width: 30px;
1659
+ height: 26px;
1660
+ line-height: 26px;
1661
+ margin-right: 5px;
1662
+ text-align: center;
1663
+ vertical-align: top;
1664
+ color: #555;
1665
+ border: 1px solid #ccc;
1666
+ background-color: #f7f7f7;
1667
+ -moz-border-radius: 3px;
1668
+ -webkit-border-radius: 3px;
1669
+ border-radius: 3px;
1670
+ -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1671
+ -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1672
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
1673
+ -moz-box-sizing: content-box;
1674
+ -webkit-box-sizing: content-box;
1675
+ box-sizing: content-box;
1676
+ }
1677
+
1678
+ /**
1679
+ * 03. 16. Field: image_select
1680
+ */
1681
+
1682
+ /* Carousel Type */
1683
+
1684
+ .spf-field-image_select .spf--image,
1685
+ .spf-field-carousel_type .spf--image {
1686
+ cursor: pointer;
1687
+ position: relative;
1688
+ display: inline-block;
1689
+ max-width: 100%;
1690
+ margin: 0 5px 5px 0;
1691
+ vertical-align: bottom;
1692
+ border: 2px solid transparent;
1693
+ background-color: #fff;
1694
+ user-select: none;
1695
+ -webkit-user-select: none;
1696
+ -moz-transition: all 0.2s;
1697
+ -o-transition: all 0.2s;
1698
+ -webkit-transition: all 0.2s;
1699
+ transition: all 0.2s;
1700
+ }
1701
+
1702
+ .spf-field-image_select .spf--image:before {
1703
+ position: absolute;
1704
+ top: 0;
1705
+ left: 0;
1706
+ text-align: center;
1707
+ font-size: 11px;
1708
+ font-family: FontAwesome;
1709
+ content: "\f00c";
1710
+ width: 15px;
1711
+ height: 15px;
1712
+ line-height: 15px;
1713
+ opacity: 0;
1714
+ color: #fff;
1715
+ background-color: #222;
1716
+ transition: opacity .2s;
1717
+ }
1718
+
1719
+ .spf-field-image_select .spf--active {
1720
+ border-color: #1EA4B0;
1721
+ box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
1722
+ }
1723
+
1724
+ .spf-field-image_select img {
1725
+ vertical-align: top;
1726
+ }
1727
+
1728
+ .spf-field-image_select input,
1729
+ .spf-field-carousel_type input {
1730
+ display: none;
1731
+ }
1732
+
1733
+ .spf-field-carousel_type .spf--image {
1734
+ background: #e8ecef;
1735
+ color: #7b8898;
1736
+ margin-right: 10px;
1737
+ border: solid 3px #e8ecef;
1738
+ border-radius: 2px;
1739
+ cursor: pointer;
1740
+ text-align: center;
1741
+ width: 120px;
1742
+ height: 80px;
1743
+ box-shadow: inset 0 0 0px 3px #fff;
1744
+ }
1745
+
1746
+ .spf-field-carousel_type i {
1747
+ font-size: 30px;
1748
+ width: 32px;
1749
+ height: 30px;
1750
+ margin-top: 15px;
1751
+ }
1752
+
1753
+ .spf-field-carousel_type p {
1754
+ margin-top: 5px;
1755
+ font-weight: 500;
1756
+ }
1757
+
1758
+ .spf-field-carousel_type .spf--image.spf--active {
1759
+ border-color: #1EA4B0;
1760
+ }
1761
+
1762
+ /**
1763
+ * 03. 17. Field: link_color
1764
+ */
1765
+
1766
+ .spf-field-link_color .spf--left {
1767
+ float: left;
1768
+ margin-right: 10px;
1769
+ margin-bottom: 5px;
1770
+ }
1771
+
1772
+ .spf-field-link_color .spf--title {
1773
+ color: #999;
1774
+ margin-bottom: 5px;
1775
+ }
1776
+
1777
+ /**
1778
+ * 03. 18. Field: media
1779
+ */
1780
+
1781
+ .spf-field-media .spf--placeholder {
1782
+ margin-bottom: 10px;
1783
+ display: flex;
1784
+ }
1785
+
1786
+ .spf-field-media .spf--placeholder input {
1787
+ width: 100%;
1788
+ }
1789
+
1790
+ .spf-field-media .button {
1791
+ margin-left: 7px;
1792
+ }
1793
+
1794
+ .spf-field-media .hidden+.button {
1795
+ margin-left: 0;
1796
+ }
1797
+
1798
+ .spf-field-media .spf--preview {
1799
+ position: relative;
1800
+ }
1801
+
1802
+ .spf-field-media .spf--preview .fa-times {
1803
+ position: absolute;
1804
+ z-index: 1;
1805
+ right: 4px;
1806
+ top: 4px;
1807
+ font-size: 14px;
1808
+ width: 22px;
1809
+ height: 22px;
1810
+ line-height: 22px;
1811
+ text-align: center;
1812
+ text-decoration: none;
1813
+ color: #fff;
1814
+ background-color: #dd3333;
1815
+ opacity: 0.8;
1816
+ transition: all .2s;
1817
+ }
1818
+
1819
+ .spf-field-media .spf--preview .fa-times:hover {
1820
+ opacity: 1;
1821
+ }
1822
+
1823
+ .spf-field-media .spf--preview .fa-times:focus {
1824
+ box-shadow: none;
1825
+ }
1826
+
1827
+ /**
1828
+ * 03. 19. Field: palette
1829
+ */
1830
+
1831
+ .spf-field-palette .spf--palette {
1832
+ position: relative;
1833
+ display: inline-block;
1834
+ cursor: pointer;
1835
+ border: 2px solid #ddd;
1836
+ margin-right: 10px;
1837
+ margin-bottom: 10px;
1838
+ user-select: none;
1839
+ -webkit-user-select: none;
1840
+ transition: all .2s;
1841
+ }
1842
+
1843
+ .spf-field-palette .spf--palette span {
1844
+ vertical-align: middle;
1845
+ display: inline-block;
1846
+ width: 22px;
1847
+ height: 60px;
1848
+ line-height: 60px;
1849
+ overflow: hidden;
1850
+ text-indent: -999px;
1851
+ }
1852
+
1853
+ .spf-field-palette .spf--palette:before {
1854
+ position: absolute;
1855
+ top: 0;
1856
+ left: 0;
1857
+ text-align: center;
1858
+ font-size: 11px;
1859
+ font-family: FontAwesome;
1860
+ content: "\f00c";
1861
+ width: 15px;
1862
+ height: 15px;
1863
+ line-height: 15px;
1864
+ opacity: 0;
1865
+ color: #fff;
1866
+ background-color: #222;
1867
+ transition: opacity .2s;
1868
+ }
1869
+
1870
+ .spf-field-palette .spf--active {
1871
+ border-color: #222;
1872
+ box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
1873
+ }
1874
+
1875
+ .spf-field-palette .spf--active:before {
1876
+ opacity: 1;
1877
+ }
1878
+
1879
+ .spf-field-palette input {
1880
+ display: none;
1881
+ }
1882
+
1883
+ /**
1884
+ * 03. 20. Field: repeater
1885
+ */
1886
+
1887
+ .spf-field-repeater .spf-field {
1888
+ padding: 10px;
1889
+ }
1890
+
1891
+ .spf-field-repeater .spf-field-text input {
1892
+ width: 100%;
1893
+ }
1894
+
1895
+ .spf-field-repeater .spf-repeater-hidden {
1896
+ display: none !important;
1897
+ }
1898
+
1899
+ .spf-field-repeater .spf-repeater-wrapper .spf-repeater-item {
1900
+ display: table;
1901
+ width: 100%;
1902
+ margin-bottom: 5px;
1903
+ border: 1px solid #eee;
1904
+ }
1905
+
1906
+ .spf-field-repeater .spf-repeater-wrapper .spf-repeater-item h4 {
1907
+ font-size: 1em;
1908
+ }
1909
+
1910
+ .spf-field-repeater .spf-repeater-content {
1911
+ width: 100%;
1912
+ display: table-cell;
1913
+ vertical-align: middle;
1914
+ background-color: #fff;
1915
+ }
1916
+
1917
+ .spf-field-repeater .spf-repeater-helper {
1918
+ width: 100%;
1919
+ display: table-cell;
1920
+ vertical-align: middle;
1921
+ text-align: center;
1922
+ font-size: 14px;
1923
+ line-height: 1em;
1924
+ border-left: 1px solid #eee;
1925
+ background-color: #f7f7f7;
1926
+ }
1927
+
1928
+ .spf-field-repeater .spf-repeater-helper i {
1929
+ display: inline-block;
1930
+ cursor: pointer;
1931
+ color: #999;
1932
+ padding: 5px;
1933
+ }
1934
+
1935
+ .spf-field-repeater .spf-repeater-helper i:hover {
1936
+ color: #555;
1937
+ }
1938
+
1939
+ .spf-field-repeater .spf-repeater-helper-inner {
1940
+ width: 75px;
1941
+ }
1942
+
1943
+ .spf-field-repeater .spf-repeater-alert {
1944
+ display: none;
1945
+ margin-bottom: 5px;
1946
+ padding: 10px 20px;
1947
+ color: #a94442;
1948
+ border: 1px solid #ebccd1;
1949
+ background-color: #f2dede;
1950
+ }
1951
+
1952
+ .spf-field-repeater .widget-placeholder {
1953
+ height: 50px;
1954
+ margin-bottom: 3px;
1955
+ border: 1px dashed #f1c40f;
1956
+ background-color: #fffae4;
1957
+ }
1958
+
1959
+ .spf-field-repeater .ui-sortable-helper {
1960
+ height: 50px !important;
1961
+ overflow: hidden !important;
1962
+ border-color: #ccc !important;
1963
+ background-color: #eee !important;
1964
+ opacity: 0.5;
1965
+ }
1966
+
1967
+ .spf-field-repeater .ui-sortable-helper .spf-repeater-helper,
1968
+ .spf-field-repeater .ui-sortable-helper .spf-repeater-content {
1969
+ display: none;
1970
+ }
1971
+
1972
+ /**
1973
+ * 03. 21. Field: select
1974
+ */
1975
+
1976
+ .spf-field-select select {
1977
+ max-width: 100%;
1978
+ }
1979
+
1980
+ /**
1981
+ * 03. 22. Field: slider
1982
+ */
1983
+
1984
+ .spf-field-slider em {
1985
+ padding-left: 5px;
1986
+ color: #aaa;
1987
+ }
1988
+
1989
+ .spf-field-slider input[type="text"] {
1990
+ width: 45px;
1991
+ margin-left: 15px;
1992
+ text-align: center;
1993
+ }
1994
+
1995
+ .spf-field-slider .ui-slider {
1996
+ position: relative;
1997
+ width: 100%;
1998
+ height: 4px;
1999
+ border: none;
2000
+ background: #ddd;
2001
+ border-radius: 2px;
2002
+ }
2003
+
2004
+ .spf-field-slider .ui-slider-range {
2005
+ height: 4px;
2006
+ border: none;
2007
+ background: #222;
2008
+ border-radius: 2px;
2009
+ }
2010
+
2011
+ .spf-field-slider .ui-slider-handle {
2012
+ position: absolute;
2013
+ width: 18px;
2014
+ height: 18px;
2015
+ top: -7px;
2016
+ margin-left: -8px;
2017
+ border: none;
2018
+ background: #222;
2019
+ border-radius: 2px;
2020
+ }
2021
+
2022
+ .spf-field-slider .ui-state-active,
2023
+ .spf-field-slider .ui-slider-handle:hover {
2024
+ cursor: pointer;
2025
+ background: #444;
2026
+ }
2027
+
2028
+ /**
2029
+ * 03. 23. Field: sortable
2030
+ */
2031
+
2032
+ .spf-field-sortable .spf-field {
2033
+ padding: 10px;
2034
+ }
2035
+
2036
+ .spf-field-sortable .spf-field-text input {
2037
+ width: 100%;
2038
+ max-width: 100%;
2039
+ }
2040
+
2041
+ .spf-field-sortable .spf--sortable .spf--sortable-item {
2042
+ display: table;
2043
+ width: 100%;
2044
+ margin-bottom: 5px;
2045
+ border: 1px solid #eee;
2046
+ }
2047
+
2048
+ .spf-field-sortable .spf--sortable .spf--sortable-item h4 {
2049
+ font-size: 1em;
2050
+ }
2051
+
2052
+ .spf-field-sortable .spf--sortable-content {
2053
+ width: 100%;
2054
+ display: table-cell;
2055
+ vertical-align: middle;
2056
+ background-color: #fff;
2057
+ }
2058
+
2059
+ .spf-field-sortable .spf--sortable-helper {
2060
+ width: 100%;
2061
+ display: table-cell;
2062
+ vertical-align: middle;
2063
+ text-align: center;
2064
+ font-size: 14px;
2065
+ line-height: 1em;
2066
+ border-left: 1px solid #eee;
2067
+ background-color: #f7f7f7;
2068
+ }
2069
+
2070
+ .spf-field-sortable .spf--sortable-helper .fa {
2071
+ display: inline-block;
2072
+ cursor: pointer;
2073
+ width: 50px;
2074
+ color: #555;
2075
+ }
2076
+
2077
+ .spf-field-sortable .spf--sortable-helper .fa:hover {
2078
+ opacity: 0.5;
2079
+ }
2080
+
2081
+ .spf-field-sortable .widget-placeholder {
2082
+ height: 50px;
2083
+ margin-bottom: 3px;
2084
+ border: 1px dashed #f1c40f;
2085
+ background-color: #fffae4;
2086
+ }
2087
+
2088
+ .spf-field-sortable .ui-sortable-helper {
2089
+ height: 50px !important;
2090
+ overflow: hidden !important;
2091
+ border-color: #ccc !important;
2092
+ background-color: #eee !important;
2093
+ opacity: 0.5;
2094
+ }
2095
+
2096
+ .spf-field-sortable .ui-sortable-helper .spf--sortable-helper,
2097
+ .spf-field-sortable .ui-sortable-helper .spf--sortable-content {
2098
+ display: none;
2099
+ }
2100
+
2101
+ /**
2102
+ * 03. 24. Field: sorter
2103
+ */
2104
+
2105
+ .spf-field-sorter .ui-sortable-placeholder {
2106
+ height: 20px;
2107
+ border: 1px dashed #f1c40f;
2108
+ background-color: #fffae4;
2109
+ }
2110
+
2111
+ .spf-field-sorter .spf-modules {
2112
+ float: left;
2113
+ width: 50%;
2114
+ box-sizing: border-box;
2115
+ }
2116
+
2117
+ .spf-field-sorter .spf-modules:first-child {
2118
+ padding-right: 15px;
2119
+ }
2120
+
2121
+ .spf-field-sorter .spf-modules:last-child {
2122
+ padding-left: 15px;
2123
+ }
2124
+
2125
+ .spf-field-sorter .spf-disabled,
2126
+ .spf-field-sorter .spf-enabled {
2127
+ padding: 5px 15px;
2128
+ border: 1px dashed #ddd;
2129
+ background-color: #fff;
2130
+ }
2131
+
2132
+ .spf-field-sorter .spf-disabled li {
2133
+ -moz-transition: opacity 0.15s;
2134
+ -o-transition: opacity 0.15s;
2135
+ -webkit-transition: opacity 0.15s;
2136
+ transition: opacity 0.15s;
2137
+ opacity: 0.5;
2138
+ }
2139
+
2140
+ .spf-field-sorter .spf-disabled .ui-sortable-helper {
2141
+ opacity: 1;
2142
+ }
2143
+
2144
+ .spf-field-sorter .spf-sorter-title {
2145
+ font-size: 13px;
2146
+ font-weight: 600;
2147
+ padding: 10px;
2148
+ text-align: center;
2149
+ border: 1px dashed #ddd;
2150
+ border-bottom: none;
2151
+ background-color: #f8f8f8;
2152
+ text-transform: uppercase;
2153
+ }
2154
+
2155
+ .spf-field-sorter ul {
2156
+ list-style-type: none;
2157
+ margin: 0;
2158
+ padding: 0;
2159
+ min-height: 62px;
2160
+ }
2161
+
2162
+ .spf-field-sorter ul li {
2163
+ margin: 10px 0;
2164
+ padding: 10px 15px;
2165
+ cursor: move;
2166
+ font-weight: bold;
2167
+ text-align: center;
2168
+ border: 1px solid #e5e5e5;
2169
+ background-color: #fafafa;
2170
+ -moz-transition: border-color 0.15s;
2171
+ -o-transition: border-color 0.15s;
2172
+ -webkit-transition: border-color 0.15s;
2173
+ transition: border-color 0.15s;
2174
+ }
2175
+
2176
+ .spf-field-sorter ul li:hover {
2177
+ border-color: #bbb;
2178
+ }
2179
+
2180
+ /**
2181
+ * 03. 25. Field: spinner
2182
+ */
2183
+
2184
+ .spf-field-spinner .spf--spin {
2185
+ float: left;
2186
+ }
2187
+
2188
+ .spf-field-spinner .spf--unit {
2189
+ float: right;
2190
+ height: 30px;
2191
+ line-height: 26px;
2192
+ text-align: center;
2193
+ border-left: none;
2194
+ color: #999;
2195
+ border: 1px solid #ddd;
2196
+ border-left: 0;
2197
+ background-color: #eee;
2198
+ padding: 0 6px;
2199
+ margin: 0;
2200
+ box-sizing: border-box;
2201
+ }
2202
+
2203
+ .spf-field-spinner .ui-spinner-button {
2204
+ cursor: pointer;
2205
+ position: relative;
2206
+ overflow: hidden;
2207
+ margin: 0;
2208
+ padding: 0;
2209
+ width: 30px;
2210
+ height: 30px;
2211
+ line-height: 30px;
2212
+ text-align: center;
2213
+ border: 1px solid #ddd;
2214
+ color: #555;
2215
+ background-color: #eee;
2216
+ box-sizing: border-box;
2217
+ }
2218
+
2219
+ .spf-field-spinner .ui-spinner-button:hover {
2220
+ background-color: #e7e7e7;
2221
+ }
2222
+
2223
+ .spf-field-spinner .ui-spinner-button:active {
2224
+ background-color: #ddd;
2225
+ }
2226
+
2227
+ .spf-field-spinner .ui-spinner-button:before {
2228
+ font-family: FontAwesome;
2229
+ font-size: 16px;
2230
+ line-height: 16px;
2231
+ }
2232
+
2233
+ .spf-field-spinner .ui-spinner-down {
2234
+ float: left;
2235
+ border-right: 0;
2236
+ border-radius: 2px 0 0 2px;
2237
+ }
2238
+
2239
+ .spf-field-spinner .ui-spinner-down:before {
2240
+ content: "\f0d9";
2241
+ }
2242
+
2243
+ .spf-field-spinner .ui-spinner-up {
2244
+ float: right;
2245
+ border-left: 0;
2246
+ border-radius: 0 2px 2px 0;
2247
+ }
2248
+
2249
+ .spf-field-spinner .ui-spinner-up:before {
2250
+ content: "\f0da";
2251
+ }
2252
+
2253
+ .spf-field-spinner input {
2254
+ width: 50px;
2255
+ text-align: center;
2256
+ margin: 0;
2257
+ padding: 0 8px;
2258
+ height: 30px;
2259
+ line-height: 30px;
2260
+ border: 1px solid #ddd;
2261
+ }
2262
+
2263
+ .spf-field-spinner input:focus {
2264
+ outline: none;
2265
+ }
2266
+
2267
+ .spf-field-spinner .ui-button-text {
2268
+ display: none;
2269
+ }
2270
+
2271
+ /**
2272
+ * 03. 26. Field: switcher, switcherf
2273
+ */
2274
+
2275
+ .spf-field-switcher .spf--switcher,
2276
+ .spf-field-switcherf .spf--switcher {
2277
+ float: left;
2278
+ cursor: pointer;
2279
+ position: relative;
2280
+ width: 60px;
2281
+ height: 26px;
2282
+ padding: 0;
2283
+ margin: 0;
2284
+ overflow: hidden;
2285
+ border-radius: 4px;
2286
+ background-color: #ed6f6f;
2287
+ user-select: none;
2288
+ -webkit-user-select: none;
2289
+ }
2290
+
2291
+ .spf-field-switcherf .spf--ball,
2292
+ .spf-field-switcher .spf--ball {
2293
+ position: absolute;
2294
+ top: 4px;
2295
+ left: 4px;
2296
+ width: 24px;
2297
+ height: 18px;
2298
+ background-color: #fff;
2299
+ border-radius: 4px;
2300
+ transition: all .1s;
2301
+ box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15);
2302
+ }
2303
+
2304
+ .spf-field-switcherf .spf--on,
2305
+ .spf-field-switcherf .spf--off,
2306
+ .spf-field-switcher .spf--on,
2307
+ .spf-field-switcher .spf--off {
2308
+ position: absolute;
2309
+ top: 0;
2310
+ left: 0;
2311
+ right: 0;
2312
+ font-size: 11px;
2313
+ line-height: 26px;
2314
+ font-weight: 500;
2315
+ font-style: normal;
2316
+ text-align: center;
2317
+ text-transform: uppercase;
2318
+ color: #fff;
2319
+ padding-right: 28px;
2320
+ opacity: 0;
2321
+ transition: all .1s;
2322
+ }
2323
+
2324
+ .spf-field-switcherf .spf--off,
2325
+ .spf-field-switcher .spf--off {
2326
+ padding-right: 0;
2327
+ padding-left: 28px;
2328
+ opacity: 1;
2329
+ }
2330
+
2331
+ /* .spf-field-switcherf .spf--active, */
2332
+ .spf-field-switcher .spf--active {
2333
+ background: #4fb845;
2334
+ }
2335
+
2336
+ .spf-field-switcherf .spf--active .spf--on,
2337
+ .spf-field-switcher .spf--active .spf--on {
2338
+ opacity: 1;
2339
+ }
2340
+
2341
+ .spf-field-switcherf .spf--active .spf--off,
2342
+ .spf-field-switcher .spf--active .spf--off {
2343
+ opacity: 0;
2344
+ }
2345
+
2346
+ .spf-field-switcherf .spf--active .spf--ball,
2347
+ .spf-field-switcher .spf--active .spf--ball {
2348
+ left: 100%;
2349
+ margin-left: -28px;
2350
+ }
2351
+
2352
+ .spf-field-switcherf .spf--label,
2353
+ .spf-field-switcher .spf--label {
2354
+ float: left;
2355
+ margin-top: 4px;
2356
+ margin-left: 8px;
2357
+ font-weight: 400;
2358
+ color: #999;
2359
+ }
2360
+
2361
+ .spf-field-switcherf input,
2362
+ .spf-field-switcher input {
2363
+ display: none;
2364
+ }
2365
+
2366
+ /**
2367
+ * 03. 27. Field: tabbed
2368
+ */
2369
+
2370
+ .spf-field-tabbed .spf-tabbed-section {
2371
+ border: 1px solid #eee;
2372
+ background: #fff;
2373
+ }
2374
+
2375
+ .spf-field-tabbed .spf-tabbed-nav .spf--icon {
2376
+ padding-right: 5px;
2377
+ }
2378
+
2379
+ .spf-field-tabbed .spf-tabbed-nav a {
2380
+ display: inline-block;
2381
+ padding: 12px 15px;
2382
+ margin-top: 1px;
2383
+ margin-right: 5px;
2384
+ margin-bottom: -1px;
2385
+ position: relative;
2386
+ text-decoration: none;
2387
+ color: #444;
2388
+ font-weight: 600;
2389
+ background-color: #f3f3f3;
2390
+ border: 1px solid #eee;
2391
+ -moz-transition: all 0.2s;
2392
+ -o-transition: all 0.2s;
2393
+ -webkit-transition: all 0.2s;
2394
+ transition: all 0.2s;
2395
+ }
2396
+
2397
+ .spf-field-tabbed .spf-tabbed-nav a:hover {
2398
+ background-color: #f9f9f9;
2399
+ }
2400
+
2401
+ .spf-field-tabbed .spf-tabbed-nav a.spf-tabbed-active {
2402
+ background-color: #fff;
2403
+ border-bottom-color: #fff;
2404
+ }
2405
+
2406
+ .spf-field-tabbed .spf-tabbed-nav a:focus {
2407
+ -moz-box-shadow: none;
2408
+ -webkit-box-shadow: none;
2409
+ box-shadow: none;
2410
+ }
2411
+
2412
+ /**
2413
+ * 03. 28. Field: text
2414
+ */
2415
+
2416
+ .spf-field-text input {
2417
+ width: 340px;
2418
+ max-width: 100%;
2419
+ }
2420
+
2421
+ /**
2422
+ * 03. 29. Field: textarea
2423
+ */
2424
+
2425
+ .spf-field-textarea textarea {
2426
+ width: 100%;
2427
+ max-width: 100%;
2428
+ min-height: 125px;
2429
+ }
2430
+
2431
+ .spf-field-textarea .spf-shortcode-button {
2432
+ margin-bottom: 10px;
2433
+ margin-right: 5px;
2434
+ }
2435
+
2436
+ /**
2437
+ * 03. 30. Field: typography
2438
+ */
2439
+
2440
+ .spf-field-typography textarea,
2441
+ .spf-field-typography select {
2442
+ margin: 0;
2443
+ width: 100%;
2444
+ }
2445
+
2446
+ .spf-field-typography .spf--title {
2447
+ color: #999;
2448
+ margin: 0 0 2px 0;
2449
+ }
2450
+
2451
+ .spf-field-typography .spf--title small {
2452
+ vertical-align: top;
2453
+ }
2454
+
2455
+ .spf-field-typography .spf--blocks {
2456
+ display: flex;
2457
+ flex-wrap: wrap;
2458
+ }
2459
+
2460
+ .spf-field-typography .spf--block {
2461
+ padding-right: 5px;
2462
+ padding-bottom: 10px;
2463
+ box-sizing: border-box;
2464
+ }
2465
+
2466
+ .spf-field-typography .spf--block .spf--block {
2467
+ padding-right: 0;
2468
+ padding-bottom: 0;
2469
+ }
2470
+
2471
+ .spf-field-typography .spf--blocks-selects .spf--block {
2472
+ flex: 1 33.3%;
2473
+ }
2474
+
2475
+ .spf-field-typography .spf--blocks-inputs .spf--block {
2476
+ flex: 1 25%;
2477
+ }
2478
+
2479
+ .spf-field-typography .spf--blocks-inputs .spf--block .spf--block {
2480
+ flex: 1;
2481
+ }
2482
+
2483
+ .spf-field-typography .spf--input {
2484
+ margin: 0;
2485
+ width: 100%;
2486
+ padding: 5px 5px;
2487
+ }
2488
+
2489
+ .spf-field-typography .spf--unit {
2490
+ min-width: 40px;
2491
+ max-width: 40px;
2492
+ padding: 4px 0;
2493
+ font-size: 12px;
2494
+ font-weight: 400;
2495
+ text-align: center;
2496
+ color: #777;
2497
+ border: 1px solid #ddd;
2498
+ background-color: #eee;
2499
+ border-radius: 0 2px 2px 0;
2500
+ border-left: 0;
2501
+ }
2502
+
2503
+ .spf-field-typography .spf--preview {
2504
+ font-size: 16px;
2505
+ line-height: 20px;
2506
+ padding: 20px;
2507
+ color: #222;
2508
+ border: 1px solid #eee;
2509
+ background-color: #fff;
2510
+ border-radius: 2.5px;
2511
+ user-select: none;
2512
+ -webkit-user-select: none;
2513
+ transition: background-color .2s, border-color .2s;
2514
+ }
2515
+
2516
+ .spf-field-typography .spf--block-preview {
2517
+ cursor: pointer;
2518
+ position: relative;
2519
+ overflow: hidden;
2520
+ margin-top: 10px;
2521
+ max-width: 100%;
2522
+ }
2523
+
2524
+ .spf-field-typography .spf--black-background {
2525
+ border-color: #000;
2526
+ background-color: #000;
2527
+ }
2528
+
2529
+ .spf-field-typography .spf--toggle {
2530
+ position: absolute;
2531
+ top: 5px;
2532
+ right: 10px;
2533
+ color: #999;
2534
+ }
2535
+
2536
+ .spf-field-typography .spf--block-extra-styles {
2537
+ margin-top: 5px;
2538
+ }
2539
+
2540
+ /**
2541
+ * 03. 31. Field: upload
2542
+ */
2543
+
2544
+ .spf-field-upload input {
2545
+ width: 100%;
2546
+ }
2547
+
2548
+ .spf-field-upload .spf--wrap {
2549
+ display: flex;
2550
+ }
2551
+
2552
+ .spf-field-upload .spf--buttons {
2553
+ display: flex;
2554
+ margin-left: 5px;
2555
+ }
2556
+
2557
+ .spf-field-upload .spf--remove {
2558
+ margin-left: 5px;
2559
+ }
2560
+
2561
+ /**
2562
+ * 03. 32. Field: wp_editor
2563
+ */
2564
+
2565
+ .spf-field-wp_editor .spf-wp-editor {
2566
+ float: left;
2567
+ width: 100%;
2568
+ }
2569
+
2570
+ .spf-field-wp_editor .mce-toolbar-grp {
2571
+ border: none;
2572
+ }
2573
+
2574
+ .spf-field-wp_editor .mce-btn.mce-active button,
2575
+ .spf-field-wp_editor .mce-btn.mce-active:hover button,
2576
+ .spf-field-wp_editor .mce-btn.mce-active i,
2577
+ .spf-field-wp_editor .mce-btn.mce-active:hover i {
2578
+ color: #23282d;
2579
+ }
2580
+
2581
+ .spf-field-wp_editor .wp-media-buttons {
2582
+ position: relative;
2583
+ z-index: 2;
2584
+ }
2585
+
2586
+ .spf-field-wp_editor .wp-editor-tabs {
2587
+ position: relative;
2588
+ z-index: 1;
2589
+ }
2590
+
2591
+ .spf-field-wp_editor .spf-no-tinymce {
2592
+ border: 1px solid #e5e5e5;
2593
+ }
2594
+
2595
+ .spf-field-wp_editor .spf-no-quicktags .wp-media-buttons {
2596
+ float: none;
2597
+ display: block;
2598
+ }
2599
+
2600
+ .spf-field-wp_editor .spf-no-quicktags .mce-tinymce {
2601
+ box-shadow: none;
2602
+ border: 1px solid #e5e5e5;
2603
+ }
2604
+
2605
+ .spf-field-wp_editor textarea {
2606
+ width: 100%;
2607
+ max-width: 100%;
2608
+ margin: 0;
2609
+ box-shadow: none;
2610
+ }
2611
+
2612
+ /**
2613
+ * 03. 33. Field: heading
2614
+ */
2615
+
2616
+ .spf-field-heading {
2617
+ font-size: 1.5em;
2618
+ font-weight: bold;
2619
+ color: #23282d;
2620
+ background-color: #f5f5f5;
2621
+ }
2622
+
2623
+ /**
2624
+ * 03. 34. Field: subheading
2625
+ */
2626
+
2627
+ .spf-field-subheading {
2628
+ font-size: 14px;
2629
+ font-weight: bold;
2630
+ padding-top: 17px;
2631
+ padding-bottom: 17px;
2632
+ color: #23282d;
2633
+ background-color: #f7f7f7;
2634
+ }
2635
+
2636
+ /**
2637
+ * 03. 35. Field: submessage
2638
+ */
2639
+
2640
+ .spf-field-submessage {
2641
+ padding: 0 !important;
2642
+ border: 0 !important;
2643
+ }
2644
+
2645
+ .spf-field-submessage+.spf-field {
2646
+ border-top: 0 !important;
2647
+ }
2648
+
2649
+ .spf-submessage {
2650
+ font-size: 12px;
2651
+ padding: 17px 30px;
2652
+ border-top: 1px solid transparent;
2653
+ border-bottom: 1px solid transparent;
2654
+ }
2655
+
2656
+ .spf-submessage-success {
2657
+ color: #3c763d;
2658
+ border-color: #d6e9c6;
2659
+ background-color: #dff0d8;
2660
+ }
2661
+
2662
+ .spf-submessage-info {
2663
+ color: #31708f;
2664
+ border-color: #bce8f1;
2665
+ background-color: #d9edf7;
2666
+ }
2667
+
2668
+ .spf-submessage-warning {
2669
+ color: #8a6d3b;
2670
+ border-color: #faebcc;
2671
+ background-color: #fcf8e3;
2672
+ }
2673
+
2674
+ .spf-submessage-danger {
2675
+ color: #a94442;
2676
+ border-color: #ebccd1;
2677
+ background-color: #f2dede;
2678
+ }
2679
+
2680
+ .spf-submessage-normal {
2681
+ color: #23282d;
2682
+ border-color: #eee;
2683
+ background-color: #f7f7f7;
2684
+ }
2685
+
2686
+ /**
2687
+ * 03. 36. Field: notice
2688
+ */
2689
+
2690
+ .spf-field-notice {
2691
+ background-color: #f7f7f7;
2692
+ }
2693
+
2694
+ .spf-notice {
2695
+ padding: 12px;
2696
+ background-color: #fff;
2697
+ border-left-style: solid;
2698
+ border-left-width: 4px;
2699
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
2700
+ }
2701
+
2702
+ .spf-notice-success {
2703
+ border-color: #46b450;
2704
+ }
2705
+
2706
+ .spf-notice-info {
2707
+ border-color: #339fd4;
2708
+ }
2709
+
2710
+ .spf-notice-warning {
2711
+ border-color: #ffbc00;
2712
+ }
2713
+
2714
+ .spf-notice-danger {
2715
+ border-color: #dc3232;
2716
+ }
2717
+
2718
+ .spf-notice-normal {
2719
+ border-color: #222;
2720
+ }
2721
+
2722
+ /**
2723
+ * 03. 37. others
2724
+ */
2725
+
2726
+ .spf-help {
2727
+ cursor: help;
2728
+ position: absolute;
2729
+ top: 0;
2730
+ right: 0;
2731
+ padding: 5px;
2732
+ font-size: 14px;
2733
+ color: #aaa;
2734
+ }
2735
+
2736
+ .spf-help .spf-help-text {
2737
+ display: none;
2738
+ }
2739
+
2740
+ .spf-image-preview {
2741
+ display: inline-block;
2742
+ position: relative;
2743
+ padding: 4px;
2744
+ min-width: 44px;
2745
+ min-height: 22px;
2746
+ margin-bottom: 10px;
2747
+ border: 1px solid #ccc;
2748
+ background-color: #f9f9f9;
2749
+ -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
2750
+ -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
2751
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
2752
+ }
2753
+
2754
+ .spf-image-preview img {
2755
+ max-height: 90px;
2756
+ display: inline-block;
2757
+ vertical-align: middle;
2758
+ }
2759
+
2760
+ .spf-field-custom .spf-field {
2761
+ padding: 0;
2762
+ }
2763
+
2764
+ .spf-field .chosen-container-single .chosen-single {
2765
+ height: 28px;
2766
+ line-height: 26px;
2767
+ }
2768
+
2769
+ .spf-field .chosen-container-single .chosen-single abbr {
2770
+ top: 0;
2771
+ right: 20px;
2772
+ font-family: FontAwesome;
2773
+ font-size: 12px;
2774
+ height: 100%;
2775
+ width: 18px;
2776
+ color: #aaa;
2777
+ text-align: center;
2778
+ background: none;
2779
+ }
2780
+
2781
+ .spf-field .chosen-container-single .chosen-single abbr:before {
2782
+ content: "\f00d";
2783
+ }
2784
+
2785
+ .spf-field .chosen-container-single .chosen-single abbr:hover {
2786
+ color: #555;
2787
+ }
2788
+
2789
+ .spf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
2790
+ font-family: FontAwesome;
2791
+ font-size: 12px;
2792
+ height: 100%;
2793
+ width: 18px;
2794
+ color: #aaa;
2795
+ text-align: center;
2796
+ background: none;
2797
+ }
2798
+
2799
+ .spf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:before {
2800
+ content: "\f00d";
2801
+ }
2802
+
2803
+ .spf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
2804
+ color: #555;
2805
+ }
2806
+
2807
+ .spf-field .chosen-container-single .chosen-single div b {
2808
+ font-family: FontAwesome;
2809
+ font-size: 14px;
2810
+ color: #aaa;
2811
+ background: none;
2812
+ }
2813
+
2814
+ .spf-field .chosen-container-single .chosen-single div b:before {
2815
+ content: "\f107";
2816
+ }
2817
+
2818
+ .spf-field .chosen-container-single .chosen-single div b:hover {
2819
+ color: #555;
2820
+ }
2821
+
2822
+ .spf-field .chosen-container-active.chosen-with-drop .chosen-single div b:before {
2823
+ content: "\f106";
2824
+ }
2825
+
2826
+ .spf-field .chosen-container-single .chosen-single-with-deselect span {
2827
+ margin-right: 40px;
2828
+ }
2829
+
2830
+ .spf-field .chosen-container-single .chosen-search input[type="text"] {
2831
+ background: none;
2832
+ }
2833
+
2834
+ .spf-field .chosen-container-single .chosen-search:before {
2835
+ font-family: FontAwesome;
2836
+ position: absolute;
2837
+ content: "\f002";
2838
+ font-size: 11px;
2839
+ right: 10px;
2840
+ top: 7px;
2841
+ color: #aaa;
2842
+ }
2843
+
2844
+ .spf-field .wp-picker-container {
2845
+ display: inline-block;
2846
+ }
2847
+
2848
+ .spf-field .spf--transparent-wrap {
2849
+ display: none;
2850
+ position: relative;
2851
+ top: -1px;
2852
+ width: 235px;
2853
+ padding: 9px 10px;
2854
+ border: 1px solid #dfdfdf;
2855
+ border-top: none;
2856
+ background-color: #fff;
2857
+ }
2858
+
2859
+ .spf-field .spf--transparent-slider {
2860
+ position: absolute;
2861
+ width: 190px;
2862
+ margin-left: 2px;
2863
+ height: 18px;
2864
+ }
2865
+
2866
+ .spf-field .spf--transparent-slider .ui-slider-handle {
2867
+ position: absolute;
2868
+ top: -3px;
2869
+ bottom: -3px;
2870
+ z-index: 5;
2871
+ border-color: #aaa;
2872
+ border-style: solid;
2873
+ border-width: 4px 3px;
2874
+ width: 10px;
2875
+ height: 16px;
2876
+ margin: 0 -5px;
2877
+ background: none;
2878
+ cursor: ew-resize;
2879
+ opacity: 0.9;
2880
+ -moz-border-radius: 4px;
2881
+ -webkit-border-radius: 4px;
2882
+ border-radius: 4px;
2883
+ -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
2884
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
2885
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
2886
+ }
2887
+
2888
+ .spf-field .spf--transparent-slider .ui-slider-handle:before {
2889
+ content: " ";
2890
+ position: absolute;
2891
+ left: -2px;
2892
+ right: -2px;
2893
+ top: -3px;
2894
+ bottom: -3px;
2895
+ border: 2px solid #fff;
2896
+ -moz-border-radius: 3px;
2897
+ -webkit-border-radius: 3px;
2898
+ border-radius: 3px;
2899
+ }
2900
+
2901
+ .spf-field .spf--transparent-offset {
2902
+ height: 18px;
2903
+ width: 200px;
2904
+ background: url(../images/checkerboard.png) repeat-y center left scroll #fff;
2905
+ -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.4) inset;
2906
+ -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.4) inset;
2907
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.4) inset;
2908
+ -moz-border-radius: 2px;
2909
+ -webkit-border-radius: 2px;
2910
+ border-radius: 2px;
2911
+ }
2912
+
2913
+ .spf-field .spf--transparent-text {
2914
+ position: absolute;
2915
+ top: 12px;
2916
+ right: 10px;
2917
+ width: 30px;
2918
+ font-size: 12px;
2919
+ line-height: 12px;
2920
+ text-align: center;
2921
+ color: #999;
2922
+ }
2923
+
2924
+ .spf-field .spf--transparent-button {
2925
+ display: inline-block;
2926
+ text-align: center;
2927
+ cursor: pointer;
2928
+ margin-top: 10px;
2929
+ user-select: none;
2930
+ -webkit-user-select: none;
2931
+ color: #999;
2932
+ transition: background-color .2s, border-color .2s, color .2s;
2933
+ }
2934
+
2935
+ .spf-field .spf--transparent-active .wp-color-result {
2936
+ background-image: url(../images/checkerboard.png);
2937
+ background-size: 130%;
2938
+ background-position: center left;
2939
+ background-color: transparent !important;
2940
+ }
2941
+
2942
+ .spf-field .spf--transparent-active .spf--transparent-button {
2943
+ color: #fff;
2944
+ border-color: #4fb845;
2945
+ background-color: #4fb845;
2946
+ }
2947
+
2948
+ /**
2949
+ * 04. Widget
2950
+ */
2951
+
2952
+ .spf-widgets>.spf-field {
2953
+ position: relative;
2954
+ top: -1px;
2955
+ margin-right: -15px;
2956
+ margin-left: -15px;
2957
+ padding: 12px 15px;
2958
+ }
2959
+
2960
+ .spf-widgets>.spf-field .spf-field {
2961
+ margin-left: 0;
2962
+ margin-right: 0;
2963
+ }
2964
+
2965
+ .spf-widgets>.spf-field .spf-title {
2966
+ float: none;
2967
+ width: 100%;
2968
+ margin-bottom: 5px;
2969
+ }
2970
+
2971
+ .spf-widgets>.spf-field .spf-fieldset {
2972
+ margin-left: 0;
2973
+ }
2974
+
2975
+ .spf-widgets .spf-field-text input {
2976
+ width: 100%;
2977
+ }
2978
+
2979
+ .spf-widgets .spf-field-notice .spf-notice {
2980
+ padding: 15px;
2981
+ }
2982
+
2983
+ .control-section .spf-widgets>.spf-field {
2984
+ margin-right: -10px;
2985
+ margin-left: -10px;
2986
+ padding: 10px 12px;
2987
+ }
2988
+
2989
+ /**
2990
+ * 05. Widget
2991
+ */
2992
+
2993
+ .control-section .spf-field {
2994
+ padding: 0;
2995
+ }
2996
+
2997
+ .control-section .spf-field .spf-title {
2998
+ float: none;
2999
+ width: 100%;
3000
+ margin-bottom: 10px;
3001
+ }
3002
+
3003
+ .control-section .spf-field .spf-title h4 {
3004
+ font-size: 14px;
3005
+ font-weight: 600;
3006
+ color: inherit;
3007
+ }
3008
+
3009
+ .control-section .spf-field .spf-fieldset {
3010
+ margin-left: 0;
3011
+ }
3012
+
3013
+ .control-section .spf-field-select select {
3014
+ width: 100%;
3015
+ }
3016
+
3017
+ .control-section .spf-field-heading {
3018
+ color: inherit;
3019
+ font-size: 14px;
3020
+ line-height: 1em;
3021
+ margin-right: -15px;
3022
+ margin-left: -15px;
3023
+ padding: 15px;
3024
+ }
3025
+
3026
+ .control-section .spf-field-subheading {
3027
+ color: inherit;
3028
+ font-size: 11px;
3029
+ margin-right: -15px;
3030
+ margin-left: -15px;
3031
+ padding: 10px 15px;
3032
+ }
3033
+
3034
+ .control-section .spf-text-subtitle {
3035
+ margin-top: 4px;
3036
+ font-size: 12px;
3037
+ }
3038
+
3039
+ .control-section .spf-field-content,
3040
+ .control-section .spf-field-submessage .spf-submessage {
3041
+ margin-right: -15px;
3042
+ margin-left: -15px;
3043
+ padding: 15px;
3044
+ }
3045
+
3046
+ .control-section .spf-fieldset .spf-field-submessage .spf-submessage,
3047
+ .control-section .spf-fieldset .spf-field-heading,
3048
+ .control-section .spf-fieldset .spf-field-subheading {
3049
+ margin-left: 0;
3050
+ margin-right: 0;
3051
+ }
3052
+
3053
+ .control-section .spf-field-date .spf--to {
3054
+ margin-left: 0;
3055
+ }
3056
+
3057
+ .control-section .spf-field-sorter ul li {
3058
+ padding: 5px;
3059
+ }
3060
+
3061
+ .control-section .spf-field-sorter .spf-modules {
3062
+ float: none;
3063
+ width: 100%;
3064
+ }
3065
+
3066
+ .control-section .spf-field-sorter .spf-modules:first-child {
3067
+ padding-right: 0;
3068
+ padding-bottom: 15px;
3069
+ }
3070
+
3071
+ .control-section .spf-field-background_adv .spf--select,
3072
+ .control-section .spf-field-background .spf--select {
3073
+ width: 100%;
3074
+ }
3075
+
3076
+ .control-section .spf-field-border select,
3077
+ .control-section .spf-field-spacing select,
3078
+ .control-section .spf-field-column select,
3079
+ .control-section .spf-field-dimensions select,
3080
+ .control-section .spf-field-dimensions_advanced select {
3081
+ width: auto;
3082
+ }
3083
+
3084
+ .control-section .spf-field-spinner input {
3085
+ width: 50px;
3086
+ }
3087
+
3088
+ .control-section .spf-field-backup .spf-export-data {
3089
+ display: none;
3090
+ }
3091
+
3092
+ .control-section .spf-field-fieldset .spf-fieldset-content {
3093
+ border-color: #e5e5e5;
3094
+ }
3095
+
3096
+ .control-section .spf-field-fieldset .spf-field {
3097
+ padding: 10px;
3098
+ }
3099
+
3100
+ .control-section .spf-field-fieldset .spf-field .spf-title {
3101
+ margin-bottom: 5px;
3102
+ }
3103
+
3104
+ .control-section .spf-field-fieldset .spf-field h4 {
3105
+ font-size: 12px;
3106
+ }
3107
+
3108
+ .control-section .spf-field-group .spf-field,
3109
+ .control-section .spf-field-tabbed .spf-field,
3110
+ .control-section .spf-field-sortable .spf-field,
3111
+ .control-section .spf-field-repeater .spf-field,
3112
+ .control-section .spf-field-accordion .spf-field {
3113
+ padding: 10px;
3114
+ }
3115
+
3116
+ .control-section .spf-field-group .spf-field .spf-title,
3117
+ .control-section .spf-field-tabbed .spf-field .spf-title,
3118
+ .control-section .spf-field-sortable .spf-field .spf-title,
3119
+ .control-section .spf-field-repeater .spf-field .spf-title,
3120
+ .control-section .spf-field-accordion .spf-field .spf-title {
3121
+ margin-bottom: 5px;
3122
+ }
3123
+
3124
+ .control-section .spf-field-group .spf-field h4,
3125
+ .control-section .spf-field-tabbed .spf-field h4,
3126
+ .control-section .spf-field-sortable .spf-field h4,
3127
+ .control-section .spf-field-repeater .spf-field h4,
3128
+ .control-section .spf-field-accordion .spf-field h4 {
3129
+ font-size: 12px;
3130
+ }
3131
+
3132
+ .control-section .spf-dependency-control.hidden {
3133
+ display: none !important;
3134
+ }
3135
+
3136
+ /**
3137
+ * 06. Taxonomy
3138
+ */
3139
+
3140
+ .spf-taxonomy>.spf-field {
3141
+ border-top: none !important;
3142
+ }
3143
+
3144
+ .spf-taxonomy>.spf-field-heading {
3145
+ font-size: 1.1em;
3146
+ padding: 20px !important;
3147
+ border: 1px solid #ddd;
3148
+ }
3149
+
3150
+ .spf-taxonomy>.spf-field-subheading {
3151
+ font-size: 12px;
3152
+ padding: 15px !important;
3153
+ border: 1px solid #ddd;
3154
+ }
3155
+
3156
+ .spf-taxonomy>.spf-field-submessage .spf-submessage {
3157
+ padding: 15px;
3158
+ border-left-width: 1px;
3159
+ border-left-style: solid;
3160
+ border-right-width: 1px;
3161
+ border-right-style: solid;
3162
+ }
3163
+
3164
+ .spf-taxonomy>.spf-field-notice {
3165
+ background-color: transparent;
3166
+ }
3167
+
3168
+ .spf-taxonomy .spf-section-title {
3169
+ display: block;
3170
+ padding: 15px;
3171
+ background-color: #f9f9f9;
3172
+ border: 1px solid #e5e5e5;
3173
+ -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
3174
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
3175
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
3176
+ }
3177
+
3178
+ .spf-taxonomy-add-fields>.spf-field {
3179
+ padding: 8px 0;
3180
+ }
3181
+
3182
+ .spf-taxonomy-add-fields>.spf-field>.spf-title {
3183
+ float: none;
3184
+ width: 100%;
3185
+ padding: 2px 2px 4px 0;
3186
+ }
3187
+
3188
+ .spf-taxonomy-add-fields>.spf-field>.spf-title h4 {
3189
+ font-size: 12px;
3190
+ font-weight: normal;
3191
+ }
3192
+
3193
+ .spf-taxonomy-add-fields>.spf-field>.spf-fieldset {
3194
+ margin-left: 0;
3195
+ }
3196
+
3197
+ .spf-taxonomy-add-fields>.spf-field>.spf-fieldset>.spf-help {
3198
+ right: -5px;
3199
+ }
3200
+
3201
+ .spf-taxonomy-add-fields+p.submit {
3202
+ margin-top: 0;
3203
+ }
3204
+
3205
+ .spf-taxonomy-edit-fields>.spf-field {
3206
+ padding: 20px 0;
3207
+ }
3208
+
3209
+ .spf-taxonomy-edit-fields>.spf-field>.spf-title {
3210
+ width: 225px;
3211
+ }
3212
+
3213
+ .spf-taxonomy-edit-fields>.spf-field>.spf-title h4 {
3214
+ font-size: 14px;
3215
+ font-weight: 600;
3216
+ line-height: 1.3;
3217
+ display: inline-block;
3218
+ vertical-align: middle;
3219
+ }
3220
+
3221
+ .spf-taxonomy-edit-fields>.spf-field>.spf-fieldset {
3222
+ margin-left: 225px;
3223
+ }
3224
+
3225
+ .spf-taxonomy-edit-fields>.spf-field>.spf-fieldset>.spf-help {
3226
+ top: -5px;
3227
+ right: -5px;
3228
+ }
3229
+
3230
+ .spf-taxonomy-edit-fields>.spf-field-submessage {
3231
+ margin: 20px 0;
3232
+ }
3233
+
3234
+ .spf-taxonomy-edit-fields>.spf-field-subheading,
3235
+ .spf-taxonomy-edit-fields>.spf-field-heading {
3236
+ margin: 20px 0;
3237
+ border: 1px solid #ddd;
3238
+ }
3239
+
3240
+ /**
3241
+ * 07. Profile
3242
+ */
3243
+
3244
+ .spf-profile>h2>.fa {
3245
+ padding-right: 7px;
3246
+ }
3247
+
3248
+ .spf-profile>.spf-field {
3249
+ padding: 15px 0;
3250
+ border-top: none !important;
3251
+ }
3252
+
3253
+ .spf-profile>.spf-field>.spf-title {
3254
+ width: 220px;
3255
+ }
3256
+
3257
+ .spf-profile>.spf-field>.spf-title h4 {
3258
+ font-size: 14px;
3259
+ font-weight: 600;
3260
+ line-height: 1.3;
3261
+ display: inline-block;
3262
+ vertical-align: middle;
3263
+ }
3264
+
3265
+ .spf-profile>.spf-field>.spf-fieldset {
3266
+ margin-left: 220px;
3267
+ }
3268
+
3269
+ .spf-profile>.spf-field>.spf-fieldset>.spf-help {
3270
+ top: -15px;
3271
+ right: -5px;
3272
+ }
3273
+
3274
+ .spf-profile>.spf-field-heading {
3275
+ font-size: 1.1em;
3276
+ }
3277
+
3278
+ .spf-profile>.spf-field-subheading {
3279
+ font-size: 12px;
3280
+ }
3281
+
3282
+ .spf-profile>.spf-field-subheading,
3283
+ .spf-profile>.spf-field-heading {
3284
+ margin: 10px 0;
3285
+ padding: 15px !important;
3286
+ border: 1px solid #ddd;
3287
+ }
3288
+
3289
+ .spf-profile>.spf-field-submessage {
3290
+ margin: 20px 0;
3291
+ }
3292
+
3293
+ .spf-profile>.spf-field-submessage .spf-submessage {
3294
+ padding: 10px;
3295
+ border-left-width: 1px;
3296
+ border-left-style: solid;
3297
+ border-right-width: 1px;
3298
+ border-right-style: solid;
3299
+ }
3300
+
3301
+ .spf-profile>.spf-field-notice {
3302
+ background-color: transparent;
3303
+ }
3304
+
3305
+ /**
3306
+ * 08. Modal
3307
+ */
3308
+
3309
+ .spf-modal {
3310
+ display: none;
3311
+ position: fixed;
3312
+ z-index: 100101;
3313
+ top: 0;
3314
+ left: 0;
3315
+ width: 100%;
3316
+ height: 100%;
3317
+ }
3318
+
3319
+ .spf-modal-icon {
3320
+ z-index: 100102;
3321
+ }
3322
+
3323
+ .spf-modal-table {
3324
+ display: table;
3325
+ width: 100%;
3326
+ height: 100%;
3327
+ }
3328
+
3329
+ .spf-modal-table-cell {
3330
+ display: table-cell;
3331
+ vertical-align: middle;
3332
+ margin: 100px 0;
3333
+ }
3334
+
3335
+ .spf-modal-inner {
3336
+ position: relative;
3337
+ z-index: 10;
3338
+ width: 760px;
3339
+ height: 750px;
3340
+ margin: 0 auto;
3341
+ background-color: #fff;
3342
+ }
3343
+
3344
+ .spf-modal-content {
3345
+ position: relative;
3346
+ overflow: hidden;
3347
+ overflow-y: auto;
3348
+ height: 592px;
3349
+ }
3350
+
3351
+ .spf-modal-content .spf-shortcode-button {
3352
+ display: none;
3353
+ }
3354
+
3355
+ .spf-modal-content .spf-fieldset {
3356
+ margin-left: 25%;
3357
+ }
3358
+
3359
+ .spf-modal-content .spf-title {
3360
+ width: 20%;
3361
+ }
3362
+
3363
+ .spf-modal-content .spf-field {
3364
+ padding: 15px 30px 15px 15px;
3365
+ }
3366
+
3367
+ .spf-modal-content a:active,
3368
+ .spf-modal-content a:focus {
3369
+ outline: none;
3370
+ -moz-box-shadow: none;
3371
+ -webkit-box-shadow: none;
3372
+ box-shadow: none;
3373
+ }
3374
+
3375
+ .spf-modal-content h4 {
3376
+ font-size: 13px;
3377
+ }
3378
+
3379
+ .spf-modal-content h4 small {
3380
+ font-style: italic;
3381
+ font-weight: 400;
3382
+ color: #aaa;
3383
+ }
3384
+
3385
+ .spf-modal-title {
3386
+ position: relative;
3387
+ background-color: #fcfcfc;
3388
+ border-bottom: 1px solid #ddd;
3389
+ height: 36px;
3390
+ font-size: 16px;
3391
+ font-weight: 600;
3392
+ line-height: 36px;
3393
+ margin: 0;
3394
+ padding: 0 36px 0 16px;
3395
+ }
3396
+
3397
+ .spf-modal-header {
3398
+ width: 100%;
3399
+ padding: 16px 0;
3400
+ background-color: #f5f5f5;
3401
+ border-bottom: 1px solid #eee;
3402
+ }
3403
+
3404
+ .spf-modal-header select {
3405
+ display: block;
3406
+ width: 250px;
3407
+ margin: 0 auto;
3408
+ background-color: #fff;
3409
+ }
3410
+
3411
+ .spf-modal-close {
3412
+ color: #666;
3413
+ padding: 0;
3414
+ position: absolute;
3415
+ top: 0;
3416
+ right: 0;
3417
+ width: 36px;
3418
+ height: 36px;
3419
+ text-align: center;
3420
+ background: none;
3421
+ border: none;
3422
+ cursor: pointer;
3423
+ }
3424
+
3425
+ .spf-modal-close:before {
3426
+ font: normal 20px/36px dashicons;
3427
+ content: "\f158";
3428
+ vertical-align: top;
3429
+ width: 36px;
3430
+ height: 36px;
3431
+ }
3432
+
3433
+ .spf-modal-close:hover {
3434
+ opacity: 0.5;
3435
+ }
3436
+
3437
+ .spf-modal-insert-wrapper {
3438
+ text-align: center;
3439
+ width: 100%;
3440
+ padding: 16px 0;
3441
+ background-color: #f5f5f5;
3442
+ border-top: 1px solid #eee;
3443
+ }
3444
+
3445
+ .spf-modal-overlay {
3446
+ position: absolute;
3447
+ top: 0;
3448
+ left: 0;
3449
+ width: 100%;
3450
+ height: 100%;
3451
+ background-color: #000;
3452
+ opacity: 0.5;
3453
+ }
3454
+
3455
+ /**
3456
+ * 08. 01. Shortcode Modal
3457
+ */
3458
+
3459
+ .spf--repeatable {
3460
+ padding: 15px 15px 0 15px;
3461
+ }
3462
+
3463
+ .spf--repeat-button-block {
3464
+ text-align: center;
3465
+ padding-bottom: 15px;
3466
+ }
3467
+
3468
+ .spf--repeat-shortcode {
3469
+ position: relative;
3470
+ margin-bottom: 15px;
3471
+ border: 1px dashed #ddd;
3472
+ }
3473
+
3474
+ .spf--repeat-shortcode:first-child .spf-repeat-remove {
3475
+ display: none;
3476
+ }
3477
+
3478
+ .spf--repeat-shortcode .spf-repeat-remove {
3479
+ position: absolute;
3480
+ right: 10px;
3481
+ top: 10px;
3482
+ z-index: 10;
3483
+ cursor: pointer;
3484
+ display: inline-block;
3485
+ font-size: 11px;
3486
+ width: 18px;
3487
+ height: 18px;
3488
+ line-height: 18px;
3489
+ text-align: center;
3490
+ border-radius: 2px;
3491
+ color: #fff;
3492
+ background-color: #e14d43;
3493
+ opacity: 0.5;
3494
+ }
3495
+
3496
+ .spf--repeat-shortcode .spf-repeat-remove:hover {
3497
+ opacity: 1;
3498
+ }
3499
+
3500
+ .spf-shortcode-single .spf-modal-inner {
3501
+ height: 750px;
3502
+ }
3503
+
3504
+ .spf-shortcode-single .spf-modal-content {
3505
+ height: 652px;
3506
+ }
3507
+
3508
+ .elementor-editor-active .spf-shortcode-button {
3509
+ margin-left: 5px;
3510
+ }
3511
+
3512
+ .elementor-editor-active .spf-modal .hidden {
3513
+ display: none !important;
3514
+ }
3515
+
3516
+ /**
3517
+ * 08. 02. Gutenberg Modal
3518
+ */
3519
+
3520
+ .spf-shortcode-block {
3521
+ text-align: center;
3522
+ padding: 14px;
3523
+ font-size: 13px;
3524
+ background-color: #f5f5f5;
3525
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
3526
+ }
3527
+
3528
+ .spf-shortcode-block .button {
3529
+ margin: 10px 0;
3530
+ }
3531
+
3532
+ /**
3533
+ * 08. 03. Icon Modal
3534
+ */
3535
+
3536
+ .spf-modal-icon .spf-icon-title {
3537
+ padding: 15px 0;
3538
+ margin: 4px;
3539
+ font-size: 14px;
3540
+ font-weight: bold;
3541
+ text-align: center;
3542
+ border: 1px solid #eee;
3543
+ background-color: #f7f7f7;
3544
+ }
3545
+
3546
+ .spf-modal-icon .spf-icon-search {
3547
+ width: 250px;
3548
+ height: 40px;
3549
+ line-height: 40px;
3550
+ }
3551
+
3552
+ .spf-modal-icon a {
3553
+ display: inline-block;
3554
+ padding: 4px;
3555
+ cursor: pointer;
3556
+ }
3557
+
3558
+ .spf-modal-icon a .spf-icon {
3559
+ position: relative;
3560
+ padding: 4px;
3561
+ display: inline-block;
3562
+ font-size: 14px;
3563
+ width: 30px;
3564
+ height: 26px;
3565
+ line-height: 26px;
3566
+ text-align: center;
3567
+ vertical-align: top;
3568
+ color: #555;
3569
+ border: 1px solid #ccc;
3570
+ background-color: #f7f7f7;
3571
+ -moz-border-radius: 3px;
3572
+ -webkit-border-radius: 3px;
3573
+ border-radius: 3px;
3574
+ -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
3575
+ -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
3576
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
3577
+ -moz-box-sizing: content-box;
3578
+ -webkit-box-sizing: content-box;
3579
+ box-sizing: content-box;
3580
+ }
3581
+
3582
+ .spf-modal-icon a:hover .spf-icon {
3583
+ color: #fff;
3584
+ border-color: #222;
3585
+ background-color: #222;
3586
+ }
3587
+
3588
+ .spf-modal-icon .spf-modal-content {
3589
+ padding: 10px;
3590
+ height: 618px;
3591
+ }
3592
+
3593
+ .spf-modal-icon .spf-text-error {
3594
+ padding: 10px;
3595
+ }
3596
+
3597
+ .spf-modal-loading {
3598
+ display: none;
3599
+ position: absolute;
3600
+ left: 15px;
3601
+ top: 15px;
3602
+ }
3603
+
3604
+ .spf-loading {
3605
+ position: relative;
3606
+ width: 20px;
3607
+ height: 20px;
3608
+ background: #ccc;
3609
+ -moz-border-radius: 20px;
3610
+ -webkit-border-radius: 20px;
3611
+ border-radius: 20px;
3612
+ -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.07);
3613
+ -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.07);
3614
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.07);
3615
+ }
3616
+
3617
+ .spf-loading:after {
3618
+ position: absolute;
3619
+ top: 50%;
3620
+ left: 50%;
3621
+ width: 4px;
3622
+ height: 4px;
3623
+ content: "";
3624
+ margin-top: -2px;
3625
+ margin-left: -2px;
3626
+ background-color: white;
3627
+ -moz-animation-duration: 0.5s;
3628
+ -webkit-animation-duration: 0.5s;
3629
+ animation-duration: 0.5s;
3630
+ -moz-animation-iteration-count: infinite;
3631
+ -webkit-animation-iteration-count: infinite;
3632
+ animation-iteration-count: infinite;
3633
+ -moz-animation-timing-function: linear;
3634
+ -webkit-animation-timing-function: linear;
3635
+ animation-timing-function: linear;
3636
+ -moz-animation-name: csfLoader;
3637
+ -webkit-animation-name: csfLoader;
3638
+ animation-name: csfLoader;
3639
+ -moz-border-radius: 4px;
3640
+ -webkit-border-radius: 4px;
3641
+ border-radius: 4px;
3642
+ }
3643
+
3644
+ @-moz-keyframes csfLoader {
3645
+ 0% {
3646
+ -moz-transform: rotate(0deg) translateX(-6px) rotate(0deg);
3647
+ transform: rotate(0deg) translateX(-6px) rotate(0deg);
3648
+ }
3649
+
3650
+ 100% {
3651
+ -moz-transform: rotate(360deg) translateX(-6px) rotate(-360deg);
3652
+ transform: rotate(360deg) translateX(-6px) rotate(-360deg);
3653
+ }
3654
+ }
3655
+
3656
+ @-webkit-keyframes csfLoader {
3657
+ 0% {
3658
+ -webkit-transform: rotate(0deg) translateX(-6px) rotate(0deg);
3659
+ transform: rotate(0deg) translateX(-6px) rotate(0deg);
3660
+ }
3661
+
3662
+ 100% {
3663
+ -webkit-transform: rotate(360deg) translateX(-6px) rotate(-360deg);
3664
+ transform: rotate(360deg) translateX(-6px) rotate(-360deg);
3665
+ }
3666
+ }
3667
+
3668
+ @keyframes csfLoader {
3669
+ 0% {
3670
+ -moz-transform: rotate(0deg) translateX(-6px) rotate(0deg);
3671
+ -ms-transform: rotate(0deg) translateX(-6px) rotate(0deg);
3672
+ -webkit-transform: rotate(0deg) translateX(-6px) rotate(0deg);
3673
+ transform: rotate(0deg) translateX(-6px) rotate(0deg);
3674
+ }
3675
+
3676
+ 100% {
3677
+ -moz-transform: rotate(360deg) translateX(-6px) rotate(-360deg);
3678
+ -ms-transform: rotate(360deg) translateX(-6px) rotate(-360deg);
3679
+ -webkit-transform: rotate(360deg) translateX(-6px) rotate(-360deg);
3680
+ transform: rotate(360deg) translateX(-6px) rotate(-360deg);
3681
+ }
3682
+ }
3683
+
3684
+ /**
3685
+ * 09. Helper
3686
+ */
3687
+
3688
+ .spf-text-desc,
3689
+ .spf-text-subtitle {
3690
+ font-weight: 400;
3691
+ font-style: italic;
3692
+ margin-top: 4px;
3693
+ color: #999;
3694
+ }
3695
+
3696
+ .spf-text-success {
3697
+ color: #2b542c;
3698
+ }
3699
+
3700
+ .spf-text-error {
3701
+ color: #d02c21;
3702
+ }
3703
+
3704
+ .spf-text-info {
3705
+ color: #31708f;
3706
+ }
3707
+
3708
+ .spf-text-warning {
3709
+ color: #ffb900;
3710
+ }
3711
+
3712
+ .spf-text-muted {
3713
+ color: #aaa;
3714
+ }
3715
+
3716
+ .spf-text-left {
3717
+ text-align: left;
3718
+ }
3719
+
3720
+ .spf-text-center {
3721
+ text-align: center;
3722
+ }
3723
+
3724
+ .spf-text-right {
3725
+ text-align: right;
3726
+ }
3727
+
3728
+ .spf-block-left {
3729
+ float: left;
3730
+ }
3731
+
3732
+ .spf-block-right {
3733
+ float: right;
3734
+ }
3735
+
3736
+ .spf-full-width {
3737
+ width: 100%;
3738
+ }
3739
+
3740
+ .spf-full-half {
3741
+ width: 50%;
3742
+ }
3743
+
3744
+ .spf-table {
3745
+ width: 100%;
3746
+ display: table;
3747
+ }
3748
+
3749
+ .spf-table-cell {
3750
+ display: table-cell;
3751
+ vertical-align: middle;
3752
+ }
3753
+
3754
+ .spf-table-expanded {
3755
+ width: 100%;
3756
+ }
3757
+
3758
+ .spf-nowrap {
3759
+ white-space: nowrap;
3760
+ }
3761
+
3762
+ .spf-text-highlight {
3763
+ padding: 2px 4px;
3764
+ font-size: 90%;
3765
+ color: #c7254e;
3766
+ background-color: #f9f2f4;
3767
+ -moz-border-radius: 2px;
3768
+ -webkit-border-radius: 2px;
3769
+ border-radius: 2px;
3770
+ }
3771
+
3772
+ .spf-text-highlight-gray {
3773
+ padding: 2px 4px;
3774
+ font-size: 90%;
3775
+ background-color: #f0f0f0;
3776
+ -moz-border-radius: 2px;
3777
+ -webkit-border-radius: 2px;
3778
+ border-radius: 2px;
3779
+ }
3780
+
3781
+ .spf-hidden {
3782
+ display: none;
3783
+ }
3784
+
3785
+ .spf-hide {
3786
+ display: none !important;
3787
+ }
3788
+
3789
+ .spf-show {
3790
+ display: block !important;
3791
+ }
3792
+
3793
+ .spf-opacity {
3794
+ opacity: 0.5;
3795
+ }
3796
+
3797
+ .spf-warning-primary {
3798
+ color: #fff !important;
3799
+ border-color: #d02c21 #ba281e #ba281e !important;
3800
+ background: #e14d43 !important;
3801
+ -moz-box-shadow: 0 1px 0 #ba281e !important;
3802
+ -webkit-box-shadow: 0 1px 0 #ba281e !important;
3803
+ box-shadow: 0 1px 0 #ba281e !important;
3804
+ text-shadow: 0 -1px 1px #ba281e, 1px 0 1px #ba281e, 0 1px 1px #ba281e, -1px 0 1px !important;
3805
+ text-shadow: 0 -1px 1px #ba281e, 1px 0 1px #ba281e, 0 1px 1px #ba281e, -1px 0 1px #ba281e !important;
3806
+ }
3807
+
3808
+ .spf-warning-primary:hover,
3809
+ .spf-warning-primary:focus {
3810
+ border-color: #ba281e !important;
3811
+ background: #e35950 !important;
3812
+ -moz-box-shadow: 0 1px 0 #ba281e !important;
3813
+ -webkit-box-shadow: 0 1px 0 #ba281e !important;
3814
+ box-shadow: 0 1px 0 #ba281e !important;
3815
+ }
3816
+
3817
+ .spf-warning-primary:active {
3818
+ border-color: #ba281e !important;
3819
+ background: #d02c21 !important;
3820
+ -moz-box-shadow: inset 0 2px 0 #ba281e !important;
3821
+ -webkit-box-shadow: inset 0 2px 0 #ba281e !important;
3822
+ box-shadow: inset 0 2px 0 #ba281e !important;
3823
+ }
3824
+
3825
+ .spf-form-result {
3826
+ display: none;
3827
+ padding: 12px;
3828
+ margin: 0 0 15px 0;
3829
+ background-color: #fff;
3830
+ border-left: 4px solid #555;
3831
+ -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
3832
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
3833
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
3834
+ }
3835
+
3836
+ .spf-form-show {
3837
+ display: block;
3838
+ }
3839
+
3840
+ .spf-form-error {
3841
+ border-left-color: #dc3232;
3842
+ }
3843
+
3844
+ .spf-form-success {
3845
+ border-left-color: #46b450;
3846
+ }
3847
+
3848
+ .spf-form-warning {
3849
+ border-left-color: #ffb900;
3850
+ }
3851
+
3852
+ .spf-form-info {
3853
+ border-left-color: #00a0d2;
3854
+ }
3855
+
3856
+ .spf-label-error {
3857
+ position: relative;
3858
+ top: -2px;
3859
+ display: inline-block;
3860
+ font-size: 10px;
3861
+ line-height: 10px;
3862
+ height: 10px;
3863
+ width: 10px;
3864
+ padding: 1px;
3865
+ font-style: normal;
3866
+ text-align: center;
3867
+ color: #fff;
3868
+ vertical-align: middle;
3869
+ background-color: #e10000;
3870
+ -moz-border-radius: 2px;
3871
+ -webkit-border-radius: 2px;
3872
+ border-radius: 2px;
3873
+ }
3874
+
3875
+ .spf-no-option {
3876
+ padding: 30px;
3877
+ }
3878
+
3879
+ /**
3880
+ * 10. Welcome Page
3881
+ */
3882
+
3883
+ .spf-welcome-wrap {
3884
+ position: relative;
3885
+ margin: 25px 40px 0 20px;
3886
+ font-size: 15px;
3887
+ max-width: 1200px;
3888
+ }
3889
+
3890
+ .spf-welcome-wrap p {
3891
+ font-size: 14px;
3892
+ line-height: 1.5;
3893
+ }
3894
+
3895
+ .spf-welcome-wrap h1 {
3896
+ margin: 0.2em 200px 0 0;
3897
+ padding: 0;
3898
+ color: #32373c;
3899
+ line-height: 1.2em;
3900
+ font-size: 2.8em;
3901
+ font-weight: 400;
3902
+ }
3903
+
3904
+ .spf-welcome-wrap .spf-logo {
3905
+ position: absolute;
3906
+ overflow: hidden;
3907
+ top: 0;
3908
+ right: 0;
3909
+ height: 160px;
3910
+ width: 140px;
3911
+ background-image: linear-gradient(45deg, #2d67cb, #ad19f3);
3912
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25), inset 0 0 0 4px rgba(0, 0, 0, 0.25);
3913
+ }
3914
+
3915
+ .spf-welcome-wrap .spf-logo .spf--effects i {
3916
+ position: absolute;
3917
+ width: 200px;
3918
+ height: 100px;
3919
+ background-color: rgba(0, 0, 0, 0.15);
3920
+ transform: rotate(-45deg);
3921
+ }
3922
+
3923
+ .spf-welcome-wrap .spf-logo .spf--effects i:nth-child(1) {
3924
+ bottom: -20px;
3925
+ right: -70px;
3926
+ }
3927
+
3928
+ .spf-welcome-wrap .spf-logo .spf--effects i:nth-child(2) {
3929
+ bottom: -35px;
3930
+ right: -80px;
3931
+ }
3932
+
3933
+ .spf-welcome-wrap .spf-logo .spf--effects i:nth-child(3) {
3934
+ bottom: -50px;
3935
+ right: -90px;
3936
+ }
3937
+
3938
+ .spf-welcome-wrap .spf-logo .spf--effects i:nth-child(4) {
3939
+ bottom: -65px;
3940
+ right: -100px;
3941
+ }
3942
+
3943
+ .spf-welcome-wrap .spf-logo .spf--wp-logos {
3944
+ position: relative;
3945
+ padding-top: 25px;
3946
+ text-align: center;
3947
+ }
3948
+
3949
+ .spf-welcome-wrap .spf-logo .spf--wp-logo {
3950
+ position: absolute;
3951
+ left: 20px;
3952
+ width: 20px;
3953
+ height: 20px;
3954
+ background-repeat: no-repeat;
3955
+ background-position: center center;
3956
+ background-image: url(../images/wp-logo.svg);
3957
+ }
3958
+
3959
+ .spf-welcome-wrap .spf-logo .spf--wp-plugin-logo {
3960
+ display: inline-block;
3961
+ width: 50px;
3962
+ height: 50px;
3963
+ border: 3px solid #fff;
3964
+ background-size: 40px;
3965
+ background-repeat: no-repeat;
3966
+ background-position: center center;
3967
+ background-image: url(../images/wp-plugin-logo.svg);
3968
+ border-radius: 100%;
3969
+ vertical-align: middle;
3970
+ }
3971
+
3972
+ .spf-welcome-wrap .spf-logo .spf--text {
3973
+ position: absolute;
3974
+ left: 0;
3975
+ right: 0;
3976
+ top: 90px;
3977
+ color: #fff;
3978
+ font-size: 13px;
3979
+ line-height: 1.2em;
3980
+ font-weight: 600;
3981
+ text-align: center;
3982
+ text-transform: uppercase;
3983
+ text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.25);
3984
+ }
3985
+
3986
+ .spf-welcome-wrap .spf-logo .spf--version {
3987
+ top: auto;
3988
+ left: auto;
3989
+ right: 8px;
3990
+ bottom: 4px;
3991
+ font-size: 11px;
3992
+ text-transform: lowercase;
3993
+ }
3994
+
3995
+ .spf-welcome-wrap .spf-about-text {
3996
+ font-weight: 400;
3997
+ line-height: 1.6em;
3998
+ font-size: 19px;
3999
+ margin: 1em 200px 1em 0;
4000
+ color: #555d66;
4001
+ }
4002
+
4003
+ .spf-welcome-wrap .spf-demo-button {
4004
+ margin: 1em 200px 2em 0;
4005
+ }
4006
+
4007
+ .spf-welcome-wrap .nav-tab-wrapper {
4008
+ margin-bottom: 20px;
4009
+ }
4010
+
4011
+ .spf-welcome-wrap ul {
4012
+ list-style-type: disc;
4013
+ padding-left: 15px;
4014
+ }
4015
+
4016
+ .spf-welcome-wrap .spf--col {
4017
+ float: left;
4018
+ padding-right: 20px;
4019
+ box-sizing: border-box;
4020
+ }
4021
+
4022
+ .spf-welcome-wrap .spf--col-2 {
4023
+ width: 50%;
4024
+ }
4025
+
4026
+ .spf-welcome-wrap .spf--col-3 {
4027
+ width: 33.333%;
4028
+ }
4029
+
4030
+ .spf-welcome-wrap .spf--col-4 {
4031
+ width: 25%;
4032
+ }
4033
+
4034
+ .spf-welcome-wrap .spf--col-5 {
4035
+ width: 20%;
4036
+ }
4037
+
4038
+ .spf-welcome-wrap .spf--col-last {
4039
+ padding-right: 0;
4040
+ }
4041
+
4042
+ .spf-welcome-wrap .spf--col-upgrade {
4043
+ padding-top: 30px;
4044
+ text-align: center;
4045
+ }
4046
+
4047
+ .spf--table-compare thead td,
4048
+ .spf--table-compare tfoot td {
4049
+ text-align: center;
4050
+ }
4051
+
4052
+ .spf--table-compare td {
4053
+ font-size: 14px;
4054
+ text-align: center;
4055
+ vertical-align: middle;
4056
+ padding: 10px;
4057
+ }
4058
+
4059
+ .spf--table-compare td:first-child {
4060
+ text-align: left;
4061
+ }
4062
+
4063
+ .spf--table-compare tfoot td {
4064
+ padding: 15px 0;
4065
+ }
4066
+
4067
+ .spf--table-compare .fa {
4068
+ font-size: 12px;
4069
+ width: 18px;
4070
+ height: 18px;
4071
+ line-height: 18px;
4072
+ padding: 2px;
4073
+ text-align: center;
4074
+ color: #fff;
4075
+ background-color: #46b450;
4076
+ border-radius: 100%;
4077
+ }
4078
+
4079
+ .spf--table-compare .fa-check {
4080
+ background-color: #46b450;
4081
+ }
4082
+
4083
+ .spf--table-compare .fa-times {
4084
+ background-color: #dc3232;
4085
+ }
4086
+
4087
+ .spf-welcome-cols {
4088
+ clear: both;
4089
+ margin: 20px 0;
4090
+ background-color: #fff;
4091
+ padding: 30px 0;
4092
+ border-radius: 2px;
4093
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
4094
+ }
4095
+
4096
+ .spf-welcome-cols .spf--col {
4097
+ width: 20%;
4098
+ float: left;
4099
+ padding: 0 30px;
4100
+ box-sizing: border-box;
4101
+ text-align: center;
4102
+ border-right: 1px solid #e5e5e5;
4103
+ }
4104
+
4105
+ .spf-welcome-cols .spf--left,
4106
+ .spf-welcome-cols .spf--block {
4107
+ float: left;
4108
+ width: 20%;
4109
+ padding: 0 30px;
4110
+ text-align: center;
4111
+ box-sizing: border-box;
4112
+ }
4113
+
4114
+ .spf-welcome-cols .spf--block {
4115
+ width: 80%;
4116
+ }
4117
+
4118
+ .spf-welcome-cols .spf--last {
4119
+ border-right: none;
4120
+ }
4121
+
4122
+ .spf-welcome-cols .spf--space {
4123
+ height: 20px;
4124
+ }
4125
+
4126
+ .spf-welcome-cols .spf--icon {
4127
+ display: inline-block;
4128
+ font-size: 25px;
4129
+ width: 50px;
4130
+ height: 50px;
4131
+ line-height: 50px;
4132
+ text-align: center;
4133
+ margin-bottom: 10px;
4134
+ color: #fff;
4135
+ background-color: #555;
4136
+ border-radius: 50px;
4137
+ }
4138
+
4139
+ .spf-welcome-cols .spf--active {
4140
+ background-color: #5cb85c;
4141
+ }
4142
+
4143
+ .spf-welcome-cols .spf--deactive {
4144
+ background-color: #e14d43;
4145
+ }
4146
+
4147
+ .spf-welcome-cols .spf--title {
4148
+ font-weight: bold;
4149
+ display: block;
4150
+ }
4151
+
4152
+ .spf-welcome-cols p:last-child {
4153
+ margin-bottom: 0;
4154
+ }
4155
+
4156
+ .spf-code-block {
4157
+ margin: 20px 0;
4158
+ padding: 5px 20px;
4159
+ background-color: #fff;
4160
+ border-radius: 2px;
4161
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
4162
+ }
4163
+
4164
+ .spf-code-block pre {
4165
+ font-size: 13px;
4166
+ color: #0073aa;
4167
+ }
4168
+
4169
+ .spf-code-block pre span {
4170
+ color: #999;
4171
+ }
4172
+
4173
+ .spf--table-fields td {
4174
+ font-size: 14px;
4175
+ }
4176
+
4177
+ .spf--upgrade a {
4178
+ color: #5cb85c;
4179
+ font-weight: bold;
4180
+ }
4181
+
4182
+ .spf--upgrade a:focus,
4183
+ .spf--upgrade a:hover {
4184
+ color: #4aa14a;
4185
+ outline: none;
4186
+ box-shadow: none;
4187
+ }
4188
+
4189
+ /**
4190
+ * 11. Responsive
4191
+ */
4192
+
4193
+ @media only screen and (max-width: 1200px) {
4194
+ .spf-metabox .spf-field .spf-title {
4195
+ float: none;
4196
+ width: 100%;
4197
+ margin-bottom: 10px;
4198
+ }
4199
+
4200
+ .spf-metabox .spf-field .spf-fieldset {
4201
+ margin-left: 0;
4202
+ }
4203
+ }
4204
+
4205
+ @media only screen and (max-width: 782px) {
4206
+ .spf-header-inner {
4207
+ text-align: center;
4208
+ }
4209
+
4210
+ .spf-header-inner h1 {
4211
+ width: 100%;
4212
+ margin-bottom: 10px;
4213
+ }
4214
+
4215
+ .spf-search,
4216
+ .spf-header-right,
4217
+ .spf-header-left {
4218
+ width: 100%;
4219
+ }
4220
+
4221
+ .spf-search {
4222
+ text-align: center;
4223
+ margin-bottom: 15px;
4224
+ }
4225
+
4226
+ .spf-footer {
4227
+ text-align: center;
4228
+ }
4229
+
4230
+ .spf-buttons {
4231
+ float: none;
4232
+ }
4233
+
4234
+ .spf-copyright {
4235
+ float: none;
4236
+ margin-top: 10px;
4237
+ }
4238
+
4239
+ .sp-wpcp-options .spf-nav,
4240
+ .spf-nav,
4241
+ .spf-expand-all,
4242
+ .spf-reset-section,
4243
+ .spf-nav-background {
4244
+ display: none !important;
4245
+ }
4246
+
4247
+ .sp-wpcp-options .spf-content,
4248
+ .spf-content {
4249
+ margin-left: 0;
4250
+ }
4251
+
4252
+ .spf-section-title,
4253
+ .sp-wpcp-options .spf-section,
4254
+ .spf-section {
4255
+ display: block !important;
4256
+ }
4257
+
4258
+ .spf-field .spf-title {
4259
+ float: none;
4260
+ width: 100%;
4261
+ margin-bottom: 10px;
4262
+ }
4263
+
4264
+ .spf-field .spf-fieldset {
4265
+ margin-left: 0;
4266
+ }
4267
+
4268
+ .spf-field-radio ul li {
4269
+ margin-top: 4px;
4270
+ }
4271
+
4272
+ .spf-modal-inner {
4273
+ width: 350px;
4274
+ height: 380px;
4275
+ }
4276
+
4277
+ .spf-modal-content {
4278
+ height: 282px;
4279
+ }
4280
+
4281
+ .spf-icon-dialog .spf-modal-inner {
4282
+ width: 305px;
4283
+ height: 380px;
4284
+ }
4285
+
4286
+ .spf-icon-dialog .spf-modal-content {
4287
+ height: 267px;
4288
+ }
4289
+
4290
+ .spf-modal-icon .spf-modal-inner {
4291
+ width: 330px;
4292
+ height: 385px;
4293
+ }
4294
+
4295
+ .spf-modal-icon .spf-modal-content {
4296
+ height: 252px;
4297
+ }
4298
+
4299
+ .spf-profile>.spf-field>.spf-title {
4300
+ float: none;
4301
+ width: 100%;
4302
+ margin-bottom: 10px;
4303
+ }
4304
+
4305
+ .spf-profile>.spf-field>.spf-fieldset {
4306
+ margin-left: 0;
4307
+ }
4308
+ }
4309
+
4310
+ /**
4311
+ * Chosen JS Styles
4312
+ */
4313
+
4314
+ .chosen-container {
4315
+ position: relative;
4316
+ display: inline-block;
4317
+ vertical-align: middle;
4318
+ font-size: 13px;
4319
+ user-select: none;
4320
+ }
4321
+
4322
+ .chosen-container * {
4323
+ box-sizing: border-box;
4324
+ }
4325
+
4326
+ .chosen-container .chosen-drop {
4327
+ position: absolute;
4328
+ top: 100%;
4329
+ z-index: 1010;
4330
+ max-width: 390px;
4331
+ /* SP Style */
4332
+ width: 100%;
4333
+ border: 1px solid #aaa;
4334
+ border-top: 0;
4335
+ background: #fff;
4336
+ box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
4337
+ clip: rect(0, 0, 0, 0);
4338
+ clip-path: inset(100% 100%);
4339
+ }
4340
+
4341
+ .chosen-container.chosen-with-drop .chosen-drop {
4342
+ clip: auto;
4343
+ clip-path: none;
4344
+ }
4345
+
4346
+ .chosen-container a {
4347
+ cursor: pointer;
4348
+ }
4349
+
4350
+ .chosen-container .search-choice .group-name,
4351
+ .chosen-container .chosen-single .group-name {
4352
+ margin-right: 4px;
4353
+ overflow: hidden;
4354
+ white-space: nowrap;
4355
+ text-overflow: ellipsis;
4356
+ font-weight: normal;
4357
+ color: #999999;
4358
+ }
4359
+
4360
+ .chosen-container .search-choice .group-name:after,
4361
+ .chosen-container .chosen-single .group-name:after {
4362
+ content: ":";
4363
+ padding-left: 2px;
4364
+ vertical-align: top;
4365
+ }
4366
+
4367
+ .chosen-container-single .chosen-single {
4368
+ position: relative;
4369
+ display: block;
4370
+ overflow: hidden;
4371
+ padding: 0 0 0 8px;
4372
+ height: 25px;
4373
+ border: 1px solid #aaa;
4374
+ border-radius: 5px;
4375
+ background-color: #fff;
4376
+ background: linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
4377
+ background-clip: padding-box;
4378
+ box-shadow: 0 0 3px #fff inset, 0 1px 1px rgba(0, 0, 0, 0.1);
4379
+ color: #444;
4380
+ text-decoration: none;
4381
+ white-space: nowrap;
4382
+ line-height: 24px;
4383
+ }
4384
+
4385
+ .chosen-container-single .chosen-default {
4386
+ color: #999;
4387
+ }
4388
+
4389
+ .chosen-container-single .chosen-single span {
4390
+ display: block;
4391
+ overflow: hidden;
4392
+ margin-right: 26px;
4393
+ text-overflow: ellipsis;
4394
+ white-space: nowrap;
4395
+ }
4396
+
4397
+ .chosen-container-single .chosen-single-with-deselect span {
4398
+ margin-right: 38px;
4399
+ }
4400
+
4401
+ .chosen-container-single .chosen-single abbr {
4402
+ position: absolute;
4403
+ top: 6px;
4404
+ right: 26px;
4405
+ display: block;
4406
+ width: 12px;
4407
+ height: 12px;
4408
+ font-size: 1px;
4409
+ }
4410
+
4411
+ .chosen-container-single .chosen-single div {
4412
+ position: absolute;
4413
+ top: 0;
4414
+ right: 0;
4415
+ display: block;
4416
+ width: 18px;
4417
+ height: 100%;
4418
+ }
4419
+
4420
+ .chosen-container-single .chosen-single div b {
4421
+ display: block;
4422
+ width: 100%;
4423
+ height: 100%;
4424
+ }
4425
+
4426
+ .chosen-container-single .chosen-search {
4427
+ position: relative;
4428
+ z-index: 1010;
4429
+ margin: 0;
4430
+ padding: 3px 4px;
4431
+ white-space: nowrap;
4432
+ }
4433
+
4434
+ .chosen-container-single .chosen-search input[type="text"] {
4435
+ margin: 1px 0;
4436
+ padding: 4px 20px 4px 5px;
4437
+ width: 100%;
4438
+ height: auto;
4439
+ outline: 0;
4440
+ border: 1px solid #aaa;
4441
+ font-size: 1em;
4442
+ font-family: sans-serif;
4443
+ line-height: normal;
4444
+ border-radius: 0;
4445
+ }
4446
+
4447
+ .chosen-container-single .chosen-drop {
4448
+ margin-top: -1px;
4449
+ border-radius: 0 0 4px 4px;
4450
+ background-clip: padding-box;
4451
+ }
4452
+
4453
+ .chosen-container-single.chosen-container-single-nosearch .chosen-search {
4454
+ position: absolute;
4455
+ clip: rect(0, 0, 0, 0);
4456
+ clip-path: inset(100% 100%);
4457
+ }
4458
+
4459
+ .chosen-container .chosen-results {
4460
+ color: #444;
4461
+ position: relative;
4462
+ overflow-x: hidden;
4463
+ overflow-y: auto;
4464
+ margin: 0 4px 4px 0;
4465
+ padding: 0 0 0 4px;
4466
+ max-height: 240px;
4467
+ -webkit-overflow-scrolling: touch;
4468
+ }
4469
+
4470
+ .chosen-container .chosen-results li {
4471
+ display: none;
4472
+ margin: 0;
4473
+ padding: 5px 6px;
4474
+ list-style: none;
4475
+ line-height: 15px;
4476
+ word-wrap: break-word;
4477
+ -webkit-touch-callout: none;
4478
+ }
4479
+
4480
+ .chosen-container .chosen-results li.active-result {
4481
+ display: list-item;
4482
+ cursor: pointer;
4483
+ max-width: 390px;
4484
+ /* SP Style */
4485
+ }
4486
+
4487
+ .chosen-container .chosen-results li.disabled-result {
4488
+ display: list-item;
4489
+ color: #ccc;
4490
+ cursor: default;
4491
+ }
4492
+
4493
+ .chosen-container .chosen-results li.highlighted {
4494
+ background-color: #3875d7;
4495
+ background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
4496
+ color: #fff;
4497
+ }
4498
+
4499
+ .chosen-container .chosen-results li.no-results {
4500
+ color: #777;
4501
+ display: list-item;
4502
+ background: #f4f4f4;
4503
+ }
4504
+
4505
+ .chosen-container .chosen-results li.group-result {
4506
+ display: list-item;
4507
+ font-weight: bold;
4508
+ cursor: default;
4509
+ }
4510
+
4511
+ .chosen-container .chosen-results li.group-option {
4512
+ padding-left: 15px;
4513
+ }
4514
+
4515
+ .chosen-container .chosen-results li em {
4516
+ font-style: normal;
4517
+ text-decoration: underline;
4518
+ }
4519
+
4520
+ .chosen-container-multi .chosen-choices {
4521
+ position: relative;
4522
+ overflow: hidden;
4523
+ margin: 0;
4524
+ padding: 0 5px;
4525
+ max-width: 390px;
4526
+ /* SP Style */
4527
+ height: auto;
4528
+ border: 1px solid #aaa;
4529
+ background-color: #fff;
4530
+ background-image: linear-gradient(#eeeeee 1%, #ffffff 15%);
4531
+ cursor: text;
4532
+ }
4533
+
4534
+ .chosen-container-multi .chosen-choices li {
4535
+ float: left;
4536
+ list-style: none;
4537
+ }
4538
+
4539
+ .chosen-container-multi .chosen-choices li.search-field {
4540
+ margin: 0;
4541
+ padding: 0;
4542
+ white-space: nowrap;
4543
+ }
4544
+
4545
+ .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
4546
+ margin: 1px 0;
4547
+ padding: 0;
4548
+ height: 25px;
4549
+ outline: 0;
4550
+ border: 0 !important;
4551
+ background: transparent !important;
4552
+ box-shadow: none;
4553
+ color: #999;
4554
+ font-size: 100%;
4555
+ font-family: sans-serif;
4556
+ line-height: normal;
4557
+ border-radius: 0;
4558
+ width: 25px;
4559
+ }
4560
+
4561
+ .chosen-container-multi .chosen-choices li.search-choice {
4562
+ position: relative;
4563
+ margin: 3px 5px 3px 0;
4564
+ padding: 3px 20px 3px 5px;
4565
+ border: 1px solid #aaa;
4566
+ max-width: 100%;
4567
+ border-radius: 3px;
4568
+ background-color: #eeeeee;
4569
+ background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
4570
+ background-size: 100% 19px;
4571
+ background-repeat: repeat-x;
4572
+ background-clip: padding-box;
4573
+ box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
4574
+ color: #333;
4575
+ line-height: 13px;
4576
+ cursor: default;
4577
+ }
4578
+
4579
+ .chosen-container-multi .chosen-choices li.search-choice span {
4580
+ word-wrap: break-word;
4581
+ }
4582
+
4583
+ .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
4584
+ position: absolute;
4585
+ top: 4px;
4586
+ right: 3px;
4587
+ display: block;
4588
+ width: 12px;
4589
+ height: 12px;
4590
+ font-size: 1px;
4591
+ }
4592
+
4593
+ .chosen-container-multi .chosen-choices li.search-choice-disabled {
4594
+ padding-right: 5px;
4595
+ border: 1px solid #ccc;
4596
+ background-color: #e4e4e4;
4597
+ background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
4598
+ color: #666;
4599
+ }
4600
+
4601
+ .chosen-container-multi .chosen-choices li.search-choice-focus {
4602
+ background: #d4d4d4;
4603
+ }
4604
+
4605
+ .chosen-container-multi .chosen-results {
4606
+ margin: 0;
4607
+ padding: 0;
4608
+ }
4609
+
4610
+ .chosen-container-multi .chosen-drop .result-selected {
4611
+ display: none;
4612
+ /* SP Style */
4613
+ color: #ccc;
4614
+ cursor: default;
4615
+ }
4616
+
4617
+ .chosen-container-active .chosen-single {
4618
+ border: 1px solid #5897fb;
4619
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
4620
+ }
4621
+
4622
+ .chosen-container-active.chosen-with-drop .chosen-single {
4623
+ border: 1px solid #aaa;
4624
+ border-bottom-right-radius: 0;
4625
+ border-bottom-left-radius: 0;
4626
+ background-image: linear-gradient(#eeeeee 20%, #ffffff 80%);
4627
+ box-shadow: 0 1px 0 #fff inset;
4628
+ }
4629
+
4630
+ .chosen-container-active.chosen-with-drop .chosen-single div {
4631
+ border-left: none;
4632
+ background: transparent;
4633
+ }
4634
+
4635
+ .chosen-container-active .chosen-choices {
4636
+ border: 1px solid #5897fb;
4637
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
4638
+ }
4639
+
4640
+ .chosen-container-active .chosen-choices li.search-field input[type="text"] {
4641
+ color: #222 !important;
4642
+ }
4643
+
4644
+ .chosen-disabled {
4645
+ opacity: 0.5 !important;
4646
+ cursor: default;
4647
+ }
4648
+
4649
+ .chosen-disabled .chosen-single {
4650
+ cursor: default;
4651
+ }
4652
+
4653
+ .chosen-disabled .chosen-choices .search-choice .search-choice-close {
4654
+ cursor: default;
4655
+ }
4656
+
4657
+ .chosen-rtl {
4658
+ text-align: right;
4659
+ }
4660
+
4661
+ .chosen-rtl .chosen-single {
4662
+ overflow: visible;
4663
+ padding: 0 8px 0 0;
4664
+ }
4665
+
4666
+ .chosen-rtl .chosen-single span {
4667
+ margin-right: 0;
4668
+ margin-left: 26px;
4669
+ direction: rtl;
4670
+ }
4671
+
4672
+ .chosen-rtl .chosen-single-with-deselect span {
4673
+ margin-left: 38px;
4674
+ }
4675
+
4676
+ .chosen-rtl .chosen-single div {
4677
+ right: auto;
4678
+ left: 3px;
4679
+ }
4680
+
4681
+ .chosen-rtl .chosen-single abbr {
4682
+ right: auto;
4683
+ left: 26px;
4684
+ }
4685
+
4686
+ .chosen-rtl .chosen-choices li {
4687
+ float: right;
4688
+ }
4689
+
4690
+ .chosen-rtl .chosen-choices li.search-field input[type="text"] {
4691
+ direction: rtl;
4692
+ }
4693
+
4694
+ .chosen-rtl .chosen-choices li.search-choice {
4695
+ margin: 3px 5px 3px 0;
4696
+ padding: 3px 5px 3px 19px;
4697
+ }
4698
+
4699
+ .chosen-rtl .chosen-choices li.search-choice .search-choice-close {
4700
+ right: auto;
4701
+ left: 4px;
4702
+ }
4703
+
4704
+ .chosen-rtl.chosen-container-single .chosen-results {
4705
+ margin: 0 0 4px 4px;
4706
+ padding: 0 4px 0 0;
4707
+ }
4708
+
4709
+ .chosen-rtl .chosen-results li.group-option {
4710
+ padding-right: 15px;
4711
+ padding-left: 0;
4712
+ }
4713
+
4714
+ .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
4715
+ border-right: none;
4716
+ }
4717
+
4718
+ .chosen-rtl .chosen-search input[type="text"] {
4719
+ padding: 4px 5px 4px 20px;
4720
+ direction: rtl;
4721
+ }
4722
+
4723
+ /**
4724
+ *
4725
+ *Custom Style for the WPCP
4726
+ *
4727
+ **/
4728
+
4729
+ #sp_wpcp_shortcode_options {
4730
+ border-top-color: #f1f1f1;
4731
+ }
4732
+
4733
+ #sp_wpcp_shortcode_options .spf-nav ul li {
4734
+ margin-bottom: -1px;
4735
+ }
4736
+
4737
+ #sp_wpcp_shortcode_options .spf-nav.spf-nav-metabox {
4738
+ border-right-color: #f1f1f1;
4739
+ border-right-color: #f1f1f1;
4740
+ background: #f1f1f1;
4741
+ margin-right: -2px;
4742
+ }
4743
+
4744
+ #sp_wpcp_shortcode_options .spf-content {
4745
+ border-top: 1px solid #e5e5e5;
4746
+ box-shadow: 0 -1px 1px rgba(0, 0, 0, .04);
4747
+ }
4748
+
4749
+ #spf-section-sp_wpcp_upload_options_1 .spf-field-carousel_type .spf-title,
4750
+ #spf-section-sp_wpcp_upload_options_1 .spf-field-gallery .spf-title,
4751
+ .wpcp_carousel_content_wrapper .spf-title,
4752
+ .wpcp-video-description .spf-title,
4753
+ .wpcp-video-field-wrapper>.spf-title {
4754
+ width: 100%;
4755
+ }
4756
+
4757
+ #spf-section-sp_wpcp_upload_options_1 .spf-field-carousel_type .spf-fieldset,
4758
+ #spf-section-sp_wpcp_upload_options_1 .spf-field-gallery .spf-fieldset,
4759
+ .wpcp_carousel_content_wrapper .spf-fieldset,
4760
+ .wpcp-video-description .spf-fieldset,
4761
+ .wpcp-video-field-wrapper>.spf-fieldset {
4762
+ margin-top: 30px;
4763
+ margin-left: 0;
4764
+ }
4765
+
4766
+ #sp_wpcp_display_shortcode .hndle,
4767
+ #sp_wpcp_display_shortcode .handlediv,
4768
+ #sp_wpcp_shortcode_options .hndle,
4769
+ #sp_wpcp_shortcode_options .handlediv,
4770
+ #sp_wpcp_upload_options .handlediv,
4771
+ #sp_wpcp_upload_options .hndle {
4772
+ display: none;
4773
+ }
4774
+
4775
+ #spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header {
4776
+ background-color: #157592;
4777
+ background: linear-gradient(-45deg, #22afba, #157592);
4778
+ padding: 22px 26px;
4779
+ overflow: hidden;
4780
+ }
4781
+
4782
+ #spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header .support {
4783
+ margin-left: 16px;
4784
+ float: right;
4785
+ }
4786
+
4787
+ #spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header .support a {
4788
+ color: #ffffff;
4789
+ text-decoration: none;
4790
+ line-height: 35px;
4791
+ font-size: 15px;
4792
+ font-weight: 500;
4793
+ }
4794
+
4795
+ /**
4796
+ Free version CSS.
4797
+ */
4798
+ .spf-field-carousel_type .spf--image:nth-child(4),
4799
+ .spf-field-carousel_type .spf--image:nth-child(5) {
4800
+ pointer-events: none;
4801
+ }
4802
+ .spf-field-carousel_type .spf--image {
4803
+ position: relative;
4804
+ }
4805
+ .spf-field-carousel_type .spf--image label strong {
4806
+ position: absolute;
4807
+ top: 3px;
4808
+ right: 3px;
4809
+ background: #cbd6df;
4810
+ padding: 0px 5px;
4811
+ font-size: 10px;
4812
+ }
4813
+
4814
+ /*
4815
+ * Shortcode footer.
4816
+ */
4817
+ .spf-field-shortcode.wpcp-admin-footer .wpcp-shortcode-selectable {
4818
+ background-color: rgba(82, 179, 217, 0.11);
4819
+ padding: 10px 15px;
4820
+ display: inline-block;
4821
+ -webkit-touch-callout: all;
4822
+ -webkit-user-select: all;
4823
+ -khtml-user-select: all;
4824
+ -moz-user-select: all;
4825
+ -ms-user-select: all;
4826
+ user-select: all;
4827
+ }
4828
+ #spf-section-sp_wpcp_display_shortcode_1 .spf-field {
4829
+ display: flex;
4830
+ padding: 0;
4831
+ flex-wrap: wrap;
4832
+ }
4833
+ .spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap:first-of-type {
4834
+ border-right: 1px solid #ddd;
4835
+ }
4836
+ .spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap {
4837
+ padding-top: 22px;
4838
+ padding-bottom: 22px;
4839
+ text-align: center;
4840
+ width: 49%;
4841
+ }
4842
+ .spf-field-shortcode.wpcp-admin-footer .wpcp-sc-title {
4843
+ font-weight: 500;
4844
+ font-size: 14px !important;
4845
+ padding-top: 0 !important;
4846
+ color: #4c5158;
4847
+ margin-right: 5px;
4848
+ }
4849
+
4850
+ @media only screen and (max-width: 990px) {
4851
+ .spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap:first-of-type {
4852
+ border-right: none;
4853
+ border-bottom: 1px solid #ddd;
4854
+ }
4855
+
4856
+ .spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap {
4857
+ width: 100%;
4858
+ }
4859
+ }
admin/views/wpcfree-metabox/assets/css/spf.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .spf{position:relative}.spf label{padding:0;margin:0;display:inline-block}.spf-ab-icon{top:2px}#screen-meta-links+.spf-options{margin-top:40px}.spf-options{margin-top:20px;margin-right:20px}.spf-header{position:relative}.spf-header-inner{padding:25px}.spf-header-inner h1{float:left;font-size:1.5em;line-height:26px;font-weight:400;margin:0}.spf-header-inner h1 small{font-size:11px;font-weight:500}.spf-sticky .spf-header-inner{position:fixed;z-index:20;top:32px;-moz-box-shadow:0 5px 25px rgba(0,0,0,.125);-webkit-box-shadow:0 5px 25px rgba(0,0,0,.125);box-shadow:0 5px 25px rgba(0,0,0,.125)}.spf-buttons{float:right;-moz-transition:opacity .2s;-o-transition:opacity .2s;-webkit-transition:opacity .2s;transition:opacity .2s}.spf-buttons .button{margin:0 2px;line-height:26px}.spf-buttons .button.spf-reset-all,.spf-buttons .button.spf-reset-section,.spf-buttons .button.spf-save{text-shadow:none;border:0;border-radius:0;padding:3px 15px;height:auto;color:#fff}.spf-buttons .button.spf-save{box-shadow:0 3px 0 #169ca5;background-color:#18afb9}.spf-buttons .button.spf-save:hover{box-shadow:0 3px 0 #1784af;background-color:#21a1d4}.spf-buttons .button.spf-reset-section{box-shadow:0 3px 0 #ccc;background-color:#ddd;color:#000}.spf-buttons .button.spf-reset-section:hover{box-shadow:0 3px 0 #c5c5c5;background-color:#d6d4d4}.spf-buttons .button.spf-reset-all{box-shadow:0 3px 0 #666;background-color:#888}.spf-buttons .button.spf-reset-all:hover{box-shadow:0 3px 0 #4a4949;background-color:#6b6a6a}.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 #e5e5e5;background-color:#f5f5f5;background:linear-gradient(#fefefe,#f5f5f5)}.spf-theme-light .spf-header-inner h1 small{color:#999}.spf-theme-light .spf-expand-all{color:#999;background-color:#fff;-moz-box-shadow:0 1px 1px rgba(0,0,0,.05);-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.spf-theme-light .spf-expand-all:hover{color:#555}.spf-theme-light .spf-search input{color:#555;background-color:#fff;-moz-box-shadow:0 1px 1px rgba(0,0,0,.05);-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.spf-theme-light .spf-search input::-webkit-input-placeholder{color:#bbb}.spf-theme-light .spf-nav{background:#f1f1f1}.spf-theme-light .spf-nav ul li a{background-color:#18afb9;border-top:1px solid #18afb9;border-right:1px solid #e2e2e1;border-bottom:1px solid #ddd;color:#fff;font-size:13px;font-weight:600;line-height:1.4;padding:16px 15px;text-transform:uppercase}.spf-theme-light .spf-nav ul li .spf-section-active{background-color:#fff;color:#000}#sp_wpcp_shortcode_options .spf-theme-light .spf-nav ul li .spf-section-active{border-bottom:1px solid #fff;border-top:1px solid #18afb9;box-shadow:0 3px 0 0 #18afb9 inset}.sp-wpcp-options.spf-theme-light .spf-nav ul li a{background:#efefef;color:#000;border-bottom:1px solid #cecece;border-top:1px solid #cecece}.sp-wpcp-options.spf-theme-light .spf-nav ul li a:first-child{border-top:1px solid transparent}#sp_wpcp_shortcode_options .spf-theme-light .spf-nav ul li .spf-section-active i,.sp-wpcp-options.spf-theme-light .spf-nav ul li .spf-section-active i{color:#18afb9}.sp-wpcp-options.spf-theme-light .spf-nav ul li .spf-section-active{background-color:#fff;border-right:1px solid #fff;border-bottom:1px solid #fff;border-top:1px solid #fff;box-shadow:4px 0 0 0 #18afb9 inset}.spf-theme-light .spf-nav ul li .spf-section-active:after{display:none}.spf-theme-light .spf-nav ul ul li a{background-color:#eee;border-bottom:1px solid #e5e5e5}.spf-theme-light .spf-nav-background{background-color:#ddd}.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:26px}.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-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:2px 0 0 2px}.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 2px 2px 0}.spf-field-button_set .spf--buttons{display:inline-block}.spf-field-button_set .spf--button{position:relative;z-index:1;float:left;cursor:pointer;padding:7px 14px;min-width:40px;text-align:center;color:#555;border:1px solid #ccc;background-color:#f7f7f7;user-select:none;-webkit-user-select:none;box-shadow:0 1px 0 rgba(0,0,0,.1)}.spf-field-button_set .spf--button:first-child{border-radius:4px 0 0 4px}.spf-field-button_set .spf--button:last-child{border-radius:0 4px 4px 0}.spf-field-button_set .spf--button:not(:first-child){margin-left:-1px}.spf-field-button_set .spf--button:hover{background-color:#eee}.spf-field-button_set .spf--active,.spf-field-button_set .spf--active:hover{z-index:2;color:#fff;border-color:#006799;background-color:#0085ba}.spf-field-button_set input{display:none}.spf-field-checkbox ul,.spf-field-radio ul{margin:0;padding:0;list-style-type:none;overflow-y:auto;max-height:305px}.spf-field-checkbox .spf--inline-list li,.spf-field-radio .spf--inline-list li{display:inline-block;margin-right:15px}.spf-field-checkbox input[type=radio]:checked:before,.spf-field-radio input[type=radio]:checked:before{line-height:10px}.spf-field-checkbox .spf-checker,.spf-field-radio .spf-checker{cursor:pointer}.spf-field-code_editor .CodeMirror{width:100%;height:400px;border:1px solid #eee}.spf-field-code_editor textarea{width:100%;height:400px}.spf-field-color>input{opacity:.75;width:115px;max-width:100%}.spf-field-color_group .spf--left{float:left;margin-right:10px;margin-bottom:5px}.spf-field-color_group .spf--title{color:#999;margin-bottom:5px}.spf-field-fieldset .spf-fieldset-content{border:1px solid #eee;background-color:#fff}.spf-field-fieldset .spf-field{padding:20px}.spf-field-date .spf--to{margin-left:7px}.spf-datepicker-wrapper{margin-top:5px;width:auto;background-color:#fff;z-index:9999999!important;-moz-box-shadow:0 0 30px rgba(0,0,0,.15);-webkit-box-shadow:0 0 30px rgba(0,0,0,.15);box-shadow:0 0 30px rgba(0,0,0,.15)}.spf-datepicker-wrapper *{float:none;margin:0;padding:0;font-family:inherit;font-weight:400;font-style:normal;text-decoration:none;border:none;background:0 0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;-moz-border-radius:none;-webkit-border-radius:none;border-radius:none}.spf-datepicker-wrapper .ui-datepicker-header,.spf-datepicker-wrapper .ui-widget-header{color:#fff;background:#00a0d2}.spf-datepicker-wrapper .ui-datepicker-header .ui-state-hover{cursor:pointer}.spf-datepicker-wrapper .ui-datepicker-title{font-size:14px;line-height:40px;text-align:center}.spf-datepicker-wrapper .ui-datepicker-next,.spf-datepicker-wrapper .ui-datepicker-prev{position:static;top:auto;left:auto;right:auto;font-family:FontAwesome;font-size:12px;text-align:center;width:41px;height:40px;line-height:40px;color:#fff;background-color:rgba(255,255,255,.1);text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.spf-datepicker-wrapper .ui-datepicker-next span,.spf-datepicker-wrapper .ui-datepicker-prev span{display:none}.spf-datepicker-wrapper .ui-datepicker-prev{float:left}.spf-datepicker-wrapper .ui-datepicker-next{float:right}.spf-datepicker-wrapper .ui-datepicker-prev:before{content:'\f053'}.spf-datepicker-wrapper .ui-datepicker-next:before{content:'\f054'}.spf-datepicker-wrapper .ui-datepicker-next-hover,.spf-datepicker-wrapper .ui-datepicker-prev-hover{opacity:.75}.spf-datepicker-wrapper tbody .ui-datepicker-week-col{background-color:#f7f7f7}.spf-datepicker-wrapper .ui-datepicker-buttonpane{padding:10px;text-align:center;background-color:#f7f7f7}.spf-datepicker-wrapper .ui-datepicker-buttonpane button{cursor:pointer;margin:0 5px;padding:7px 14px;border:1px solid #eee;background-color:#fff}.spf-datepicker-wrapper select{margin:0 4px;color:#fff;border:1px solid rgba(255,255,255,.5)}.spf-datepicker-wrapper select option{color:#555}.spf-datepicker-wrapper table{font-size:13px;border-collapse:collapse;width:100%}.spf-datepicker-wrapper thead{color:#fff;background:#32373c}.spf-datepicker-wrapper th{text-align:center;padding:7px;border:1px solid #444}.spf-datepicker-wrapper td{text-align:center;border:1px solid #f4f4f4}.spf-datepicker-wrapper td.ui-datepicker-other-month{border:transparent}.spf-datepicker-wrapper td .ui-state-default{color:#555;width:auto;display:block;padding:6px 12px}.spf-datepicker-wrapper td .ui-state-active,.spf-datepicker-wrapper td .ui-state-hover{color:#fff;background-color:#0073aa}.spf-datepicker-wrapper td.ui-state-disabled .ui-state-default{opacity:.5}.spf-field-gallery input{display:none}.spf-field-gallery ul{margin:0;padding:0;list-style-type:none}.spf-field-gallery ul.sp-gallery-images li{display:inline-block;position:relative;padding:4px;margin:0 5px 10px 0;border:1px solid #ccc;background-color:#f9f9f9;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-moz-box-shadow:0 1px 0 rgba(0,0,0,.08);-webkit-box-shadow:0 1px 0 rgba(0,0,0,.08);box-shadow:0 1px 0 rgba(0,0,0,.08)}.spf-field-gallery ul.sp-gallery-images li img{max-height:100px;display:inline-block;vertical-align:middle}.spf-field-gallery .button,.spf-field-gallery .button:focus,.spf-field-gallery .button:hover{margin-right:5px;margin-bottom:5px;width:110px;height:110px;text-align:center;line-height:15px;color:#fff;border:none;border-radius:2px;display:flex;justify-content:center;flex-direction:column;font-weight:600}.spf-field-gallery .button-primary.spf-button{background:#4eb631;box-shadow:none;text-shadow:none}.spf-field-gallery .button.spf-edit-gallery{background:#6a7885}.spf-field-gallery .button i{font-size:24px;margin-bottom:10px}.spf-field-gallery a,.spf-field-gallery li{float:left}.spf-field-group .spf-field{padding:20px}.spf-field-group .spf-cloneable-hidden{display:none!important}.spf-field-group .spf-cloneable-wrapper{position:relative}.spf-field-group .spf-cloneable-item{display:none;position:relative;margin-bottom:5px}.spf-field-group .spf-cloneable-item h4{font-size:1em}.spf-field-group .ui-accordion .spf-cloneable-item{display:block}.spf-field-group .spf-cloneable-content{border:1px solid #e5e5e5;background:#fff}.spf-field-group .spf-cloneable-title{display:block;cursor:pointer;position:relative;margin:0;padding:15px 65px 15px 10px;min-height:0;font-size:100%;border:1px solid #e5e5e5;background:#fafafa;-webkit-user-select:none;user-select:none;-moz-transition:border-color .15s;-o-transition:border-color .15s;-webkit-transition:border-color .15s;transition:border-color .15s}.spf-field-group .spf-cloneable-title:active,.spf-field-group .spf-cloneable-title:focus,.spf-field-group .spf-cloneable-title:hover{border:1px solid #bbb;background:#fafafa;outline:0}.spf-field-group .spf-cloneable-helper{position:absolute;top:12px;right:10px;z-index:1;font-size:14px;line-height:1em}.spf-field-group .spf-cloneable-helper i{display:inline-block;cursor:pointer;padding:5px;color:#999}.spf-field-group .spf-cloneable-helper i:hover{color:#555}.spf-field-group .spf-cloneable-content{padding:0;border-top:0}.spf-field-group .spf-cloneable-title-number,.spf-field-group .spf-cloneable-title-prefix{margin-right:5px}.spf-field-group .spf-cloneable-alert{display:none;margin-bottom:5px;padding:10px 20px;color:#a94442;border:1px solid #ebccd1;background-color:#f2dede}.spf-field-group .widget-placeholder{margin-bottom:10px;border:1px dashed #f1c40f;background-color:#fffae4}.spf-field-group .spf-cloneable-header-icon{display:inline-block;text-align:center;font-size:14px;width:17px;color:#aaa;text-indent:0;vertical-align:text-top}.spf-field-group .spf-cloneable-placeholder{background-color:#ddd;margin-top:4px;width:100px;height:10px;font-size:10px;line-height:10px;display:inline-block;vertical-align:top;border-radius:2px}.spf-field-icon input{display:none}.spf-field-icon .button{margin-right:5px}.spf-field-icon .spf-icon-preview i{display:inline-block;font-size:14px;width:30px;height:26px;line-height:26px;margin-right:5px;text-align:center;vertical-align:top;color:#555;border:1px solid #ccc;background-color:#f7f7f7;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 1px 0 rgba(0,0,0,.08);-webkit-box-shadow:0 1px 0 rgba(0,0,0,.08);box-shadow:0 1px 0 rgba(0,0,0,.08);-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.spf-field-carousel_type .spf--image,.spf-field-image_select .spf--image{cursor:pointer;position:relative;display:inline-block;max-width:100%;margin:0 5px 5px 0;vertical-align:bottom;border:2px solid transparent;background-color:#fff;user-select:none;-webkit-user-select:none;-moz-transition:all .2s;-o-transition:all .2s;-webkit-transition:all .2s;transition:all .2s}.spf-field-image_select .spf--image:before{position:absolute;top:0;left:0;text-align:center;font-size:11px;font-family:FontAwesome;content:"\f00c";width:15px;height:15px;line-height:15px;opacity:0;color:#fff;background-color:#222;transition:opacity .2s}.spf-field-image_select .spf--active{border-color:#1ea4b0;box-shadow:0 0 20px rgba(0,0,0,.2)}.spf-field-image_select img{vertical-align:top}.spf-field-carousel_type input,.spf-field-image_select input{display:none}.spf-field-carousel_type .spf--image{background:#e8ecef;color:#7b8898;margin-right:10px;border:solid 3px #e8ecef;border-radius:2px;cursor:pointer;text-align:center;width:120px;height:80px;box-shadow:inset 0 0 0 3px #fff}.spf-field-carousel_type i{font-size:30px;width:32px;height:30px;margin-top:15px}.spf-field-carousel_type p{margin-top:5px;font-weight:500}.spf-field-carousel_type .spf--image.spf--active{border-color:#1ea4b0}.spf-field-link_color .spf--left{float:left;margin-right:10px;margin-bottom:5px}.spf-field-link_color .spf--title{color:#999;margin-bottom:5px}.spf-field-media .spf--placeholder{margin-bottom:10px;display:flex}.spf-field-media .spf--placeholder input{width:100%}.spf-field-media .button{margin-left:7px}.spf-field-media .hidden+.button{margin-left:0}.spf-field-media .spf--preview{position:relative}.spf-field-media .spf--preview .fa-times{position:absolute;z-index:1;right:4px;top:4px;font-size:14px;width:22px;height:22px;line-height:22px;text-align:center;text-decoration:none;color:#fff;background-color:#d33;opacity:.8;transition:all .2s}.spf-field-media .spf--preview .fa-times:hover{opacity:1}.spf-field-media .spf--preview .fa-times:focus{box-shadow:none}.spf-field-palette .spf--palette{position:relative;display:inline-block;cursor:pointer;border:2px solid #ddd;margin-right:10px;margin-bottom:10px;user-select:none;-webkit-user-select:none;transition:all .2s}.spf-field-palette .spf--palette span{vertical-align:middle;display:inline-block;width:22px;height:60px;line-height:60px;overflow:hidden;text-indent:-999px}.spf-field-palette .spf--palette:before{position:absolute;top:0;left:0;text-align:center;font-size:11px;font-family:FontAwesome;content:"\f00c";width:15px;height:15px;line-height:15px;opacity:0;color:#fff;background-color:#222;transition:opacity .2s}.spf-field-palette .spf--active{border-color:#222;box-shadow:0 0 20px rgba(0,0,0,.2)}.spf-field-palette .spf--active:before{opacity:1}.spf-field-palette input{display:none}.spf-field-repeater .spf-field{padding:10px}.spf-field-repeater .spf-field-text input{width:100%}.spf-field-repeater .spf-repeater-hidden{display:none!important}.spf-field-repeater .spf-repeater-wrapper .spf-repeater-item{display:table;width:100%;margin-bottom:5px;border:1px solid #eee}.spf-field-repeater .spf-repeater-wrapper .spf-repeater-item h4{font-size:1em}.spf-field-repeater .spf-repeater-content{width:100%;display:table-cell;vertical-align:middle;background-color:#fff}.spf-field-repeater .spf-repeater-helper{width:100%;display:table-cell;vertical-align:middle;text-align:center;font-size:14px;line-height:1em;border-left:1px solid #eee;background-color:#f7f7f7}.spf-field-repeater .spf-repeater-helper i{display:inline-block;cursor:pointer;color:#999;padding:5px}.spf-field-repeater .spf-repeater-helper i:hover{color:#555}.spf-field-repeater .spf-repeater-helper-inner{width:75px}.spf-field-repeater .spf-repeater-alert{display:none;margin-bottom:5px;padding:10px 20px;color:#a94442;border:1px solid #ebccd1;background-color:#f2dede}.spf-field-repeater .widget-placeholder{height:50px;margin-bottom:3px;border:1px dashed #f1c40f;background-color:#fffae4}.spf-field-repeater .ui-sortable-helper{height:50px!important;overflow:hidden!important;border-color:#ccc!important;background-color:#eee!important;opacity:.5}.spf-field-repeater .ui-sortable-helper .spf-repeater-content,.spf-field-repeater .ui-sortable-helper .spf-repeater-helper{display:none}.spf-field-select select{max-width:100%}.spf-field-slider em{padding-left:5px;color:#aaa}.spf-field-slider input[type=text]{width:45px;margin-left:15px;text-align:center}.spf-field-slider .ui-slider{position:relative;width:100%;height:4px;border:none;background:#ddd;border-radius:2px}.spf-field-slider .ui-slider-range{height:4px;border:none;background:#222;border-radius:2px}.spf-field-slider .ui-slider-handle{position:absolute;width:18px;height:18px;top:-7px;margin-left:-8px;border:none;background:#222;border-radius:2px}.spf-field-slider .ui-slider-handle:hover,.spf-field-slider .ui-state-active{cursor:pointer;background:#444}.spf-field-sortable .spf-field{padding:10px}.spf-field-sortable .spf-field-text input{width:100%;max-width:100%}.spf-field-sortable .spf--sortable .spf--sortable-item{display:table;width:100%;margin-bottom:5px;border:1px solid #eee}.spf-field-sortable .spf--sortable .spf--sortable-item h4{font-size:1em}.spf-field-sortable .spf--sortable-content{width:100%;display:table-cell;vertical-align:middle;background-color:#fff}.spf-field-sortable .spf--sortable-helper{width:100%;display:table-cell;vertical-align:middle;text-align:center;font-size:14px;line-height:1em;border-left:1px solid #eee;background-color:#f7f7f7}.spf-field-sortable .spf--sortable-helper .fa{display:inline-block;cursor:pointer;width:50px;color:#555}.spf-field-sortable .spf--sortable-helper .fa:hover{opacity:.5}.spf-field-sortable .widget-placeholder{height:50px;margin-bottom:3px;border:1px dashed #f1c40f;background-color:#fffae4}.spf-field-sortable .ui-sortable-helper{height:50px!important;overflow:hidden!important;border-color:#ccc!important;background-color:#eee!important;opacity:.5}.spf-field-sortable .ui-sortable-helper .spf--sortable-content,.spf-field-sortable .ui-sortable-helper .spf--sortable-helper{display:none}.spf-field-sorter .ui-sortable-placeholder{height:20px;border:1px dashed #f1c40f;background-color:#fffae4}.spf-field-sorter .spf-modules{float:left;width:50%;box-sizing:border-box}.spf-field-sorter .spf-modules:first-child{padding-right:15px}.spf-field-sorter .spf-modules:last-child{padding-left:15px}.spf-field-sorter .spf-disabled,.spf-field-sorter .spf-enabled{padding:5px 15px;border:1px dashed #ddd;background-color:#fff}.spf-field-sorter .spf-disabled li{-moz-transition:opacity .15s;-o-transition:opacity .15s;-webkit-transition:opacity .15s;transition:opacity .15s;opacity:.5}.spf-field-sorter .spf-disabled .ui-sortable-helper{opacity:1}.spf-field-sorter .spf-sorter-title{font-size:13px;font-weight:600;padding:10px;text-align:center;border:1px dashed #ddd;border-bottom:none;background-color:#f8f8f8;text-transform:uppercase}.spf-field-sorter ul{list-style-type:none;margin:0;padding:0;min-height:62px}.spf-field-sorter ul li{margin:10px 0;padding:10px 15px;cursor:move;font-weight:700;text-align:center;border:1px solid #e5e5e5;background-color:#fafafa;-moz-transition:border-color .15s;-o-transition:border-color .15s;-webkit-transition:border-color .15s;transition:border-color .15s}.spf-field-sorter ul li:hover{border-color:#bbb}.spf-field-spinner .spf--spin{float:left}.spf-field-spinner .spf--unit{float:right;height:30px;line-height:26px;text-align:center;border-left:none;color:#999;border:1px solid #ddd;border-left:0;background-color:#eee;padding:0 6px;margin:0;box-sizing:border-box}.spf-field-spinner .ui-spinner-button{cursor:pointer;position:relative;overflow:hidden;margin:0;padding:0;width:30px;height:30px;line-height:30px;text-align:center;border:1px solid #ddd;color:#555;background-color:#eee;box-sizing:border-box}.spf-field-spinner .ui-spinner-button:hover{background-color:#e7e7e7}.spf-field-spinner .ui-spinner-button:active{background-color:#ddd}.spf-field-spinner .ui-spinner-button:before{font-family:FontAwesome;font-size:16px;line-height:16px}.spf-field-spinner .ui-spinner-down{float:left;border-right:0;border-radius:2px 0 0 2px}.spf-field-spinner .ui-spinner-down:before{content:"\f0d9"}.spf-field-spinner .ui-spinner-up{float:right;border-left:0;border-radius:0 2px 2px 0}.spf-field-spinner .ui-spinner-up:before{content:"\f0da"}.spf-field-spinner input{width:50px;text-align:center;margin:0;padding:0 8px;height:30px;line-height:30px;border:1px solid #ddd}.spf-field-spinner input:focus{outline:0}.spf-field-spinner .ui-button-text{display:none}.spf-field-switcher .spf--switcher,.spf-field-switcherf .spf--switcher{float:left;cursor:pointer;position:relative;width:60px;height:26px;padding:0;margin:0;overflow:hidden;border-radius:4px;background-color:#ed6f6f;user-select:none;-webkit-user-select:none}.spf-field-switcher .spf--ball,.spf-field-switcherf .spf--ball{position:absolute;top:4px;left:4px;width:24px;height:18px;background-color:#fff;border-radius:4px;transition:all .1s;box-shadow:1px 1px 1px rgba(0,0,0,.15)}.spf-field-switcher .spf--off,.spf-field-switcher .spf--on,.spf-field-switcherf .spf--off,.spf-field-switcherf .spf--on{position:absolute;top:0;left:0;right:0;font-size:11px;line-height:26px;font-weight:500;font-style:normal;text-align:center;text-transform:uppercase;color:#fff;padding-right:28px;opacity:0;transition:all .1s}.spf-field-switcher .spf--off,.spf-field-switcherf .spf--off{padding-right:0;padding-left:28px;opacity:1}.spf-field-switcher .spf--active{background:#4fb845}.spf-field-switcher .spf--active .spf--on,.spf-field-switcherf .spf--active .spf--on{opacity:1}.spf-field-switcher .spf--active .spf--off,.spf-field-switcherf .spf--active .spf--off{opacity:0}.spf-field-switcher .spf--active .spf--ball,.spf-field-switcherf .spf--active .spf--ball{left:100%;margin-left:-28px}.spf-field-switcher .spf--label,.spf-field-switcherf .spf--label{float:left;margin-top:4px;margin-left:8px;font-weight:400;color:#999}.spf-field-switcher input,.spf-field-switcherf input{display:none}.spf-field-tabbed .spf-tabbed-section{border:1px solid #eee;background:#fff}.spf-field-tabbed .spf-tabbed-nav .spf--icon{padding-right:5px}.spf-field-tabbed .spf-tabbed-nav a{display:inline-block;padding:12px 15px;margin-top:1px;margin-right:5px;margin-bottom:-1px;position:relative;text-decoration:none;color:#444;font-weight:600;background-color:#f3f3f3;border:1px solid #eee;-moz-transition:all .2s;-o-transition:all .2s;-webkit-transition:all .2s;transition:all .2s}.spf-field-tabbed .spf-tabbed-nav a:hover{background-color:#f9f9f9}.spf-field-tabbed .spf-tabbed-nav a.spf-tabbed-active{background-color:#fff;border-bottom-color:#fff}.spf-field-tabbed .spf-tabbed-nav a:focus{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.spf-field-text input{width:340px;max-width:100%}.spf-field-textarea textarea{width:100%;max-width:100%;min-height:125px}.spf-field-textarea .spf-shortcode-button{margin-bottom:10px;margin-right:5px}.spf-field-typography select,.spf-field-typography textarea{margin:0;width:100%}.spf-field-typography .spf--title{color:#999;margin:0 0 2px 0}.spf-field-typography .spf--title small{vertical-align:top}.spf-field-typography .spf--blocks{display:flex;flex-wrap:wrap}.spf-field-typography .spf--block{padding-right:5px;padding-bottom:10px;box-sizing:border-box}.spf-field-typography .spf--block .spf--block{padding-right:0;padding-bottom:0}.spf-field-typography .spf--blocks-selects .spf--block{flex:1 33.3%}.spf-field-typography .spf--blocks-inputs .spf--block{flex:1 25%}.spf-field-typography .spf--blocks-inputs .spf--block .spf--block{flex:1}.spf-field-typography .spf--input{margin:0;width:100%;padding:5px 5px}.spf-field-typography .spf--unit{min-width:40px;max-width:40px;padding:4px 0;font-size:12px;font-weight:400;text-align:center;color:#777;border:1px solid #ddd;background-color:#eee;border-radius:0 2px 2px 0;border-left:0}.spf-field-typography .spf--preview{font-size:16px;line-height:20px;padding:20px;color:#222;border:1px solid #eee;background-color:#fff;border-radius:2.5px;user-select:none;-webkit-user-select:none;transition:background-color .2s,border-color .2s}.spf-field-typography .spf--block-preview{cursor:pointer;position:relative;overflow:hidden;margin-top:10px;max-width:100%}.spf-field-typography .spf--black-background{border-color:#000;background-color:#000}.spf-field-typography .spf--toggle{position:absolute;top:5px;right:10px;color:#999}.spf-field-typography .spf--block-extra-styles{margin-top:5px}.spf-field-upload input{width:100%}.spf-field-upload .spf--wrap{display:flex}.spf-field-upload .spf--buttons{display:flex;margin-left:5px}.spf-field-upload .spf--remove{margin-left:5px}.spf-field-wp_editor .spf-wp-editor{float:left;width:100%}.spf-field-wp_editor .mce-toolbar-grp{border:none}.spf-field-wp_editor .mce-btn.mce-active button,.spf-field-wp_editor .mce-btn.mce-active i,.spf-field-wp_editor .mce-btn.mce-active:hover button,.spf-field-wp_editor .mce-btn.mce-active:hover i{color:#23282d}.spf-field-wp_editor .wp-media-buttons{position:relative;z-index:2}.spf-field-wp_editor .wp-editor-tabs{position:relative;z-index:1}.spf-field-wp_editor .spf-no-tinymce{border:1px solid #e5e5e5}.spf-field-wp_editor .spf-no-quicktags .wp-media-buttons{float:none;display:block}.spf-field-wp_editor .spf-no-quicktags .mce-tinymce{box-shadow:none;border:1px solid #e5e5e5}.spf-field-wp_editor textarea{width:100%;max-width:100%;margin:0;box-shadow:none}.spf-field-heading{font-size:1.5em;font-weight:700;color:#23282d;background-color:#f5f5f5}.spf-field-subheading{font-size:14px;font-weight:700;padding-top:17px;padding-bottom:17px;color:#23282d;background-color:#f7f7f7}.spf-field-submessage{padding:0!important;border:0!important}.spf-field-submessage+.spf-field{border-top:0!important}.spf-submessage{font-size:12px;padding:17px 30px;border-top:1px solid transparent;border-bottom:1px solid transparent}.spf-submessage-success{color:#3c763d;border-color:#d6e9c6;background-color:#dff0d8}.spf-submessage-info{color:#31708f;border-color:#bce8f1;background-color:#d9edf7}.spf-submessage-warning{color:#8a6d3b;border-color:#faebcc;background-color:#fcf8e3}.spf-submessage-danger{color:#a94442;border-color:#ebccd1;background-color:#f2dede}.spf-submessage-normal{color:#23282d;border-color:#eee;background-color:#f7f7f7}.spf-field-notice{background-color:#f7f7f7}.spf-notice{padding:12px;background-color:#fff;border-left-style:solid;border-left-width:4px;box-shadow:0 1px 1px rgba(0,0,0,.1)}.spf-notice-success{border-color:#46b450}.spf-notice-info{border-color:#339fd4}.spf-notice-warning{border-color:#ffbc00}.spf-notice-danger{border-color:#dc3232}.spf-notice-normal{border-color:#222}.spf-help{cursor:help;position:absolute;top:0;right:0;padding:5px;font-size:14px;color:#aaa}.spf-help .spf-help-text{display:none}.spf-image-preview{display:inline-block;position:relative;padding:4px;min-width:44px;min-height:22px;margin-bottom:10px;border:1px solid #ccc;background-color:#f9f9f9;-moz-box-shadow:0 1px 0 rgba(0,0,0,.08);-webkit-box-shadow:0 1px 0 rgba(0,0,0,.08);box-shadow:0 1px 0 rgba(0,0,0,.08)}.spf-image-preview img{max-height:90px;display:inline-block;vertical-align:middle}.spf-field-custom .spf-field{padding:0}.spf-field .chosen-container-single .chosen-single{height:28px;line-height:26px}.spf-field .chosen-container-single .chosen-single abbr{top:0;right:20px;font-family:FontAwesome;font-size:12px;height:100%;width:18px;color:#aaa;text-align:center;background:0 0}.spf-field .chosen-container-single .chosen-single abbr:before{content:"\f00d"}.spf-field .chosen-container-single .chosen-single abbr:hover{color:#555}.spf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close{font-family:FontAwesome;font-size:12px;height:100%;width:18px;color:#aaa;text-align:center;background:0 0}.spf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:before{content:"\f00d"}.spf-field .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{color:#555}.spf-field .chosen-container-single .chosen-single div b{font-family:FontAwesome;font-size:14px;color:#aaa;background:0 0}.spf-field .chosen-container-single .chosen-single div b:before{content:"\f107"}.spf-field .chosen-container-single .chosen-single div b:hover{color:#555}.spf-field .chosen-container-active.chosen-with-drop .chosen-single div b:before{content:"\f106"}.spf-field .chosen-container-single .chosen-single-with-deselect span{margin-right:40px}.spf-field .chosen-container-single .chosen-search input[type=text]{background:0 0}.spf-field .chosen-container-single .chosen-search:before{font-family:FontAwesome;position:absolute;content:"\f002";font-size:11px;right:10px;top:7px;color:#aaa}.spf-field .wp-picker-container{display:inline-block}.spf-field .spf--transparent-wrap{display:none;position:relative;top:-1px;width:235px;padding:9px 10px;border:1px solid #dfdfdf;border-top:none;background-color:#fff}.spf-field .spf--transparent-slider{position:absolute;width:190px;margin-left:2px;height:18px}.spf-field .spf--transparent-slider .ui-slider-handle{position:absolute;top:-3px;bottom:-3px;z-index:5;border-color:#aaa;border-style:solid;border-width:4px 3px;width:10px;height:16px;margin:0 -5px;background:0 0;cursor:ew-resize;opacity:.9;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-moz-box-shadow:0 1px 2px rgba(0,0,0,.2);-webkit-box-shadow:0 1px 2px rgba(0,0,0,.2);box-shadow:0 1px 2px rgba(0,0,0,.2)}.spf-field .spf--transparent-slider .ui-slider-handle:before{content:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.spf-field .spf--transparent-offset{height:18px;width:200px;background:url(../images/checkerboard.png) repeat-y center left scroll #fff;-moz-box-shadow:0 0 5px rgba(0,0,0,.4) inset;-webkit-box-shadow:0 0 5px rgba(0,0,0,.4) inset;box-shadow:0 0 5px rgba(0,0,0,.4) inset;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}.spf-field .spf--transparent-text{position:absolute;top:12px;right:10px;width:30px;font-size:12px;line-height:12px;text-align:center;color:#999}.spf-field .spf--transparent-button{display:inline-block;text-align:center;cursor:pointer;margin-top:10px;user-select:none;-webkit-user-select:none;color:#999;transition:background-color .2s,border-color .2s,color .2s}.spf-field .spf--transparent-active .wp-color-result{background-image:url(../images/checkerboard.png);background-size:130%;background-position:center left;background-color:transparent!important}.spf-field .spf--transparent-active .spf--transparent-button{color:#fff;border-color:#4fb845;background-color:#4fb845}.spf-widgets>.spf-field{position:relative;top:-1px;margin-right:-15px;margin-left:-15px;padding:12px 15px}.spf-widgets>.spf-field .spf-field{margin-left:0;margin-right:0}.spf-widgets>.spf-field .spf-title{float:none;width:100%;margin-bottom:5px}.spf-widgets>.spf-field .spf-fieldset{margin-left:0}.spf-widgets .spf-field-text input{width:100%}.spf-widgets .spf-field-notice .spf-notice{padding:15px}.control-section .spf-widgets>.spf-field{margin-right:-10px;margin-left:-10px;padding:10px 12px}.control-section .spf-field{padding:0}.control-section .spf-field .spf-title{float:none;width:100%;margin-bottom:10px}.control-section .spf-field .spf-title h4{font-size:14px;font-weight:600;color:inherit}.control-section .spf-field .spf-fieldset{margin-left:0}.control-section .spf-field-select select{width:100%}.control-section .spf-field-heading{color:inherit;font-size:14px;line-height:1em;margin-right:-15px;margin-left:-15px;padding:15px}.control-section .spf-field-subheading{color:inherit;font-size:11px;margin-right:-15px;margin-left:-15px;padding:10px 15px}.control-section .spf-text-subtitle{margin-top:4px;font-size:12px}.control-section .spf-field-content,.control-section .spf-field-submessage .spf-submessage{margin-right:-15px;margin-left:-15px;padding:15px}.control-section .spf-fieldset .spf-field-heading,.control-section .spf-fieldset .spf-field-subheading,.control-section .spf-fieldset .spf-field-submessage .spf-submessage{margin-left:0;margin-right:0}.control-section .spf-field-date .spf--to{margin-left:0}.control-section .spf-field-sorter ul li{padding:5px}.control-section .spf-field-sorter .spf-modules{float:none;width:100%}.control-section .spf-field-sorter .spf-modules:first-child{padding-right:0;padding-bottom:15px}.control-section .spf-field-background .spf--select,.control-section .spf-field-background_adv .spf--select{width:100%}.control-section .spf-field-border select,.control-section .spf-field-column select,.control-section .spf-field-dimensions select,.control-section .spf-field-dimensions_advanced select,.control-section .spf-field-spacing select{width:auto}.control-section .spf-field-spinner input{width:50px}.control-section .spf-field-backup .spf-export-data{display:none}.control-section .spf-field-fieldset .spf-fieldset-content{border-color:#e5e5e5}.control-section .spf-field-fieldset .spf-field{padding:10px}.control-section .spf-field-fieldset .spf-field .spf-title{margin-bottom:5px}.control-section .spf-field-fieldset .spf-field h4{font-size:12px}.control-section .spf-field-accordion .spf-field,.control-section .spf-field-group .spf-field,.control-section .spf-field-repeater .spf-field,.control-section .spf-field-sortable .spf-field,.control-section .spf-field-tabbed .spf-field{padding:10px}.control-section .spf-field-accordion .spf-field .spf-title,.control-section .spf-field-group .spf-field .spf-title,.control-section .spf-field-repeater .spf-field .spf-title,.control-section .spf-field-sortable .spf-field .spf-title,.control-section .spf-field-tabbed .spf-field .spf-title{margin-bottom:5px}.control-section .spf-field-accordion .spf-field h4,.control-section .spf-field-group .spf-field h4,.control-section .spf-field-repeater .spf-field h4,.control-section .spf-field-sortable .spf-field h4,.control-section .spf-field-tabbed .spf-field h4{font-size:12px}.control-section .spf-dependency-control.hidden{display:none!important}.spf-taxonomy>.spf-field{border-top:none!important}.spf-taxonomy>.spf-field-heading{font-size:1.1em;padding:20px!important;border:1px solid #ddd}.spf-taxonomy>.spf-field-subheading{font-size:12px;padding:15px!important;border:1px solid #ddd}.spf-taxonomy>.spf-field-submessage .spf-submessage{padding:15px;border-left-width:1px;border-left-style:solid;border-right-width:1px;border-right-style:solid}.spf-taxonomy>.spf-field-notice{background-color:transparent}.spf-taxonomy .spf-section-title{display:block;padding:15px;background-color:#f9f9f9;border:1px solid #e5e5e5;-moz-box-shadow:0 1px 1px rgba(0,0,0,.04);-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04)}.spf-taxonomy-add-fields>.spf-field{padding:8px 0}.spf-taxonomy-add-fields>.spf-field>.spf-title{float:none;width:100%;padding:2px 2px 4px 0}.spf-taxonomy-add-fields>.spf-field>.spf-title h4{font-size:12px;font-weight:400}.spf-taxonomy-add-fields>.spf-field>.spf-fieldset{margin-left:0}.spf-taxonomy-add-fields>.spf-field>.spf-fieldset>.spf-help{right:-5px}.spf-taxonomy-add-fields+p.submit{margin-top:0}.spf-taxonomy-edit-fields>.spf-field{padding:20px 0}.spf-taxonomy-edit-fields>.spf-field>.spf-title{width:225px}.spf-taxonomy-edit-fields>.spf-field>.spf-title h4{font-size:14px;font-weight:600;line-height:1.3;display:inline-block;vertical-align:middle}.spf-taxonomy-edit-fields>.spf-field>.spf-fieldset{margin-left:225px}.spf-taxonomy-edit-fields>.spf-field>.spf-fieldset>.spf-help{top:-5px;right:-5px}.spf-taxonomy-edit-fields>.spf-field-submessage{margin:20px 0}.spf-taxonomy-edit-fields>.spf-field-heading,.spf-taxonomy-edit-fields>.spf-field-subheading{margin:20px 0;border:1px solid #ddd}.spf-profile>h2>.fa{padding-right:7px}.spf-profile>.spf-field{padding:15px 0;border-top:none!important}.spf-profile>.spf-field>.spf-title{width:220px}.spf-profile>.spf-field>.spf-title h4{font-size:14px;font-weight:600;line-height:1.3;display:inline-block;vertical-align:middle}.spf-profile>.spf-field>.spf-fieldset{margin-left:220px}.spf-profile>.spf-field>.spf-fieldset>.spf-help{top:-15px;right:-5px}.spf-profile>.spf-field-heading{font-size:1.1em}.spf-profile>.spf-field-subheading{font-size:12px}.spf-profile>.spf-field-heading,.spf-profile>.spf-field-subheading{margin:10px 0;padding:15px!important;border:1px solid #ddd}.spf-profile>.spf-field-submessage{margin:20px 0}.spf-profile>.spf-field-submessage .spf-submessage{padding:10px;border-left-width:1px;border-left-style:solid;border-right-width:1px;border-right-style:solid}.spf-profile>.spf-field-notice{background-color:transparent}.spf-modal{display:none;position:fixed;z-index:100101;top:0;left:0;width:100%;height:100%}.spf-modal-icon{z-index:100102}.spf-modal-table{display:table;width:100%;height:100%}.spf-modal-table-cell{display:table-cell;vertical-align:middle;margin:100px 0}.spf-modal-inner{position:relative;z-index:10;width:760px;height:750px;margin:0 auto;background-color:#fff}.spf-modal-content{position:relative;overflow:hidden;overflow-y:auto;height:592px}.spf-modal-content .spf-shortcode-button{display:none}.spf-modal-content .spf-fieldset{margin-left:25%}.spf-modal-content .spf-title{width:20%}.spf-modal-content .spf-field{padding:15px 30px 15px 15px}.spf-modal-content a:active,.spf-modal-content a:focus{outline:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.spf-modal-content h4{font-size:13px}.spf-modal-content h4 small{font-style:italic;font-weight:400;color:#aaa}.spf-modal-title{position:relative;background-color:#fcfcfc;border-bottom:1px solid #ddd;height:36px;font-size:16px;font-weight:600;line-height:36px;margin:0;padding:0 36px 0 16px}.spf-modal-header{width:100%;padding:16px 0;background-color:#f5f5f5;border-bottom:1px solid #eee}.spf-modal-header select{display:block;width:250px;margin:0 auto;background-color:#fff}.spf-modal-close{color:#666;padding:0;position:absolute;top:0;right:0;width:36px;height:36px;text-align:center;background:0 0;border:none;cursor:pointer}.spf-modal-close:before{font:normal 20px/36px dashicons;content:"\f158";vertical-align:top;width:36px;height:36px}.spf-modal-close:hover{opacity:.5}.spf-modal-insert-wrapper{text-align:center;width:100%;padding:16px 0;background-color:#f5f5f5;border-top:1px solid #eee}.spf-modal-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#000;opacity:.5}.spf--repeatable{padding:15px 15px 0 15px}.spf--repeat-button-block{text-align:center;padding-bottom:15px}.spf--repeat-shortcode{position:relative;margin-bottom:15px;border:1px dashed #ddd}.spf--repeat-shortcode:first-child .spf-repeat-remove{display:none}.spf--repeat-shortcode .spf-repeat-remove{position:absolute;right:10px;top:10px;z-index:10;cursor:pointer;display:inline-block;font-size:11px;width:18px;height:18px;line-height:18px;text-align:center;border-radius:2px;color:#fff;background-color:#e14d43;opacity:.5}.spf--repeat-shortcode .spf-repeat-remove:hover{opacity:1}.spf-shortcode-single .spf-modal-inner{height:750px}.spf-shortcode-single .spf-modal-content{height:652px}.elementor-editor-active .spf-shortcode-button{margin-left:5px}.elementor-editor-active .spf-modal .hidden{display:none!important}.spf-shortcode-block{text-align:center;padding:14px;font-size:13px;background-color:#f5f5f5;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.spf-shortcode-block .button{margin:10px 0}.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_shortcode_options .handlediv,#sp_wpcp_shortcode_options .hndle,#sp_wpcp_upload_options .handlediv,#sp_wpcp_upload_options .hndle{display:none}#spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header{background-color:#157592;background:linear-gradient(-45deg,#22afba,#157592);padding:22px 26px;overflow:hidden}#spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header .support{margin-left:16px;float:right}#spf-section-sp_wpcp_upload_options_1 .wpcp-admin-header .support a{color:#fff;text-decoration:none;line-height:35px;font-size:15px;font-weight:500}.spf-field-carousel_type .spf--image:nth-child(4),.spf-field-carousel_type .spf--image:nth-child(5){pointer-events:none}.spf-field-carousel_type .spf--image{position:relative}.spf-field-carousel_type .spf--image label strong{position:absolute;top:3px;right:3px;background:#cbd6df;padding:0 5px;font-size:10px}.spf-field-shortcode.wpcp-admin-footer .wpcp-shortcode-selectable{background-color:rgba(82,179,217,.11);padding:10px 15px;display:inline-block;-webkit-touch-callout:all;-webkit-user-select:all;-khtml-user-select:all;-moz-user-select:all;-ms-user-select:all;user-select:all}#spf-section-sp_wpcp_display_shortcode_1 .spf-field{display:flex;padding:0;flex-wrap:wrap}.spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap:first-of-type{border-right:1px solid #ddd}.spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap{padding-top:22px;padding-bottom:22px;text-align:center;width:49%}.spf-field-shortcode.wpcp-admin-footer .wpcp-sc-title{font-weight:500;font-size:14px!important;padding-top:0!important;color:#4c5158;margin-right:5px}@media only screen and (max-width:990px){.spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap:first-of-type{border-right:none;border-bottom:1px solid #ddd}.spf-field-shortcode.wpcp-admin-footer .wpcp-scode-wrap{width:100%}}
admin/views/wpcfree-metabox/assets/images/angle-arrow.png ADDED
Binary file
admin/views/wpcfree-metabox/assets/images/bold-arrow.png ADDED
Binary file
admin/views/wpcfree-metabox/assets/images/caret-arrow.png ADDED
Binary file
admin/views/wpcfree-metabox/assets/images/checkerboard.png ADDED
Binary file
admin/views/wpcfree-metabox/assets/images/chevron-arrow.png ADDED
Binary file
admin/views/wpcfree-metabox/assets/images/double-arrow.png ADDED
Binary file
admin/views/wpcfree-metabox/assets/images/long-arrow.png ADDED
Binary file
admin/views/wpcfree-metabox/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/wpcfree-metabox/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/wpcfree-metabox/assets/js/spf-gutenberg-block.js ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1 @@
 
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.js ADDED
@@ -0,0 +1,1744 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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; },
5
+ hasProp = {}.hasOwnProperty;
6
+
7
+ SelectParser = (function() {
8
+ function SelectParser() {
9
+ this.options_index = 0;
10
+ this.parsed = [];
11
+ }
12
+
13
+ SelectParser.prototype.add_node = function(child) {
14
+ if (child.nodeName.toUpperCase() === "OPTGROUP") {
15
+ return this.add_group(child);
16
+ } else {
17
+ return this.add_option(child);
18
+ }
19
+ };
20
+
21
+ SelectParser.prototype.add_group = function(group) {
22
+ var group_position, i, len, option, ref, results1;
23
+ group_position = this.parsed.length;
24
+ this.parsed.push({
25
+ array_index: group_position,
26
+ group: true,
27
+ label: group.label,
28
+ title: group.title ? group.title : void 0,
29
+ children: 0,
30
+ disabled: group.disabled,
31
+ classes: group.className
32
+ });
33
+ ref = group.childNodes;
34
+ results1 = [];
35
+ for (i = 0, len = ref.length; i < len; i++) {
36
+ option = ref[i];
37
+ results1.push(this.add_option(option, group_position, group.disabled));
38
+ }
39
+ return results1;
40
+ };
41
+
42
+ SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
43
+ if (option.nodeName.toUpperCase() === "OPTION") {
44
+ if (option.text !== "") {
45
+ if (group_position != null) {
46
+ this.parsed[group_position].children += 1;
47
+ }
48
+ this.parsed.push({
49
+ array_index: this.parsed.length,
50
+ options_index: this.options_index,
51
+ value: option.value,
52
+ text: option.text,
53
+ html: option.innerHTML,
54
+ title: option.title ? option.title : void 0,
55
+ selected: option.selected,
56
+ disabled: group_disabled === true ? group_disabled : option.disabled,
57
+ group_array_index: group_position,
58
+ group_label: group_position != null ? this.parsed[group_position].label : null,
59
+ classes: option.className,
60
+ style: option.style.cssText
61
+ });
62
+ } else {
63
+ this.parsed.push({
64
+ array_index: this.parsed.length,
65
+ options_index: this.options_index,
66
+ empty: true
67
+ });
68
+ }
69
+ return this.options_index += 1;
70
+ }
71
+ };
72
+
73
+ return SelectParser;
74
+
75
+ })();
76
+
77
+ SelectParser.select_to_array = function(select) {
78
+ var child, i, len, parser, ref;
79
+ parser = new SelectParser();
80
+ ref = select.childNodes;
81
+ for (i = 0, len = ref.length; i < len; i++) {
82
+ child = ref[i];
83
+ parser.add_node(child);
84
+ }
85
+ return parser.parsed;
86
+ };
87
+
88
+ AbstractChosen = (function() {
89
+ function AbstractChosen(form_field, options1) {
90
+ this.form_field = form_field;
91
+ this.options = options1 != null ? options1 : {};
92
+ this.label_click_handler = bind(this.label_click_handler, this);
93
+ if (!AbstractChosen.browser_is_supported()) {
94
+ return;
95
+ }
96
+ this.is_multiple = this.form_field.multiple;
97
+ this.set_default_text();
98
+ this.set_default_values();
99
+ this.setup();
100
+ this.set_up_html();
101
+ this.register_observers();
102
+ this.on_ready();
103
+ }
104
+
105
+ AbstractChosen.prototype.set_default_values = function() {
106
+ this.click_test_action = (function(_this) {
107
+ return function(evt) {
108
+ return _this.test_active_click(evt);
109
+ };
110
+ })(this);
111
+ this.activate_action = (function(_this) {
112
+ return function(evt) {
113
+ return _this.activate_field(evt);
114
+ };
115
+ })(this);
116
+ this.active_field = false;
117
+ this.mouse_on_container = false;
118
+ this.results_showing = false;
119
+ this.result_highlighted = null;
120
+ this.is_rtl = this.options.rtl || /\bchosen-rtl\b/.test(this.form_field.className);
121
+ this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
122
+ this.disable_search_threshold = this.options.disable_search_threshold || 0;
123
+ this.disable_search = this.options.disable_search || false;
124
+ this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
125
+ this.group_search = this.options.group_search != null ? this.options.group_search : true;
126
+ this.search_contains = this.options.search_contains || false;
127
+ this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
128
+ this.max_selected_options = this.options.max_selected_options || Infinity;
129
+ this.inherit_select_classes = this.options.inherit_select_classes || false;
130
+ this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
131
+ this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
132
+ this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
133
+ this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
134
+ this.case_sensitive_search = this.options.case_sensitive_search || false;
135
+ return this.hide_results_on_select = this.options.hide_results_on_select != null ? this.options.hide_results_on_select : true;
136
+ };
137
+
138
+ AbstractChosen.prototype.set_default_text = function() {
139
+ if (this.form_field.getAttribute("data-placeholder")) {
140
+ this.default_text = this.form_field.getAttribute("data-placeholder");
141
+ } else if (this.is_multiple) {
142
+ this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
143
+ } else {
144
+ this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
145
+ }
146
+ this.default_text = this.escape_html(this.default_text);
147
+ return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
148
+ };
149
+
150
+ AbstractChosen.prototype.choice_label = function(item) {
151
+ if (this.include_group_label_in_selected && (item.group_label != null)) {
152
+ return "<b class='group-name'>" + (this.escape_html(item.group_label)) + "</b>" + item.html;
153
+ } else {
154
+ return item.html;
155
+ }
156
+ };
157
+
158
+ AbstractChosen.prototype.mouse_enter = function() {
159
+ return this.mouse_on_container = true;
160
+ };
161
+
162
+ AbstractChosen.prototype.mouse_leave = function() {
163
+ return this.mouse_on_container = false;
164
+ };
165
+
166
+ AbstractChosen.prototype.input_focus = function(evt) {
167
+ if (this.is_multiple) {
168
+ if (!this.active_field) {
169
+ return setTimeout(((function(_this) {
170
+ return function() {
171
+ return _this.container_mousedown();
172
+ };
173
+ })(this)), 50);
174
+ }
175
+ } else {
176
+ if (!this.active_field) {
177
+ return this.activate_field();
178
+ }
179
+ }
180
+ };
181
+
182
+ AbstractChosen.prototype.input_blur = function(evt) {
183
+ if (!this.mouse_on_container) {
184
+ this.active_field = false;
185
+ return setTimeout(((function(_this) {
186
+ return function() {
187
+ return _this.blur_test();
188
+ };
189
+ })(this)), 100);
190
+ }
191
+ };
192
+
193
+ AbstractChosen.prototype.label_click_handler = function(evt) {
194
+ if (this.is_multiple) {
195
+ return this.container_mousedown(evt);
196
+ } else {
197
+ return this.activate_field();
198
+ }
199
+ };
200
+
201
+ AbstractChosen.prototype.results_option_build = function(options) {
202
+ var content, data, data_content, i, len, ref, shown_results;
203
+ content = '';
204
+ shown_results = 0;
205
+ ref = this.results_data;
206
+ for (i = 0, len = ref.length; i < len; i++) {
207
+ data = ref[i];
208
+ data_content = '';
209
+ if (data.group) {
210
+ data_content = this.result_add_group(data);
211
+ } else {
212
+ data_content = this.result_add_option(data);
213
+ }
214
+ if (data_content !== '') {
215
+ shown_results++;
216
+ content += data_content;
217
+ }
218
+ if (options != null ? options.first : void 0) {
219
+ if (data.selected && this.is_multiple) {
220
+ this.choice_build(data);
221
+ } else if (data.selected && !this.is_multiple) {
222
+ this.single_set_selected_text(this.choice_label(data));
223
+ }
224
+ }
225
+ if (shown_results >= this.max_shown_results) {
226
+ break;
227
+ }
228
+ }
229
+ return content;
230
+ };
231
+
232
+ AbstractChosen.prototype.result_add_option = function(option) {
233
+ var classes, option_el;
234
+ if (!option.search_match) {
235
+ return '';
236
+ }
237
+ if (!this.include_option_in_results(option)) {
238
+ return '';
239
+ }
240
+ classes = [];
241
+ if (!option.disabled && !(option.selected && this.is_multiple)) {
242
+ classes.push("active-result");
243
+ }
244
+ if (option.disabled && !(option.selected && this.is_multiple)) {
245
+ classes.push("disabled-result");
246
+ }
247
+ if (option.selected) {
248
+ classes.push("result-selected");
249
+ }
250
+ if (option.group_array_index != null) {
251
+ classes.push("group-option");
252
+ }
253
+ if (option.classes !== "") {
254
+ classes.push(option.classes);
255
+ }
256
+ option_el = document.createElement("li");
257
+ option_el.className = classes.join(" ");
258
+ if (option.style) {
259
+ option_el.style.cssText = option.style;
260
+ }
261
+ option_el.setAttribute("data-option-array-index", option.array_index);
262
+ option_el.innerHTML = option.highlighted_html || option.html;
263
+ if (option.title) {
264
+ option_el.title = option.title;
265
+ }
266
+ return this.outerHTML(option_el);
267
+ };
268
+
269
+ AbstractChosen.prototype.result_add_group = function(group) {
270
+ var classes, group_el;
271
+ if (!(group.search_match || group.group_match)) {
272
+ return '';
273
+ }
274
+ if (!(group.active_options > 0)) {
275
+ return '';
276
+ }
277
+ classes = [];
278
+ classes.push("group-result");
279
+ if (group.classes) {
280
+ classes.push(group.classes);
281
+ }
282
+ group_el = document.createElement("li");
283
+ group_el.className = classes.join(" ");
284
+ group_el.innerHTML = group.highlighted_html || this.escape_html(group.label);
285
+ if (group.title) {
286
+ group_el.title = group.title;
287
+ }
288
+ return this.outerHTML(group_el);
289
+ };
290
+
291
+ AbstractChosen.prototype.results_update_field = function() {
292
+ this.set_default_text();
293
+ if (!this.is_multiple) {
294
+ this.results_reset_cleanup();
295
+ }
296
+ this.result_clear_highlight();
297
+ this.results_build();
298
+ if (this.results_showing) {
299
+ return this.winnow_results();
300
+ }
301
+ };
302
+
303
+ AbstractChosen.prototype.reset_single_select_options = function() {
304
+ var i, len, ref, result, results1;
305
+ ref = this.results_data;
306
+ results1 = [];
307
+ for (i = 0, len = ref.length; i < len; i++) {
308
+ result = ref[i];
309
+ if (result.selected) {
310
+ results1.push(result.selected = false);
311
+ } else {
312
+ results1.push(void 0);
313
+ }
314
+ }
315
+ return results1;
316
+ };
317
+
318
+ AbstractChosen.prototype.results_toggle = function() {
319
+ if (this.results_showing) {
320
+ return this.results_hide();
321
+ } else {
322
+ return this.results_show();
323
+ }
324
+ };
325
+
326
+ AbstractChosen.prototype.results_search = function(evt) {
327
+ if (this.results_showing) {
328
+ return this.winnow_results();
329
+ } else {
330
+ return this.results_show();
331
+ }
332
+ };
333
+
334
+ AbstractChosen.prototype.winnow_results = function(options) {
335
+ var escapedQuery, fix, i, len, option, prefix, query, ref, regex, results, results_group, search_match, startpos, suffix, text;
336
+ this.no_results_clear();
337
+ results = 0;
338
+ query = this.get_search_text();
339
+ escapedQuery = query.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
340
+ regex = this.get_search_regex(escapedQuery);
341
+ ref = this.results_data;
342
+ for (i = 0, len = ref.length; i < len; i++) {
343
+ option = ref[i];
344
+ option.search_match = false;
345
+ results_group = null;
346
+ search_match = null;
347
+ option.highlighted_html = '';
348
+ if (this.include_option_in_results(option)) {
349
+ if (option.group) {
350
+ option.group_match = false;
351
+ option.active_options = 0;
352
+ }
353
+ if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
354
+ results_group = this.results_data[option.group_array_index];
355
+ if (results_group.active_options === 0 && results_group.search_match) {
356
+ results += 1;
357
+ }
358
+ results_group.active_options += 1;
359
+ }
360
+ text = option.group ? option.label : option.text;
361
+ if (!(option.group && !this.group_search)) {
362
+ search_match = this.search_string_match(text, regex);
363
+ option.search_match = search_match != null;
364
+ if (option.search_match && !option.group) {
365
+ results += 1;
366
+ }
367
+ if (option.search_match) {
368
+ if (query.length) {
369
+ startpos = search_match.index;
370
+ prefix = text.slice(0, startpos);
371
+ fix = text.slice(startpos, startpos + query.length);
372
+ suffix = text.slice(startpos + query.length);
373
+ option.highlighted_html = (this.escape_html(prefix)) + "<em>" + (this.escape_html(fix)) + "</em>" + (this.escape_html(suffix));
374
+ }
375
+ if (results_group != null) {
376
+ results_group.group_match = true;
377
+ }
378
+ } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
379
+ option.search_match = true;
380
+ }
381
+ }
382
+ }
383
+ }
384
+ this.result_clear_highlight();
385
+ if (results < 1 && query.length) {
386
+ this.update_results_content("");
387
+ return this.no_results(query);
388
+ } else {
389
+ this.update_results_content(this.results_option_build());
390
+ if (!(options != null ? options.skip_highlight : void 0)) {
391
+ return this.winnow_results_set_highlight();
392
+ }
393
+ }
394
+ };
395
+
396
+ AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
397
+ var regex_flag, regex_string;
398
+ regex_string = this.search_contains ? escaped_search_string : "(^|\\s|\\b)" + escaped_search_string + "[^\\s]*";
399
+ if (!(this.enable_split_word_search || this.search_contains)) {
400
+ regex_string = "^" + regex_string;
401
+ }
402
+ regex_flag = this.case_sensitive_search ? "" : "i";
403
+ return new RegExp(regex_string, regex_flag);
404
+ };
405
+
406
+ AbstractChosen.prototype.search_string_match = function(search_string, regex) {
407
+ var match;
408
+ match = regex.exec(search_string);
409
+ if (!this.search_contains && (match != null ? match[1] : void 0)) {
410
+ match.index += 1;
411
+ }
412
+ return match;
413
+ };
414
+
415
+ AbstractChosen.prototype.choices_count = function() {
416
+ var i, len, option, ref;
417
+ if (this.selected_option_count != null) {
418
+ return this.selected_option_count;
419
+ }
420
+ this.selected_option_count = 0;
421
+ ref = this.form_field.options;
422
+ for (i = 0, len = ref.length; i < len; i++) {
423
+ option = ref[i];
424
+ if (option.selected) {
425
+ this.selected_option_count += 1;
426
+ }
427
+ }
428
+ return this.selected_option_count;
429
+ };
430
+
431
+ AbstractChosen.prototype.choices_click = function(evt) {
432
+ evt.preventDefault();
433
+ this.activate_field();
434
+ if (!(this.results_showing || this.is_disabled)) {
435
+ return this.results_show();
436
+ }
437
+ };
438
+
439
+ AbstractChosen.prototype.keydown_checker = function(evt) {
440
+ var ref, stroke;
441
+ stroke = (ref = evt.which) != null ? ref : evt.keyCode;
442
+ this.search_field_scale();
443
+ if (stroke !== 8 && this.pending_backstroke) {
444
+ this.clear_backstroke();
445
+ }
446
+ switch (stroke) {
447
+ case 8:
448
+ this.backstroke_length = this.get_search_field_value().length;
449
+ break;
450
+ case 9:
451
+ if (this.results_showing && !this.is_multiple) {
452
+ this.result_select(evt);
453
+ }
454
+ this.mouse_on_container = false;
455
+ break;
456
+ case 13:
457
+ if (this.results_showing) {
458
+ evt.preventDefault();
459
+ }
460
+ break;
461
+ case 27:
462
+ if (this.results_showing) {
463
+ evt.preventDefault();
464
+ }
465
+ break;
466
+ case 32:
467
+ if (this.disable_search) {
468
+ evt.preventDefault();
469
+ }
470
+ break;
471
+ case 38:
472
+ evt.preventDefault();
473
+ this.keyup_arrow();
474
+ break;
475
+ case 40:
476
+ evt.preventDefault();
477
+ this.keydown_arrow();
478
+ break;
479
+ }
480
+ };
481
+
482
+ AbstractChosen.prototype.keyup_checker = function(evt) {
483
+ var ref, stroke;
484
+ stroke = (ref = evt.which) != null ? ref : evt.keyCode;
485
+ this.search_field_scale();
486
+ switch (stroke) {
487
+ case 8:
488
+ if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
489
+ this.keydown_backstroke();
490
+ } else if (!this.pending_backstroke) {
491
+ this.result_clear_highlight();
492
+ this.results_search();
493
+ }
494
+ break;
495
+ case 13:
496
+ evt.preventDefault();
497
+ if (this.results_showing) {
498
+ this.result_select(evt);
499
+ }
500
+ break;
501
+ case 27:
502
+ if (this.results_showing) {
503
+ this.results_hide();
504
+ }
505
+ break;
506
+ case 9:
507
+ case 16:
508
+ case 17:
509
+ case 18:
510
+ case 38:
511
+ case 40:
512
+ case 91:
513
+ break;
514
+ default:
515
+ this.results_search();
516
+ break;
517
+ }
518
+ };
519
+
520
+ AbstractChosen.prototype.clipboard_event_checker = function(evt) {
521
+ if (this.is_disabled) {
522
+ return;
523
+ }
524
+ return setTimeout(((function(_this) {
525
+ return function() {
526
+ return _this.results_search();
527
+ };
528
+ })(this)), 50);
529
+ };
530
+
531
+ AbstractChosen.prototype.container_width = function() {
532
+ if (this.options.width != null) {
533
+ return this.options.width;
534
+ } else {
535
+ return this.form_field.offsetWidth + "px";
536
+ }
537
+ };
538
+
539
+ AbstractChosen.prototype.include_option_in_results = function(option) {
540
+ if (this.is_multiple && (!this.display_selected_options && option.selected)) {
541
+ return false;
542
+ }
543
+ if (!this.display_disabled_options && option.disabled) {
544
+ return false;
545
+ }
546
+ if (option.empty) {
547
+ return false;
548
+ }
549
+ return true;
550
+ };
551
+
552
+ AbstractChosen.prototype.search_results_touchstart = function(evt) {
553
+ this.touch_started = true;
554
+ return this.search_results_mouseover(evt);
555
+ };
556
+
557
+ AbstractChosen.prototype.search_results_touchmove = function(evt) {
558
+ this.touch_started = false;
559
+ return this.search_results_mouseout(evt);
560
+ };
561
+
562
+ AbstractChosen.prototype.search_results_touchend = function(evt) {
563
+ if (this.touch_started) {
564
+ return this.search_results_mouseup(evt);
565
+ }
566
+ };
567
+
568
+ AbstractChosen.prototype.outerHTML = function(element) {
569
+ var tmp;
570
+ if (element.outerHTML) {
571
+ return element.outerHTML;
572
+ }
573
+ tmp = document.createElement("div");
574
+ tmp.appendChild(element);
575
+ return tmp.innerHTML;
576
+ };
577
+
578
+ AbstractChosen.prototype.get_single_html = function() {
579
+ 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>";
580
+ };
581
+
582
+ AbstractChosen.prototype.get_multi_html = function() {
583
+ 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>";
584
+ };
585
+
586
+ AbstractChosen.prototype.get_no_results_html = function(terms) {
587
+ return "<li class=\"no-results\">\n " + this.results_none_found + " <span>" + (this.escape_html(terms)) + "</span>\n</li>";
588
+ };
589
+
590
+ AbstractChosen.browser_is_supported = function() {
591
+ if ("Microsoft Internet Explorer" === window.navigator.appName) {
592
+ return document.documentMode >= 8;
593
+ }
594
+ if (/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)) {
595
+ return false;
596
+ }
597
+ return true;
598
+ };
599
+
600
+ AbstractChosen.default_multiple_text = "Select Some Options";
601
+
602
+ AbstractChosen.default_single_text = "Select an Option";
603
+
604
+ AbstractChosen.default_no_result_text = "No results match";
605
+
606
+ return AbstractChosen;
607
+
608
+ })();
609
+
610
+ $ = jQuery;
611
+
612
+ $.fn.extend({
613
+ chosen: function(options) {
614
+ if (!AbstractChosen.browser_is_supported()) {
615
+ return this;
616
+ }
617
+ return this.each(function(input_field) {
618
+ var $this, chosen;
619
+ $this = $(this);
620
+ chosen = $this.data('chosen');
621
+ if (options === 'destroy') {
622
+ if (chosen instanceof Chosen) {
623
+ chosen.destroy();
624
+ }
625
+ return;
626
+ }
627
+ if (!(chosen instanceof Chosen)) {
628
+ $this.data('chosen', new Chosen(this, options));
629
+ }
630
+ });
631
+ }
632
+ });
633
+
634
+ Chosen = (function(superClass) {
635
+ extend(Chosen, superClass);
636
+
637
+ function Chosen() {
638
+ return Chosen.__super__.constructor.apply(this, arguments);
639
+ }
640
+
641
+ Chosen.prototype.setup = function() {
642
+ this.form_field_jq = $(this.form_field);
643
+ return this.current_selectedIndex = this.form_field.selectedIndex;
644
+ };
645
+
646
+ Chosen.prototype.set_up_html = function() {
647
+ var container_classes, container_props;
648
+ container_classes = ["chosen-container"];
649
+ container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
650
+ if (this.inherit_select_classes && this.form_field.className) {
651
+ container_classes.push(this.form_field.className);
652
+ }
653
+ if (this.is_rtl) {
654
+ container_classes.push("chosen-rtl");
655
+ }
656
+ container_props = {
657
+ 'class': container_classes.join(' '),
658
+ 'title': this.form_field.title
659
+ };
660
+ if (this.form_field.id.length) {
661
+ container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
662
+ }
663
+ this.container = $("<div />", container_props);
664
+ this.container.width(this.container_width());
665
+ if (this.is_multiple) {
666
+ this.container.html(this.get_multi_html());
667
+ } else {
668
+ this.container.html(this.get_single_html());
669
+ }
670
+ this.form_field_jq.hide().after(this.container);
671
+ this.dropdown = this.container.find('div.chosen-drop').first();
672
+ this.search_field = this.container.find('input').first();
673
+ this.search_results = this.container.find('ul.chosen-results').first();
674
+ this.search_field_scale();
675
+ this.search_no_results = this.container.find('li.no-results').first();
676
+ if (this.is_multiple) {
677
+ this.search_choices = this.container.find('ul.chosen-choices').first();
678
+ this.search_container = this.container.find('li.search-field').first();
679
+ } else {
680
+ this.search_container = this.container.find('div.chosen-search').first();
681
+ this.selected_item = this.container.find('.chosen-single').first();
682
+ }
683
+ this.results_build();
684
+ this.set_tab_index();
685
+ return this.set_label_behavior();
686
+ };
687
+
688
+ Chosen.prototype.on_ready = function() {
689
+ return this.form_field_jq.trigger("chosen:ready", {
690
+ chosen: this
691
+ });
692
+ };
693
+
694
+ Chosen.prototype.register_observers = function() {
695
+ this.container.on('touchstart.chosen', (function(_this) {
696
+ return function(evt) {
697
+ _this.container_mousedown(evt);
698
+ };
699
+ })(this));
700
+ this.container.on('touchend.chosen', (function(_this) {
701
+ return function(evt) {
702
+ _this.container_mouseup(evt);
703
+ };
704
+ })(this));
705
+ this.container.on('mousedown.chosen', (function(_this) {
706
+ return function(evt) {
707
+ _this.container_mousedown(evt);
708
+ };
709
+ })(this));
710
+ this.container.on('mouseup.chosen', (function(_this) {
711
+ return function(evt) {
712
+ _this.container_mouseup(evt);
713
+ };
714
+ })(this));
715
+ this.container.on('mouseenter.chosen', (function(_this) {
716
+ return function(evt) {
717
+ _this.mouse_enter(evt);
718
+ };
719
+ })(this));
720
+ this.container.on('mouseleave.chosen', (function(_this) {
721
+ return function(evt) {
722
+ _this.mouse_leave(evt);
723
+ };
724
+ })(this));
725
+ this.search_results.on('mouseup.chosen', (function(_this) {
726
+ return function(evt) {
727
+ _this.search_results_mouseup(evt);
728
+ };
729
+ })(this));
730
+ this.search_results.on('mouseover.chosen', (function(_this) {
731
+ return function(evt) {
732
+ _this.search_results_mouseover(evt);
733
+ };
734
+ })(this));
735
+ this.search_results.on('mouseout.chosen', (function(_this) {
736
+ return function(evt) {
737
+ _this.search_results_mouseout(evt);
738
+ };
739
+ })(this));
740
+ this.search_results.on('mousewheel.chosen DOMMouseScroll.chosen', (function(_this) {
741
+ return function(evt) {
742
+ _this.search_results_mousewheel(evt);
743
+ };
744
+ })(this));
745
+ this.search_results.on('touchstart.chosen', (function(_this) {
746
+ return function(evt) {
747
+ _this.search_results_touchstart(evt);
748
+ };
749
+ })(this));
750
+ this.search_results.on('touchmove.chosen', (function(_this) {
751
+ return function(evt) {
752
+ _this.search_results_touchmove(evt);
753
+ };
754
+ })(this));
755
+ this.search_results.on('touchend.chosen', (function(_this) {
756
+ return function(evt) {
757
+ _this.search_results_touchend(evt);
758
+ };
759
+ })(this));
760
+ this.form_field_jq.on("chosen:updated.chosen", (function(_this) {
761
+ return function(evt) {
762
+ _this.results_update_field(evt);
763
+ };
764
+ })(this));
765
+ this.form_field_jq.on("chosen:activate.chosen", (function(_this) {
766
+ return function(evt) {
767
+ _this.activate_field(evt);
768
+ };
769
+ })(this));
770
+ this.form_field_jq.on("chosen:open.chosen", (function(_this) {
771
+ return function(evt) {
772
+ _this.container_mousedown(evt);
773
+ };
774
+ })(this));
775
+ this.form_field_jq.on("chosen:close.chosen", (function(_this) {
776
+ return function(evt) {
777
+ _this.close_field(evt);
778
+ };
779
+ })(this));
780
+ this.search_field.on('blur.chosen', (function(_this) {
781
+ return function(evt) {
782
+ _this.input_blur(evt);
783
+ };
784
+ })(this));
785
+ this.search_field.on('keyup.chosen', (function(_this) {
786
+ return function(evt) {
787
+ _this.keyup_checker(evt);
788
+ };
789
+ })(this));
790
+ this.search_field.on('keydown.chosen', (function(_this) {
791
+ return function(evt) {
792
+ _this.keydown_checker(evt);
793
+ };
794
+ })(this));
795
+ this.search_field.on('focus.chosen', (function(_this) {
796
+ return function(evt) {
797
+ _this.input_focus(evt);
798
+ };
799
+ })(this));
800
+ this.search_field.on('cut.chosen', (function(_this) {
801
+ return function(evt) {
802
+ _this.clipboard_event_checker(evt);
803
+ };
804
+ })(this));
805
+ this.search_field.on('paste.chosen', (function(_this) {
806
+ return function(evt) {
807
+ _this.clipboard_event_checker(evt);
808
+ };
809
+ })(this));
810
+ if (this.is_multiple) {
811
+ return this.search_choices.on('click.chosen', (function(_this) {
812
+ return function(evt) {
813
+ _this.choices_click(evt);
814
+ };
815
+ })(this));
816
+ } else {
817
+ return this.container.on('click.chosen', function(evt) {
818
+ evt.preventDefault();
819
+ });
820
+ }
821
+ };
822
+
823
+ Chosen.prototype.destroy = function() {
824
+ $(this.container[0].ownerDocument).off('click.chosen', this.click_test_action);
825
+ if (this.form_field_label.length > 0) {
826
+ this.form_field_label.off('click.chosen');
827
+ }
828
+ if (this.search_field[0].tabIndex) {
829
+ this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
830
+ }
831
+ this.container.remove();
832
+ this.form_field_jq.removeData('chosen');
833
+ return this.form_field_jq.show();
834
+ };
835
+
836
+ Chosen.prototype.search_field_disabled = function() {
837
+ this.is_disabled = this.form_field.disabled || this.form_field_jq.parents('fieldset').is(':disabled');
838
+ this.container.toggleClass('chosen-disabled', this.is_disabled);
839
+ this.search_field[0].disabled = this.is_disabled;
840
+ if (!this.is_multiple) {
841
+ this.selected_item.off('focus.chosen', this.activate_field);
842
+ }
843
+ if (this.is_disabled) {
844
+ return this.close_field();
845
+ } else if (!this.is_multiple) {
846
+ return this.selected_item.on('focus.chosen', this.activate_field);
847
+ }
848
+ };
849
+
850
+ Chosen.prototype.container_mousedown = function(evt) {
851
+ var ref;
852
+ if (this.is_disabled) {
853
+ return;
854
+ }
855
+ if (evt && ((ref = evt.type) === 'mousedown' || ref === 'touchstart') && !this.results_showing) {
856
+ evt.preventDefault();
857
+ }
858
+ if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
859
+ if (!this.active_field) {
860
+ if (this.is_multiple) {
861
+ this.search_field.val("");
862
+ }
863
+ $(this.container[0].ownerDocument).on('click.chosen', this.click_test_action);
864
+ this.results_show();
865
+ } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
866
+ evt.preventDefault();
867
+ this.results_toggle();
868
+ }
869
+ return this.activate_field();
870
+ }
871
+ };
872
+
873
+ Chosen.prototype.container_mouseup = function(evt) {
874
+ if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
875
+ return this.results_reset(evt);
876
+ }
877
+ };
878
+
879
+ Chosen.prototype.search_results_mousewheel = function(evt) {
880
+ var delta;
881
+ if (evt.originalEvent) {
882
+ delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
883
+ }
884
+ if (delta != null) {
885
+ evt.preventDefault();
886
+ if (evt.type === 'DOMMouseScroll') {
887
+ delta = delta * 40;
888
+ }
889
+ return this.search_results.scrollTop(delta + this.search_results.scrollTop());
890
+ }
891
+ };
892
+
893
+ Chosen.prototype.blur_test = function(evt) {
894
+ if (!this.active_field && this.container.hasClass("chosen-container-active")) {
895
+ return this.close_field();
896
+ }
897
+ };
898
+
899
+ Chosen.prototype.close_field = function() {
900
+ $(this.container[0].ownerDocument).off("click.chosen", this.click_test_action);
901
+ this.active_field = false;
902
+ this.results_hide();
903
+ this.container.removeClass("chosen-container-active");
904
+ this.clear_backstroke();
905
+ this.show_search_field_default();
906
+ this.search_field_scale();
907
+ return this.search_field.blur();
908
+ };
909
+
910
+ Chosen.prototype.activate_field = function() {
911
+ if (this.is_disabled) {
912
+ return;
913
+ }
914
+ this.container.addClass("chosen-container-active");
915
+ this.active_field = true;
916
+ this.search_field.val(this.search_field.val());
917
+ return this.search_field.focus();
918
+ };
919
+
920
+ Chosen.prototype.test_active_click = function(evt) {
921
+ var active_container;
922
+ active_container = $(evt.target).closest('.chosen-container');
923
+ if (active_container.length && this.container[0] === active_container[0]) {
924
+ return this.active_field = true;
925
+ } else {
926
+ return this.close_field();
927
+ }
928
+ };
929
+
930
+ Chosen.prototype.results_build = function() {
931
+ this.parsing = true;
932
+ this.selected_option_count = null;
933
+ this.results_data = SelectParser.select_to_array(this.form_field);
934
+ if (this.is_multiple) {
935
+ this.search_choices.find("li.search-choice").remove();
936
+ } else {
937
+ this.single_set_selected_text();
938
+ if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
939
+ this.search_field[0].readOnly = true;
940
+ this.container.addClass("chosen-container-single-nosearch");
941
+ } else {
942
+ this.search_field[0].readOnly = false;
943
+ this.container.removeClass("chosen-container-single-nosearch");
944
+ }
945
+ }
946
+ this.update_results_content(this.results_option_build({
947
+ first: true
948
+ }));
949
+ this.search_field_disabled();
950
+ this.show_search_field_default();
951
+ this.search_field_scale();
952
+ return this.parsing = false;
953
+ };
954
+
955
+ Chosen.prototype.result_do_highlight = function(el) {
956
+ var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
957
+ if (el.length) {
958
+ this.result_clear_highlight();
959
+ this.result_highlight = el;
960
+ this.result_highlight.addClass("highlighted");
961
+ maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
962
+ visible_top = this.search_results.scrollTop();
963
+ visible_bottom = maxHeight + visible_top;
964
+ high_top = this.result_highlight.position().top + this.search_results.scrollTop();
965
+ high_bottom = high_top + this.result_highlight.outerHeight();
966
+ if (high_bottom >= visible_bottom) {
967
+ return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
968
+ } else if (high_top < visible_top) {
969
+ return this.search_results.scrollTop(high_top);
970
+ }
971
+ }
972
+ };
973
+
974
+ Chosen.prototype.result_clear_highlight = function() {
975
+ if (this.result_highlight) {
976
+ this.result_highlight.removeClass("highlighted");
977
+ }
978
+ return this.result_highlight = null;
979
+ };
980
+
981
+ Chosen.prototype.results_show = function() {
982
+ if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
983
+ this.form_field_jq.trigger("chosen:maxselected", {
984
+ chosen: this
985
+ });
986
+ return false;
987
+ }
988
+ this.container.addClass("chosen-with-drop");
989
+ this.results_showing = true;
990
+ this.search_field.focus();
991
+ this.search_field.val(this.get_search_field_value());
992
+ this.winnow_results();
993
+ return this.form_field_jq.trigger("chosen:showing_dropdown", {
994
+ chosen: this
995
+ });
996
+ };
997
+
998
+ Chosen.prototype.update_results_content = function(content) {
999
+ return this.search_results.html(content);
1000
+ };
1001
+
1002
+ Chosen.prototype.results_hide = function() {
1003
+ if (this.results_showing) {
1004
+ this.result_clear_highlight();
1005
+ this.container.removeClass("chosen-with-drop");
1006
+ this.form_field_jq.trigger("chosen:hiding_dropdown", {
1007
+ chosen: this
1008
+ });
1009
+ }
1010
+ return this.results_showing = false;
1011
+ };
1012
+
1013
+ Chosen.prototype.set_tab_index = function(el) {
1014
+ var ti;
1015
+ if (this.form_field.tabIndex) {
1016
+ ti = this.form_field.tabIndex;
1017
+ this.form_field.tabIndex = -1;
1018
+ return this.search_field[0].tabIndex = ti;
1019
+ }
1020
+ };
1021
+
1022
+ Chosen.prototype.set_label_behavior = function() {
1023
+ this.form_field_label = this.form_field_jq.parents("label");
1024
+ if (!this.form_field_label.length && this.form_field.id.length) {
1025
+ this.form_field_label = $("label[for='" + this.form_field.id + "']");
1026
+ }
1027
+ if (this.form_field_label.length > 0) {
1028
+ return this.form_field_label.on('click.chosen', this.label_click_handler);
1029
+ }
1030
+ };
1031
+
1032
+ Chosen.prototype.show_search_field_default = function() {
1033
+ if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
1034
+ this.search_field.val(this.default_text);
1035
+ return this.search_field.addClass("default");
1036
+ } else {
1037
+ this.search_field.val("");
1038
+ return this.search_field.removeClass("default");
1039
+ }
1040
+ };
1041
+
1042
+ Chosen.prototype.search_results_mouseup = function(evt) {
1043
+ var target;
1044
+ target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
1045
+ if (target.length) {
1046
+ this.result_highlight = target;
1047
+ this.result_select(evt);
1048
+ return this.search_field.focus();
1049
+ }
1050
+ };
1051
+
1052
+ Chosen.prototype.search_results_mouseover = function(evt) {
1053
+ var target;
1054
+ target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
1055
+ if (target) {
1056
+ return this.result_do_highlight(target);
1057
+ }
1058
+ };
1059
+
1060
+ Chosen.prototype.search_results_mouseout = function(evt) {
1061
+ if ($(evt.target).hasClass("active-result") || $(evt.target).parents('.active-result').first()) {
1062
+ return this.result_clear_highlight();
1063
+ }
1064
+ };
1065
+
1066
+ Chosen.prototype.choice_build = function(item) {
1067
+ var choice, close_link;
1068
+ choice = $('<li />', {
1069
+ "class": "search-choice"
1070
+ }).html("<span>" + (this.choice_label(item)) + "</span>");
1071
+ if (item.disabled) {
1072
+ choice.addClass('search-choice-disabled');
1073
+ } else {
1074
+ close_link = $('<a />', {
1075
+ "class": 'search-choice-close',
1076
+ 'data-option-array-index': item.array_index
1077
+ });
1078
+ close_link.on('click.chosen', (function(_this) {
1079
+ return function(evt) {
1080
+ return _this.choice_destroy_link_click(evt);
1081
+ };
1082
+ })(this));
1083
+ choice.append(close_link);
1084
+ }
1085
+ return this.search_container.before(choice);
1086
+ };
1087
+
1088
+ Chosen.prototype.choice_destroy_link_click = function(evt) {
1089
+ evt.preventDefault();
1090
+ evt.stopPropagation();
1091
+ if (!this.is_disabled) {
1092
+ return this.choice_destroy($(evt.target));
1093
+ }
1094
+ };
1095
+
1096
+ Chosen.prototype.choice_destroy = function(link) {
1097
+ if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
1098
+ if (this.active_field) {
1099
+ this.search_field.focus();
1100
+ } else {
1101
+ this.show_search_field_default();
1102
+ }
1103
+ if (this.is_multiple && this.choices_count() > 0 && this.get_search_field_value().length < 1) {
1104
+ this.results_hide();
1105
+ }
1106
+ link.parents('li').first().remove();
1107
+ return this.search_field_scale();
1108
+ }
1109
+ };
1110
+
1111
+ Chosen.prototype.results_reset = function() {
1112
+ this.reset_single_select_options();
1113
+ this.form_field.options[0].selected = true;
1114
+ this.single_set_selected_text();
1115
+ this.show_search_field_default();
1116
+ this.results_reset_cleanup();
1117
+ this.trigger_form_field_change();
1118
+ if (this.active_field) {
1119
+ return this.results_hide();
1120
+ }
1121
+ };
1122
+
1123
+ Chosen.prototype.results_reset_cleanup = function() {
1124
+ this.current_selectedIndex = this.form_field.selectedIndex;
1125
+ return this.selected_item.find("abbr").remove();
1126
+ };
1127
+
1128
+ Chosen.prototype.result_select = function(evt) {
1129
+ var high, item;
1130
+ if (this.result_highlight) {
1131
+ high = this.result_highlight;
1132
+ this.result_clear_highlight();
1133
+ if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
1134
+ this.form_field_jq.trigger("chosen:maxselected", {
1135
+ chosen: this
1136
+ });
1137
+ return false;
1138
+ }
1139
+ if (this.is_multiple) {
1140
+ high.removeClass("active-result");
1141
+ } else {
1142
+ this.reset_single_select_options();
1143
+ }
1144
+ high.addClass("result-selected");
1145
+ item = this.results_data[high[0].getAttribute("data-option-array-index")];
1146
+ item.selected = true;
1147
+ this.form_field.options[item.options_index].selected = true;
1148
+ this.selected_option_count = null;
1149
+ if (this.is_multiple) {
1150
+ this.choice_build(item);
1151
+ } else {
1152
+ this.single_set_selected_text(this.choice_label(item));
1153
+ }
1154
+ if (this.is_multiple && (!this.hide_results_on_select || (evt.metaKey || evt.ctrlKey))) {
1155
+ if (evt.metaKey || evt.ctrlKey) {
1156
+ this.winnow_results({
1157
+ skip_highlight: true
1158
+ });
1159
+ } else {
1160
+ this.search_field.val("");
1161
+ this.winnow_results();
1162
+ }
1163
+ } else {
1164
+ this.results_hide();
1165
+ this.show_search_field_default();
1166
+ }
1167
+ if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
1168
+ this.trigger_form_field_change({
1169
+ selected: this.form_field.options[item.options_index].value
1170
+ });
1171
+ }
1172
+ this.current_selectedIndex = this.form_field.selectedIndex;
1173
+ evt.preventDefault();
1174
+ return this.search_field_scale();
1175
+ }
1176
+ };
1177
+
1178
+ Chosen.prototype.single_set_selected_text = function(text) {
1179
+ if (text == null) {
1180
+ text = this.default_text;
1181
+ }
1182
+ if (text === this.default_text) {
1183
+ this.selected_item.addClass("chosen-default");
1184
+ } else {
1185
+ this.single_deselect_control_build();
1186
+ this.selected_item.removeClass("chosen-default");
1187
+ }
1188
+ return this.selected_item.find("span").html(text);
1189
+ };
1190
+
1191
+ Chosen.prototype.result_deselect = function(pos) {
1192
+ var result_data;
1193
+ result_data = this.results_data[pos];
1194
+ if (!this.form_field.options[result_data.options_index].disabled) {
1195
+ result_data.selected = false;
1196
+ this.form_field.options[result_data.options_index].selected = false;
1197
+ this.selected_option_count = null;
1198
+ this.result_clear_highlight();
1199
+ if (this.results_showing) {
1200
+ this.winnow_results();
1201
+ }
1202
+ this.trigger_form_field_change({
1203
+ deselected: this.form_field.options[result_data.options_index].value
1204
+ });
1205
+ this.search_field_scale();
1206
+ return true;
1207
+ } else {
1208
+ return false;
1209
+ }
1210
+ };
1211
+
1212
+ Chosen.prototype.single_deselect_control_build = function() {
1213
+ if (!this.allow_single_deselect) {
1214
+ return;
1215
+ }
1216
+ if (!this.selected_item.find("abbr").length) {
1217
+ this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
1218
+ }
1219
+ return this.selected_item.addClass("chosen-single-with-deselect");
1220
+ };
1221
+
1222
+ Chosen.prototype.get_search_field_value = function() {
1223
+ return this.search_field.val();
1224
+ };
1225
+
1226
+ Chosen.prototype.get_search_text = function() {
1227
+ return $.trim(this.get_search_field_value());
1228
+ };
1229
+
1230
+ Chosen.prototype.escape_html = function(text) {
1231
+ return $('<div/>').text(text).html();
1232
+ };
1233
+
1234
+ Chosen.prototype.winnow_results_set_highlight = function() {
1235
+ var do_high, selected_results;
1236
+ selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
1237
+ do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
1238
+ if (do_high != null) {
1239
+ return this.result_do_highlight(do_high);
1240
+ }
1241
+ };
1242
+
1243
+ Chosen.prototype.no_results = function(terms) {
1244
+ var no_results_html;
1245
+ no_results_html = this.get_no_results_html(terms);
1246
+ this.search_results.append(no_results_html);
1247
+ return this.form_field_jq.trigger("chosen:no_results", {
1248
+ chosen: this
1249
+ });
1250
+ };
1251
+
1252
+ Chosen.prototype.no_results_clear = function() {
1253
+ return this.search_results.find(".no-results").remove();
1254
+ };
1255
+
1256
+ Chosen.prototype.keydown_arrow = function() {
1257
+ var next_sib;
1258
+ if (this.results_showing && this.result_highlight) {
1259
+ next_sib = this.result_highlight.nextAll("li.active-result").first();
1260
+ if (next_sib) {
1261
+ return this.result_do_highlight(next_sib);
1262
+ }
1263
+ } else {
1264
+ return this.results_show();
1265
+ }
1266
+ };
1267
+
1268
+ Chosen.prototype.keyup_arrow = function() {
1269
+ var prev_sibs;
1270
+ if (!this.results_showing && !this.is_multiple) {
1271
+ return this.results_show();
1272
+ } else if (this.result_highlight) {
1273
+ prev_sibs = this.result_highlight.prevAll("li.active-result");
1274
+ if (prev_sibs.length) {
1275
+ return this.result_do_highlight(prev_sibs.first());
1276
+ } else {
1277
+ if (this.choices_count() > 0) {
1278
+ this.results_hide();
1279
+ }
1280
+ return this.result_clear_highlight();
1281
+ }
1282
+ }
1283
+ };
1284
+
1285
+ Chosen.prototype.keydown_backstroke = function() {
1286
+ var next_available_destroy;
1287
+ if (this.pending_backstroke) {
1288
+ this.choice_destroy(this.pending_backstroke.find("a").first());
1289
+ return this.clear_backstroke();
1290
+ } else {
1291
+ next_available_destroy = this.search_container.siblings("li.search-choice").last();
1292
+ if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
1293
+ this.pending_backstroke = next_available_destroy;
1294
+ if (this.single_backstroke_delete) {
1295
+ return this.keydown_backstroke();
1296
+ } else {
1297
+ return this.pending_backstroke.addClass("search-choice-focus");
1298
+ }
1299
+ }
1300
+ }
1301
+ };
1302
+
1303
+ Chosen.prototype.clear_backstroke = function() {
1304
+ if (this.pending_backstroke) {
1305
+ this.pending_backstroke.removeClass("search-choice-focus");
1306
+ }
1307
+ return this.pending_backstroke = null;
1308
+ };
1309
+
1310
+ Chosen.prototype.search_field_scale = function() {
1311
+ var div, i, len, style, style_block, styles, width;
1312
+ if (!this.is_multiple) {
1313
+ return;
1314
+ }
1315
+ style_block = {
1316
+ position: 'absolute',
1317
+ left: '-1000px',
1318
+ top: '-1000px',
1319
+ display: 'none',
1320
+ whiteSpace: 'pre'
1321
+ };
1322
+ styles = ['fontSize', 'fontStyle', 'fontWeight', 'fontFamily', 'lineHeight', 'textTransform', 'letterSpacing'];
1323
+ for (i = 0, len = styles.length; i < len; i++) {
1324
+ style = styles[i];
1325
+ style_block[style] = this.search_field.css(style);
1326
+ }
1327
+ div = $('<div />').css(style_block);
1328
+ div.text(this.get_search_field_value());
1329
+ $('body').append(div);
1330
+ width = div.width() + 25;
1331
+ div.remove();
1332
+ if (this.container.is(':visible')) {
1333
+ width = Math.min(this.container.outerWidth() - 10, width);
1334
+ }
1335
+ return this.search_field.width(width);
1336
+ };
1337
+
1338
+ Chosen.prototype.trigger_form_field_change = function(extra) {
1339
+ this.form_field_jq.trigger("input", extra);
1340
+ return this.form_field_jq.trigger("change", extra);
1341
+ };
1342
+
1343
+ return Chosen;
1344
+
1345
+ })(AbstractChosen);
1346
+
1347
+ }).call(this);
1348
+ ;/**
1349
+ *
1350
+ * jQuery Interdependencies library
1351
+ * http://miohtama.github.com/jquery-interdependencies/
1352
+ * Copyright 2012-2013 Mikko Ohtamaa, others
1353
+ *
1354
+ * Modifyed by SP.
1355
+ *
1356
+ */
1357
+ (function($) {
1358
+
1359
+ 'use strict';
1360
+
1361
+ function Rule(controller, condition, value) {
1362
+ this.init(controller, condition, value);
1363
+ }
1364
+
1365
+ $.extend(Rule.prototype, {
1366
+
1367
+ init: function(controller, condition, value) {
1368
+
1369
+ this.controller = controller;
1370
+ this.condition = condition;
1371
+ this.value = value;
1372
+ this.rules = [];
1373
+ this.controls = [];
1374
+
1375
+ },
1376
+
1377
+ evalCondition: function(context, control, condition, val1, val2) {
1378
+
1379
+ if( condition == '==' ) {
1380
+
1381
+ return this.checkBoolean(val1) == this.checkBoolean(val2);
1382
+
1383
+ } else if( condition == '!=' ) {
1384
+
1385
+ return this.checkBoolean(val1) != this.checkBoolean(val2);
1386
+
1387
+ } else if( condition == '>=' ) {
1388
+
1389
+ return Number(val2) >= Number(val1);
1390
+
1391
+ } else if( condition == '<=' ) {
1392
+
1393
+ return Number(val2) <= Number(val1);
1394
+
1395
+ } else if( condition == '>' ) {
1396
+
1397
+ return Number(val2) > Number(val1);
1398
+
1399
+ } else if( condition == '<' ) {
1400
+
1401
+ return Number(val2) < Number(val1);
1402
+
1403
+ } else if( condition == '()' ) {
1404
+
1405
+ return window[val1](context, control, val2);
1406
+
1407
+ } else if( condition == 'any' ) {
1408
+
1409
+ if( $.isArray( val2 ) ) {
1410
+ for (var i = val2.length - 1; i >= 0; i--) {
1411
+ if( $.inArray( val2[i], val1.split(',') ) !== -1 ) {
1412
+ return true;
1413
+ }
1414
+ }
1415
+ } else {
1416
+ if( $.inArray( val2, val1.split(',') ) !== -1 ) {
1417
+ return true;
1418
+ }
1419
+ }
1420
+
1421
+ } else if( condition == 'not-any' ) {
1422
+
1423
+ if( $.isArray( val2 ) ) {
1424
+ for (var i = val2.length - 1; i >= 0; i--) {
1425
+ if( $.inArray( val2[i], val1.split(',') ) == -1 ) {
1426
+ return true;
1427
+ }
1428
+ }
1429
+ } else {
1430
+ if( $.inArray( val2, val1.split(',') ) == -1 ) {
1431
+ return true;
1432
+ }
1433
+ }
1434
+
1435
+ }
1436
+
1437
+ return false;
1438
+
1439
+ },
1440
+
1441
+ checkBoolean: function(value) {
1442
+
1443
+ switch( value ) {
1444
+
1445
+ case true:
1446
+ case 'true':
1447
+ case 1:
1448
+ case '1':
1449
+ value = true;
1450
+ break;
1451
+
1452
+ case null:
1453
+ case false:
1454
+ case 'false':
1455
+ case 0:
1456
+ case '0':
1457
+ value = false;
1458
+ break;
1459
+
1460
+ }
1461
+
1462
+ return value;
1463
+ },
1464
+
1465
+ checkCondition: function( context ) {
1466
+
1467
+ if( !this.condition ) {
1468
+ return true;
1469
+ }
1470
+
1471
+ var control = context.find(this.controller);
1472
+
1473
+ var control_value = this.getControlValue(context, control);
1474
+
1475
+ if( control_value === undefined ) {
1476
+ return false;
1477
+ }
1478
+
1479
+ control_value = this.normalizeValue(control, this.value, control_value);
1480
+
1481
+ return this.evalCondition(context, control, this.condition, this.value, control_value);
1482
+ },
1483
+
1484
+ normalizeValue: function( control, baseValue, control_value ) {
1485
+
1486
+ if( typeof baseValue == 'number' ) {
1487
+ return parseFloat( control_value );
1488
+ }
1489
+
1490
+ return control_value;
1491
+ },
1492
+
1493
+ getControlValue: function(context, control) {
1494
+
1495
+ if( control.length > 1 && ( control.attr('type') == 'radio' || control.attr('type') == 'checkbox' ) ) {
1496
+
1497
+ return control.filter(':checked').map(function() { return this.value; }).get();
1498
+
1499
+ } else if ( control.attr('type') == 'checkbox' || control.attr('type') == 'radio' ) {
1500
+
1501
+ return control.is(':checked');
1502
+
1503
+ }
1504
+
1505
+ return control.val();
1506
+
1507
+ },
1508
+
1509
+ createRule: function(controller, condition, value) {
1510
+ var rule = new Rule(controller, condition, value);
1511
+ this.rules.push(rule);
1512
+ return rule;
1513
+ },
1514
+
1515
+ include: function(input) {
1516
+ this.controls.push(input);
1517
+ },
1518
+
1519
+ applyRule: function(context, enforced) {
1520
+
1521
+ var result;
1522
+
1523
+ if( typeof( enforced ) == 'undefined' ) {
1524
+ result = this.checkCondition(context);
1525
+ } else {
1526
+ result = enforced;
1527
+ }
1528
+
1529
+ var controls = $.map(this.controls, function(elem, idx) {
1530
+ return context.find(elem);
1531
+ });
1532
+
1533
+ if( result ) {
1534
+
1535
+ $(controls).each(function() {
1536
+ $(this).removeClass('hidden');
1537
+ });
1538
+
1539
+ $(this.rules).each(function() {
1540
+ this.applyRule(context);
1541
+ });
1542
+
1543
+ } else {
1544
+
1545
+ $(controls).each(function() {
1546
+ $(this).addClass('hidden');
1547
+ });
1548
+
1549
+ $(this.rules).each(function() {
1550
+ this.applyRule(context, false);
1551
+ });
1552
+
1553
+ }
1554
+ }
1555
+ });
1556
+
1557
+ function Ruleset() {
1558
+ this.rules = [];
1559
+ };
1560
+
1561
+ $.extend(Ruleset.prototype, {
1562
+
1563
+ createRule: function(controller, condition, value) {
1564
+ var rule = new Rule(controller, condition, value);
1565
+ this.rules.push(rule);
1566
+ return rule;
1567
+ },
1568
+
1569
+ applyRules: function(context) {
1570
+ $(this.rules).each(function() {
1571
+ this.applyRule(context);
1572
+ });
1573
+ }
1574
+ });
1575
+
1576
+ $.spf_deps = {
1577
+
1578
+ createRuleset: function() {
1579
+ return new Ruleset();
1580
+ },
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
+
1588
+ if( depends.indexOf( depend_id ) !== -1 ) {
1589
+ ruleset.applyRules(selection);
1590
+ }
1591
+
1592
+ });
1593
+
1594
+ ruleset.applyRules(selection);
1595
+
1596
+ return true;
1597
+ }
1598
+ };
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
+
1610
+ // AMD
1611
+ if (typeof define === "function" && define.amd) {
1612
+ define(["exports", "jquery"], function(exports, $) {
1613
+ return factory(exports, $);
1614
+ });
1615
+ }
1616
+
1617
+ // CommonJS
1618
+ else if (typeof exports !== "undefined") {
1619
+ var $ = require("jquery");
1620
+ factory(exports, $);
1621
+ }
1622
+
1623
+ // Browser
1624
+ else {
1625
+ factory(root, (root.jQuery || root.Zepto || root.ender || root.$));
1626
+ }
1627
+
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: /^$/,
1638
+ fixed: /^\d+$/
1639
+ };
1640
+
1641
+ function FormSerializer(helper, $form) {
1642
+
1643
+ // private variables
1644
+ var data = {},
1645
+ pushes = {};
1646
+
1647
+ // private API
1648
+ function build(base, key, value) {
1649
+ base[key] = value;
1650
+ return base;
1651
+ }
1652
+
1653
+ function makeObject(root, value) {
1654
+
1655
+ var keys = root.match(patterns.key), k;
1656
+
1657
+ // nest, nest, ..., nest
1658
+ while ((k = keys.pop()) !== undefined) {
1659
+ // foo[]
1660
+ if (patterns.push.test(k)) {
1661
+ var idx = incrementPush(root.replace(/\[\]$/, ''));
1662
+ value = build([], idx, value);
1663
+ }
1664
+
1665
+ // foo[n]
1666
+ else if (patterns.fixed.test(k)) {
1667
+ value = build([], k, value);
1668
+ }
1669
+
1670
+ // foo; foo[bar]
1671
+ else if (patterns.named.test(k)) {
1672
+ value = build({}, k, value);
1673
+ }
1674
+ }
1675
+
1676
+ return value;
1677
+ }
1678
+
1679
+ function incrementPush(key) {
1680
+ if (pushes[key] === undefined) {
1681
+ pushes[key] = 0;
1682
+ }
1683
+ return pushes[key]++;
1684
+ }
1685
+
1686
+ function addPair(pair) {
1687
+ if (!patterns.validate.test(pair.name)) return this;
1688
+ var obj = makeObject(pair.name, pair.value);
1689
+ data = helper.extend(true, data, obj);
1690
+ return this;
1691
+ }
1692
+
1693
+ function addPairs(pairs) {
1694
+ if (!helper.isArray(pairs)) {
1695
+ throw new Error("formSerializer.addPairs expects an Array");
1696
+ }
1697
+ for (var i=0, len=pairs.length; i<len; i++) {
1698
+ this.addPair(pairs[i]);
1699
+ }
1700
+ return this;
1701
+ }
1702
+
1703
+ function serialize() {
1704
+ return data;
1705
+ }
1706
+
1707
+ function serializeJSON() {
1708
+ return JSON.stringify(serialize());
1709
+ }
1710
+
1711
+ // public API
1712
+ this.addPair = addPair;
1713
+ this.addPairs = addPairs;
1714
+ this.serialize = serialize;
1715
+ this.serializeJSON = serializeJSON;
1716
+ }
1717
+
1718
+ FormSerializer.patterns = patterns;
1719
+
1720
+ FormSerializer.serializeObject = function serializeObject() {
1721
+ return new FormSerializer($, this).
1722
+ addPairs(this.serializeArray()).
1723
+ serialize();
1724
+ };
1725
+
1726
+ FormSerializer.serializeJSON = function serializeJSON() {
1727
+ return new FormSerializer($, this).
1728
+ addPairs(this.serializeArray()).
1729
+ serializeJSON();
1730
+ };
1731
+
1732
+ //
1733
+ // SP: Renamed function names for avoid conflicts
1734
+ //
1735
+
1736
+ if (typeof $.fn !== "undefined") {
1737
+ $.fn.serializeObjectSP_WPCF = FormSerializer.serializeObject;
1738
+ $.fn.serializeJSONSP_WPCF = FormSerializer.serializeJSON;
1739
+ }
1740
+
1741
+ exports.FormSerializer = FormSerializer;
1742
+
1743
+ return FormSerializer;
1744
+ }));
admin/views/wpcfree-metabox/assets/js/spf-plugins.min.js ADDED
@@ -0,0 +1 @@
 
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 ADDED
@@ -0,0 +1,2504 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
2187
+ var $this = $(this),
2188
+ $tooltip,
2189
+ offset_left;
2190
+
2191
+ $this.on({
2192
+ mouseenter: function() {
2193
+
2194
+ $tooltip = $( '<div class="spf-tooltip"></div>' ).html( $this.find('.spf-help-text').html() ).appendTo('body');
2195
+ offset_left = ( SP_WPCF.vars.is_rtl ) ? ( $this.offset().left + 24 ) : ( $this.offset().left - $tooltip.outerWidth() );
2196
+
2197
+ $tooltip.css({
2198
+ top: $this.offset().top - ( ( $tooltip.outerHeight() / 2 ) - 14 ),
2199
+ left: offset_left,
2200
+ });
2201
+
2202
+ },
2203
+ mouseleave: function() {
2204
+
2205
+ if( $tooltip !== undefined ) {
2206
+ $tooltip.remove();
2207
+ }
2208
+
2209
+ }
2210
+
2211
+ });
2212
+
2213
+ });
2214
+ };
2215
+
2216
+ //
2217
+ // Customize Refresh
2218
+ //
2219
+ $.fn.spf_customizer_refresh = function() {
2220
+ return this.each( function() {
2221
+
2222
+ var $this = $(this),
2223
+ $complex = $this.closest('.spf-customize-complex');
2224
+
2225
+ if( $complex.length ) {
2226
+
2227
+ var $input = $complex.find(':input'),
2228
+ $unique = $complex.data('unique-id'),
2229
+ $option = $complex.data('option-id'),
2230
+ obj = $input.serializeObjectSP_WPCF(),
2231
+ data = ( !$.isEmptyObject(obj) ) ? obj[$unique][$option] : '',
2232
+ control = wp.customize.control($unique +'['+ $option +']');
2233
+
2234
+ // clear the value to force refresh.
2235
+ control.setting._value = null;
2236
+
2237
+ control.setting.set( data );
2238
+
2239
+ } else {
2240
+
2241
+ $this.find(':input').first().trigger('change');
2242
+
2243
+ }
2244
+
2245
+ $(document).trigger('spf-customizer-refresh', $this);
2246
+
2247
+ });
2248
+ };
2249
+
2250
+ //
2251
+ // Customize Listen Form Elements
2252
+ //
2253
+ $.fn.spf_customizer_listen = function( options ) {
2254
+
2255
+ var settings = $.extend({
2256
+ closest: false,
2257
+ }, options );
2258
+
2259
+ return this.each( function() {
2260
+
2261
+ if( window.wp.customize === undefined ) { return; }
2262
+
2263
+ var $this = ( settings.closest ) ? $(this).closest('.spf-customize-complex') : $(this),
2264
+ $input = $this.find(':input'),
2265
+ unique_id = $this.data('unique-id'),
2266
+ option_id = $this.data('option-id');
2267
+
2268
+ if( unique_id === undefined ) { return; }
2269
+
2270
+ $input.on('change keyup', SP_WPCF.helper.debounce( function() {
2271
+
2272
+ var obj = $this.find(':input').serializeObjectSP_WPCF();
2273
+
2274
+ if( !$.isEmptyObject(obj) && obj[unique_id] ) {
2275
+
2276
+ window.wp.customize.control( unique_id +'['+ option_id +']' ).setting.set( obj[unique_id][option_id] );
2277
+
2278
+ }
2279
+
2280
+ }, 250 ) );
2281
+
2282
+ });
2283
+ };
2284
+
2285
+ //
2286
+ // Customizer Listener for Reload JS
2287
+ //
2288
+ $(document).on('expanded', '.control-section-spf', function() {
2289
+
2290
+ var $this = $(this);
2291
+
2292
+ if( $this.hasClass('open') && !$this.data('inited') ) {
2293
+ $this.spf_dependency();
2294
+ $this.find('.spf-customize-field').spf_reload_script({dependency: false});
2295
+ $this.find('.spf-customize-complex').spf_customizer_listen();
2296
+ $this.data('inited', true);
2297
+ }
2298
+
2299
+ });
2300
+
2301
+ //
2302
+ // Window on resize
2303
+ //
2304
+ SP_WPCF.vars.$window.on('resize spf.resize', SP_WPCF.helper.debounce( function( event ) {
2305
+
2306
+ var window_width = navigator.userAgent.indexOf('AppleWebKit/') > -1 ? SP_WPCF.vars.$window.width() : window.innerWidth;
2307
+
2308
+ if( window_width <= 782 && !SP_WPCF.vars.onloaded ) {
2309
+ $('.spf-section').spf_reload_script();
2310
+ SP_WPCF.vars.onloaded = true;
2311
+ }
2312
+
2313
+ }, 200)).trigger('spf.resize');
2314
+
2315
+ //
2316
+ // Widgets Framework
2317
+ //
2318
+ $.fn.spf_widgets = function() {
2319
+ if( this.length ) {
2320
+
2321
+ $(document).on('widget-added widget-updated', function( event, $widget ) {
2322
+ $widget.find('.spf-fields').spf_reload_script();
2323
+ });
2324
+
2325
+ $('.widgets-sortables, .control-section-sidebar').on('sortstop', function( event, ui ) {
2326
+ ui.item.find('.spf-fields').spf_reload_script_retry();
2327
+ });
2328
+
2329
+ $(document).on('click', '.widget-top', function( event ) {
2330
+ $(this).parent().find('.spf-fields').spf_reload_script();
2331
+ });
2332
+
2333
+ }
2334
+ };
2335
+
2336
+ //
2337
+ // Retry Plugins
2338
+ //
2339
+ $.fn.spf_reload_script_retry = function() {
2340
+ return this.each( function() {
2341
+
2342
+ var $this = $(this);
2343
+
2344
+ if( $this.data('inited') ) {
2345
+ $this.children('.spf-field-wp_editor').spf_field_wp_editor();
2346
+ }
2347
+
2348
+ });
2349
+ };
2350
+
2351
+ //
2352
+ // Reload Plugins
2353
+ //
2354
+ $.fn.spf_reload_script = function( options ) {
2355
+
2356
+ var settings = $.extend({
2357
+ dependency: true,
2358
+ }, options );
2359
+
2360
+ return this.each( function() {
2361
+
2362
+ var $this = $(this);
2363
+
2364
+ // Avoid for conflicts
2365
+ if( !$this.data('inited') ) {
2366
+
2367
+ // Field plugins
2368
+ $this.children('.spf-field-accordion').spf_field_accordion();
2369
+ // $this.children('.spf-field-backup').spf_field_backup();
2370
+ // $this.children('.spf-field-background_adv').spf_field_background();
2371
+ // $this.children('.spf-field-background').spf_field_background();
2372
+ $this.children('.spf-field-code_editor').spf_field_code_editor();
2373
+ // $this.children('.spf-field-date').spf_field_date();
2374
+ $this.children('.spf-field-fieldset').spf_field_fieldset();
2375
+ $this.children('.spf-field-gallery').spf_field_gallery();
2376
+ $this.children('.spf-field-group').spf_field_group();
2377
+ // $this.children('.spf-field-icon').spf_field_icon();
2378
+ $this.children('.spf-field-media').spf_field_media();
2379
+ // $this.children('.spf-field-repeater').spf_field_repeater();
2380
+ // $this.children('.spf-field-slider').spf_field_slider();
2381
+ // $this.children('.spf-field-sortable').spf_field_sortable();
2382
+ // $this.children('.spf-field-sorter').spf_field_sorter();
2383
+ $this.children('.spf-field-spinner').spf_field_spinner();
2384
+ $this.children('.spf-field-switcher').spf_field_switcher();
2385
+ // $this.children('.spf-field-tabbed').spf_field_tabbed();
2386
+ $this.children('.spf-field-typography').spf_field_typography();
2387
+ $this.children('.spf-field-upload').spf_field_upload();
2388
+ $this.children('.spf-field-wp_editor').spf_field_wp_editor();
2389
+
2390
+ // Field colors
2391
+ $this.children('.spf-field-border').find('.spf-color').spf_color();
2392
+ $this.children('.spf-field-dimensions_advanced').find('.spf-color').spf_color();
2393
+ $this.children('.spf-field-background_adv').find('.spf-color').spf_color();
2394
+ $this.children('.spf-field-background').find('.spf-color').spf_color();
2395
+ $this.children('.spf-field-color').find('.spf-color').spf_color();
2396
+ $this.children('.spf-field-color_group').find('.spf-color').spf_color();
2397
+ $this.children('.spf-field-link_color').find('.spf-color').spf_color();
2398
+ $this.children('.spf-field-typography').find('.spf-color').spf_color();
2399
+
2400
+ // Field allows only number
2401
+ $this.children('.spf-field-dimensions').find('.spf-number').spf_number();
2402
+ $this.children('.spf-field-slider').find('.spf-number').spf_number();
2403
+ $this.children('.spf-field-spacing').find('.spf-number').spf_number();
2404
+ $this.children('.spf-field-column').find('.spf-number').spf_number();
2405
+ $this.children('.spf-field-dimensions_advanced').find('.spf-number').spf_number();
2406
+ $this.children('.spf-field-spinner').find('.spf-number').spf_number();
2407
+ $this.children('.spf-field-typography').find('.spf-number').spf_number();
2408
+
2409
+ // Field chosenjs
2410
+ $this.children('.spf-field-select').find('.spf-chosen').spf_chosen();
2411
+
2412
+ // Field Checkbox
2413
+ $this.children('.spf-field-checkbox').find('.spf-checkbox').spf_checkbox();
2414
+
2415
+ // Field Siblings
2416
+ $this.children('.spf-field-button_set').find('.spf-siblings').spf_siblings();
2417
+ $this.children('.spf-field-image_select').find('.spf-siblings').spf_siblings();
2418
+ $this.children('.spf-field-carousel_type').find('.spf-siblings').spf_siblings();
2419
+ $this.children('.spf-field-palette').find('.spf-siblings').spf_siblings();
2420
+
2421
+ // Help Tooptip
2422
+ $this.children('.spf-field').find('.spf-help').spf_help();
2423
+
2424
+ if( settings.dependency ) {
2425
+ $this.spf_dependency();
2426
+ }
2427
+
2428
+ $this.data('inited', true);
2429
+
2430
+ $(document).trigger('spf-reload-script', $this);
2431
+
2432
+ }
2433
+
2434
+ });
2435
+ };
2436
+
2437
+ //
2438
+ // Document ready and run scripts.
2439
+ //
2440
+ $(document).ready( function() {
2441
+
2442
+ $('.spf-save').spf_save();
2443
+ $('.spf-confirm').spf_confirm();
2444
+ $('.spf-nav-options').spf_nav_options();
2445
+ $('.spf-nav-metabox').spf_nav_metabox();
2446
+ $('.spf-expand-all').spf_expand_all();
2447
+ $('.spf-search').spf_search();
2448
+ $('.spf-sticky-header').spf_sticky();
2449
+ $('.spf-taxonomy').spf_taxonomy();
2450
+ $('.spf-shortcode').spf_shortcode();
2451
+ $('.spf-page-templates').spf_page_templates();
2452
+ $('.spf-post-formats').spf_post_formats();
2453
+ $('.spf-onload').spf_reload_script();
2454
+ $('.widget').spf_widgets();
2455
+
2456
+ });
2457
+
2458
+
2459
+ // ======================================================
2460
+ // Post
2461
+ // ------------------------------------------------------
2462
+ // Trigger taxonomy list when post type is selected.
2463
+ $('.sp_wpcp_post_type select').change(function (event) {
2464
+ event.preventDefault();
2465
+ var data = {
2466
+ action: 'wpcp_get_taxonomies',
2467
+ wpcf_post_type: $(this).val(),
2468
+ }
2469
+ $.post(ajaxurl, data, function (resp) {
2470
+ $('.sp_wpcp_post_taxonomy select').html(resp);
2471
+ $(".sp_wpcp_post_taxonomy select").trigger("chosen:updated");
2472
+ });
2473
+ });
2474
+
2475
+ // Update terms list on the change of post taxonomy.
2476
+ $('.sp_wpcp_post_taxonomy select').change(function (event) {
2477
+ event.preventDefault();
2478
+ var data = {
2479
+ action: 'wpcp_get_terms', // Callback function.
2480
+ wpcf_post_taxonomy: $(this).val(),
2481
+ }
2482
+ $.post(ajaxurl, data, function (resp) {
2483
+ $('.sp_wpcp_taxonomy_terms select').html(resp);
2484
+ $(".sp_wpcp_taxonomy_terms select").trigger("chosen:updated");
2485
+
2486
+ });
2487
+ });
2488
+
2489
+
2490
+ // Populate specific post list in the drop-down.
2491
+ $('.sp_wpcp_post_type select').change(function (event) {
2492
+ event.preventDefault();
2493
+ var data = {
2494
+ action: 'wpcp_get_posts', // Callback function.
2495
+ wpcf_post_type: $(this).val(), // Callback function's value.
2496
+ }
2497
+ $.post(ajaxurl, data, function (resp) {
2498
+ $('.sp_wpcp_specific_posts select').html(resp);
2499
+ $(".sp_wpcp_specific_posts select").trigger("chosen:updated");
2500
+ });
2501
+ });
2502
+
2503
+
2504
+ })( jQuery, window, document );
admin/views/wpcfree-metabox/assets/js/spf.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),is_rtl:$("body").hasClass("rtl"),code_themes:[]},SP_WPCF.helper={uid:function(prefix){return(prefix||"")+Math.random().toString(36).substr(2,9)},preg_quote:function(str){return(str+"").replace(/(\[|\-|\])/g,"\\$1")},name_nested_replace:function($selector,field_id){var checks=[],regex=new RegExp("("+SP_WPCF.helper.preg_quote(field_id)+")\\[(\\d+)\\]","g");$selector.find(":radio").each(function(){(this.checked||this.orginal_checked)&&(this.orginal_checked=!0)}),$selector.each(function(index){$(this).find(":input").each(function(){this.name=this.name.replace(regex,field_id+"["+index+"]"),this.orginal_checked&&(this.checked=!0)})})},debounce:function(callback,threshold,immediate){var timeout;return function(){var context=this,args=arguments,later=function(){timeout=null,immediate||callback.apply(context,args)},callNow=immediate&&!timeout;clearTimeout(timeout),timeout=setTimeout(later,threshold),callNow&&callback.apply(context,args)}},get_cookie:function(name){var e,b,cookie=document.cookie,p=name+"=";if(cookie){if(-1===(b=cookie.indexOf("; "+p))){if(0!==(b=cookie.indexOf(p)))return null}else b+=2;return-1===(e=cookie.indexOf(";",b))&&(e=cookie.length),decodeURIComponent(cookie.substring(b+p.length,e))}},set_cookie:function(name,value,expires,path,domain,secure){var d=new Date;"object"==typeof expires&&expires.toGMTString?expires=expires.toGMTString():parseInt(expires,10)?(d.setTime(d.getTime()+1e3*parseInt(expires,10)),expires=d.toGMTString()):expires="",document.cookie=name+"="+encodeURIComponent(value)+(expires?"; expires="+expires:"")+(path?"; path="+path:"")+(domain?"; domain="+domain:"")+(secure?"; secure":"")},remove_cookie:function(name,path,domain,secure){SP_WPCF.helper.set_cookie(name,"",-1e3,path,domain,secure)}},$.fn.spf_clone=function(){for(var base=$.fn.clone.apply(this,arguments),clone=this.find("select").add(this.filter("select")),cloned=base.find("select").add(base.filter("select")),i=0;i<clone.length;++i)for(var j=0;j<clone[i].options.length;++j)!0===clone[i].options[j].selected&&(cloned[i].options[j].selected=!0);return this.find(":radio").each(function(){this.orginal_checked=this.checked}),base},$.fn.spf_expand_all=function(){return this.each(function(){$(this).on("click",function(e){e.preventDefault(),$(".spf-wrapper").toggleClass("spf-show-all"),$(".spf-section").spf_reload_script(),$(this).find(".fa").toggleClass("fa-indent").toggleClass("fa-outdent")})})},$.fn.spf_nav_options=function(){return this.each(function(){var $nav=$(this),$links=$nav.find("a"),$hidden=$nav.closest(".spf").find(".spf-section-id"),$last_section;$(window).on("hashchange",function(){var hash=window.location.hash.match(new RegExp("tab=([^&]*)")),slug=hash?hash[1]:$links.first().attr("href").replace("#tab=",""),$link=$("#spf-tab-link-"+slug);if($link.length>0){$link.closest(".spf-tab-depth-0").addClass("spf-tab-active").siblings().removeClass("spf-tab-active"),$links.removeClass("spf-section-active"),$link.addClass("spf-section-active"),void 0!==$last_section&&$last_section.hide();var $section=$("#spf-section-"+slug);$section.css({display:"block"}),$section.spf_reload_script(),$hidden.val(slug),$last_section=$section}}).trigger("hashchange")})},$.fn.spf_nav_metabox=function(){return this.each(function(){var $nav=$(this),$links=$nav.find("a"),unique_id=$nav.data("unique"),post_id=$("#post_ID").val()||"global",$last_section,$last_link;$links.on("click",function(e){e.preventDefault();var $link=$(this),section_id=$link.data("section");void 0!==$last_link&&$last_link.removeClass("spf-section-active"),void 0!==$last_section&&$last_section.hide(),$link.addClass("spf-section-active");var $section=$("#spf-section-"+section_id);$section.css({display:"block"}),$section.spf_reload_script(),SP_WPCF.helper.set_cookie("spf-last-metabox-tab-"+post_id+"-"+unique_id,section_id),$last_section=$section,$last_link=$link});var get_cookie=SP_WPCF.helper.get_cookie("spf-last-metabox-tab-"+post_id+"-"+unique_id);get_cookie?$nav.find('a[data-section="'+get_cookie+'"]').trigger("click"):$links.first("a").trigger("click")})},$.fn.spf_page_templates=function(){this.length&&$(document).on("change",".editor-page-attributes__template select, #page_template",function(){var maybe_value=$(this).val()||"default";$(".spf-page-templates").removeClass("spf-show").addClass("spf-hide"),$(".spf-page-"+maybe_value.toLowerCase().replace(/[^a-zA-Z0-9]+/g,"-")).removeClass("spf-hide").addClass("spf-show")})},$.fn.spf_post_formats=function(){this.length&&$(document).on("change",'.editor-post-format select, #formatdiv input[name="post_format"]',function(){var maybe_value=$(this).val()||"default";maybe_value="0"===maybe_value?"default":maybe_value,$(".spf-post-formats").removeClass("spf-show").addClass("spf-hide"),$(".spf-post-format-"+maybe_value).removeClass("spf-hide").addClass("spf-show")})},$.fn.spf_search=function(){return this.each(function(){var $this,$input;$(this).find("input").on("change keyup",function(){var value=$(this).val(),$wrapper=$(".spf-wrapper"),$section,$fields=$wrapper.find(".spf-section").find("> .spf-field:not(.hidden)"),$titles=$fields.find("> .spf-title, .spf-search-tags");value.length>3?($fields.addClass("spf-hidden"),$wrapper.addClass("spf-search-all"),$titles.each(function(){var $title=$(this);if($title.text().match(new RegExp(".*?"+value+".*?","i"))){var $field=$title.closest(".spf-field");$field.removeClass("spf-hidden"),$field.parent().spf_reload_script()}})):($fields.removeClass("spf-hidden"),$wrapper.removeClass("spf-search-all"))})})},$.fn.spf_sticky=function(){return this.each(function(){var $this=$(this),$window=$(window),$inner=$this.find(".spf-header-inner"),padding=parseInt($inner.css("padding-left"))+parseInt($inner.css("padding-right")),offset=32,scrollTop=0,lastTop=0,ticking=!1,stickyUpdate=function(){var offsetTop=$this.offset().top,stickyTop=Math.max(32,offsetTop-scrollTop),winWidth=Math.max(document.documentElement.clientWidth,window.innerWidth||0);stickyTop<=32&&winWidth>782?($inner.css({width:$this.outerWidth()-padding}),$this.css({height:$this.outerHeight()}).addClass("spf-sticky")):($inner.removeAttr("style"),$this.removeAttr("style").removeClass("spf-sticky"))},requestTick=function(){ticking||requestAnimationFrame(function(){stickyUpdate(),ticking=!1}),ticking=!0},onSticky=function(){scrollTop=$window.scrollTop(),requestTick()};$window.on("scroll resize",onSticky),onSticky()})},$.fn.spf_dependency=function(){return this.each(function(){var $this=$(this),ruleset=$.spf_deps.createRuleset(),depends=[],is_global=!1;$this.children("[data-controller]").each(function(){var $field=$(this),controllers=$field.data("controller").split("|"),conditions=$field.data("condition").split("|"),values=$field.data("value").toString().split("|"),rules=ruleset;$field.data("depend-global")&&(is_global=!0),$.each(controllers,function(index,depend_id){var value=values[index]||"",condition=conditions[index]||conditions[0];(rules=rules.createRule('[data-depend-id="'+depend_id+'"]',condition,value)).include($field),depends.push(depend_id)})}),depends.length&&(is_global?$.spf_deps.enable(SP_WPCF.vars.$body,ruleset,depends):$.spf_deps.enable($this,ruleset,depends))})},$.fn.spf_field_accordion=function(){return this.each(function(){var $titles;$(this).find(".spf-accordion-title").on("click",function(){var $title=$(this),$icon=$title.find(".spf-accordion-icon"),$content=$title.next();$icon.hasClass("fa-angle-right")?$icon.removeClass("fa-angle-right").addClass("fa-angle-down"):$icon.removeClass("fa-angle-down").addClass("fa-angle-right"),$content.data("opened")||($content.spf_reload_script(),$content.data("opened",!0)),$content.toggleClass("spf-accordion-open")})})},$.fn.spf_field_code_editor=function(){return this.each(function(){if("function"==typeof CodeMirror){var $this=$(this),$textarea=$this.find("textarea"),$inited=$this.find(".CodeMirror"),data_editor=$textarea.data("editor");$inited.length&&$inited.remove();var interval=setInterval(function(){if($this.is(":visible")){var code_editor=CodeMirror.fromTextArea($textarea[0],data_editor);if("default"!==data_editor.theme&&-1===SP_WPCF.vars.code_themes.indexOf(data_editor.theme)){var $cssLink=$("<link>");$("#spf-codemirror-css").after($cssLink),$cssLink.attr({rel:"stylesheet",id:"spf-codemirror-"+data_editor.theme+"-css",href:data_editor.cdnURL+"/theme/"+data_editor.theme+".min.css",type:"text/css",media:"all"}),SP_WPCF.vars.code_themes.push(data_editor.theme)}CodeMirror.modeURL=data_editor.cdnURL+"/mode/%N/%N.min.js",CodeMirror.autoLoadMode(code_editor,data_editor.mode),code_editor.on("change",function(editor,event){$textarea.val(code_editor.getValue()).trigger("change")}),clearInterval(interval)}})}})},$.fn.spf_field_date=function(){return this.each(function(){var $this=$(this),$inputs=$this.find("input"),settings=$this.find(".spf-date-settings").data("settings"),wrapper='<div class="spf-datepicker-wrapper"></div>',$datepicker,defaults={showAnim:"",beforeShow:function(input,inst){$(inst.dpDiv).addClass("spf-datepicker-wrapper")},onClose:function(input,inst){$(inst.dpDiv).removeClass("spf-datepicker-wrapper")}};settings=$.extend({},settings,defaults),2===$inputs.length&&(settings=$.extend({},settings,{onSelect:function(selectedDate){var $this=$(this),$from=$inputs.first(),option=$inputs.first().attr("id")===$(this).attr("id")?"minDate":"maxDate",date=$.datepicker.parseDate(settings.dateFormat,selectedDate);$inputs.not(this).datepicker("option",option,date)}})),$inputs.each(function(){var $input=$(this);$input.hasClass("hasDatepicker")&&$input.removeAttr("id").removeClass("hasDatepicker"),$input.datepicker(settings)})})},$.fn.spf_field_fieldset=function(){return this.each(function(){$(this).find(".spf-fieldset-content").spf_reload_script()})},$.fn.spf_field_gallery=function(){return this.each(function(){var $this=$(this),$edit=$this.find(".spf-edit-gallery"),$clear=$this.find(".spf-clear-gallery"),$list=$this.find("ul.sp-gallery-images"),$input=$this.find("input"),$img=$this.find("img"),wp_media_frame;$this.on("click",".spf-button, .spf-edit-gallery",function(e){var $el=$(this),ids=$input.val(),what=$el.hasClass("spf-edit-gallery")?"edit":"add",state="add"!==what||ids.length?"gallery-edit":"gallery";e.preventDefault(),void 0!==window.wp&&window.wp.media&&window.wp.media.gallery&&("gallery"===state?(wp_media_frame=window.wp.media({library:{type:"image"},frame:"post",state:"gallery",multiple:!0})).open():(wp_media_frame=window.wp.media.gallery.edit('[gallery ids="'+ids+'"]'),"add"===what&&wp_media_frame.setState("gallery-library")),wp_media_frame.on("update",function(selection){$list.empty();var selectedIds=selection.models.map(function(attachment){var item=attachment.toJSON(),thumb=void 0!==item.sizes.thumbnail?item.sizes.thumbnail.url:item.url;return $list.append('<li><img src="'+thumb+'"></li>'),item.id});$input.val(selectedIds.join(",")).trigger("change"),$clear.removeClass("hidden"),$edit.removeClass("hidden")}))}),$clear.on("click",function(e){e.preventDefault(),$list.empty(),$input.val("").trigger("change"),$clear.addClass("hidden"),$edit.addClass("hidden")})})},$.fn.spf_field_group=function(){return this.each(function(){var $this=$(this),$fieldset=$this.children(".spf-fieldset"),$group=$fieldset.length?$fieldset:$this,$wrapper=$group.children(".spf-cloneable-wrapper"),$hidden=$group.children(".spf-cloneable-hidden"),$max=$group.children(".spf-cloneable-max"),$min=$group.children(".spf-cloneable-min"),field_id=$wrapper.data("field-id"),unique_id=$wrapper.data("unique-id"),is_number=Boolean(Number($wrapper.data("title-number"))),max=parseInt($wrapper.data("max")),min=parseInt($wrapper.data("min"));$wrapper.hasClass("ui-accordion")&&$wrapper.find(".ui-accordion-header-icon").remove();var update_title_numbers=function($selector){$selector.find(".spf-cloneable-title-number").each(function(index){$(this).html($(this).closest(".spf-cloneable-item").index()+1+".")})};$wrapper.accordion({header:"> .spf-cloneable-item > .spf-cloneable-title",collapsible:!0,active:!1,animate:!1,heightStyle:"content",icons:{header:"spf-cloneable-header-icon fa fa-angle-right",activeHeader:"spf-cloneable-header-icon fa fa-angle-down"},activate:function(event,ui){var $panel=ui.newPanel,$header=ui.newHeader;if($panel.length&&!$panel.data("opened")){var $fields,$first=$panel.children().first().find(":input").first(),$title=$header.find(".spf-cloneable-value");$first.on("keyup",function(event){$title.text($first.val())}),$panel.spf_reload_script(),$panel.data("opened",!0),$panel.data("retry",!1)}else $panel.data("retry")&&($panel.spf_reload_script_retry(),$panel.data("retry",!1))}}),$wrapper.sortable({axis:"y",handle:".spf-cloneable-title,.spf-cloneable-sort",helper:"original",cursor:"move",placeholder:"widget-placeholder",start:function(event,ui){$wrapper.accordion({active:!1}),$wrapper.sortable("refreshPositions"),ui.item.children(".spf-cloneable-content").data("retry",!0)},update:function(event,ui){SP_WPCF.helper.name_nested_replace($wrapper.children(".spf-cloneable-item"),field_id),$wrapper.spf_customizer_refresh(),is_number&&update_title_numbers($wrapper)}}),$group.children(".spf-cloneable-add").on("click",function(e){e.preventDefault();var count=$wrapper.children(".spf-cloneable-item").length;if($min.hide(),max&&count+1>max)$max.show();else{var new_field_id=unique_id+field_id+"["+count+"]",$cloned_item=$hidden.spf_clone(!0);$cloned_item.removeClass("spf-cloneable-hidden"),$cloned_item.find(":input").each(function(){this.name=new_field_id+this.name.replace(this.name.startsWith("_nonce")?"_nonce":unique_id,"")}),$cloned_item.find(".spf-data-wrapper").each(function(){$(this).attr("data-unique-id",new_field_id)}),$wrapper.append($cloned_item),$wrapper.accordion("refresh"),$wrapper.accordion({active:count}),$wrapper.spf_customizer_refresh(),$wrapper.spf_customizer_listen({closest:!0}),is_number&&update_title_numbers($wrapper)}});var event_clone=function(e){e.preventDefault();var count=$wrapper.children(".spf-cloneable-item").length;if($min.hide(),max&&count+1>max)$max.show();else{var $this,$parent=$(this).parent().parent(),$cloned_helper=$parent.children(".spf-cloneable-helper").spf_clone(!0),$cloned_title=$parent.children(".spf-cloneable-title").spf_clone(),$cloned_content=$parent.children(".spf-cloneable-content").spf_clone(),cloned_regex=new RegExp("("+SP_WPCF.helper.preg_quote(field_id)+")\\[(\\d+)\\]","g");$cloned_content.find(".spf-data-wrapper").each(function(){var $this=$(this);$this.attr("data-unique-id",$this.attr("data-unique-id").replace(cloned_regex,field_id+"["+($parent.index()+1)+"]"))});var $cloned=$('<div class="spf-cloneable-item" />');$cloned.append($cloned_helper),$cloned.append($cloned_title),$cloned.append($cloned_content),$wrapper.children().eq($parent.index()).after($cloned),SP_WPCF.helper.name_nested_replace($wrapper.children(".spf-cloneable-item"),field_id),$wrapper.accordion("refresh"),$wrapper.spf_customizer_refresh(),$wrapper.spf_customizer_listen({closest:!0}),is_number&&update_title_numbers($wrapper)}};$wrapper.children(".spf-cloneable-item").children(".spf-cloneable-helper").on("click",".spf-cloneable-clone",event_clone),$group.children(".spf-cloneable-hidden").children(".spf-cloneable-helper").on("click",".spf-cloneable-clone",event_clone);var event_remove=function(e){e.preventDefault();var count=$wrapper.children(".spf-cloneable-item").length;$max.hide(),$min.hide(),min&&count-1<min?$min.show():($(this).closest(".spf-cloneable-item").remove(),SP_WPCF.helper.name_nested_replace($wrapper.children(".spf-cloneable-item"),field_id),$wrapper.spf_customizer_refresh(),is_number&&update_title_numbers($wrapper))};$wrapper.children(".spf-cloneable-item").children(".spf-cloneable-helper").on("click",".spf-cloneable-remove",event_remove),$group.children(".spf-cloneable-hidden").children(".spf-cloneable-helper").on("click",".spf-cloneable-remove",event_remove)})},$.fn.spf_field_media=function(){return this.each(function(){var $this=$(this),$upload_button=$this.find(".spf--button"),$remove_button=$this.find(".spf--remove"),$library=$upload_button.data("library")&&$upload_button.data("library").split(",")||"",wp_media_frame;$upload_button.on("click",function(e){e.preventDefault(),void 0!==window.wp&&window.wp.media&&window.wp.media.gallery&&(wp_media_frame?wp_media_frame.open():((wp_media_frame=window.wp.media({library:{type:$library}})).on("select",function(){var thumbnail,attributes=wp_media_frame.state().get("selection").first().attributes,preview_size=$upload_button.data("preview-size")||"thumbnail";$this.find(".spf--url").val(attributes.url),$this.find(".spf--id").val(attributes.id),$this.find(".spf--width").val(attributes.width),$this.find(".spf--height").val(attributes.height),$this.find(".spf--alt").val(attributes.alt),$this.find(".spf--title").val(attributes.title),$this.find(".spf--description").val(attributes.description),thumbnail=void 0!==attributes.sizes&&void 0!==attributes.sizes.thumbnail&&"thumbnail"===preview_size?attributes.sizes.thumbnail.url:void 0!==attributes.sizes&&void 0!==attributes.sizes.full?attributes.sizes.full.url:attributes.icon,$remove_button.removeClass("hidden"),$this.find(".spf--preview").removeClass("hidden"),$this.find(".spf--src").attr("src",thumbnail),$this.find(".spf--thumbnail").val(thumbnail).trigger("change")}),wp_media_frame.open()))}),$remove_button.on("click",function(e){e.preventDefault(),$remove_button.addClass("hidden"),$this.find(".spf--preview").addClass("hidden"),$this.find("input").val(""),$this.find(".spf--thumbnail").trigger("change")})})},$.fn.spf_field_spinner=function(){return this.each(function(){var $this=$(this),$input=$this.find("input"),$inited=$this.find(".ui-spinner-button");$inited.length&&$inited.remove(),$input.spinner({max:$input.data("max")||100,min:$input.data("min")||0,step:$input.data("step")||1,spin:function(event,ui){$input.val(ui.value).trigger("change")}})})},$.fn.spf_field_switcher=function(){return this.each(function(){var $switcher=$(this).find(".spf--switcher");$switcher.on("click",function(){var value=0,$input=$switcher.find("input");$switcher.hasClass("spf--active")?$switcher.removeClass("spf--active"):(value=1,$switcher.addClass("spf--active")),$input.val(value).trigger("change")})})},$.fn.spf_field_typography=function(){return this.each(function(){var base=this,$this=$(this),loaded_fonts=[],webfonts=spf_typography_json.webfonts,googlestyles=spf_typography_json.googlestyles,defaultstyles=spf_typography_json.defaultstyles;base.sanitize_subset=function(subset){return subset=(subset=subset.replace("-ext"," Extended")).charAt(0).toUpperCase()+subset.slice(1)},base.sanitize_style=function(style){return googlestyles[style]?googlestyles[style]:style},base.load_google_font=function(font_family,weight,style){font_family&&"object"==typeof WebFont&&(weight=weight?weight.replace("normal",""):"",style=style?style.replace("normal",""):"",(weight||style)&&(font_family=font_family+":"+weight+style),-1===loaded_fonts.indexOf(font_family)&&WebFont.load({google:{families:[font_family]}}),loaded_fonts.push(font_family))},base.append_select_options=function($select,options,condition,type,is_multi){$select.find("option").not(":first").remove();var opts="";$.each(options,function(key,value){var selected,name=value;selected=is_multi?condition&&-1!==condition.indexOf(value)?" selected":"":condition&&condition===value?" selected":"","subset"===type?name=base.sanitize_subset(value):"style"===type&&(name=base.sanitize_style(value)),opts+='<option value="'+value+'"'+selected+">"+name+"</option>"}),$select.append(opts).trigger("spf.change").trigger("chosen:updated")},base.init=function(){var selected_styles=[],$typography=$this.find(".spf--typography"),$type=$this.find(".spf--type"),unit=$typography.data("unit"),exclude_fonts=$typography.data("exclude")?$typography.data("exclude").split(","):[],$chosen_selects;$this.find(".spf--chosen").length&&$this.find("select").each(function(){var $chosen_select=$(this),$chosen_inited=$chosen_select.parent().find(".chosen-container");$chosen_inited.length&&$chosen_inited.remove(),$chosen_select.chosen({allow_single_deselect:!0,disable_search_threshold:15,width:"100%"})});var $font_family_select=$this.find(".spf--font-family"),first_font_family=$font_family_select.val();$font_family_select.find("option").not(":first-child").remove();var opts="";$.each(webfonts,function(type,group){exclude_fonts&&-1!==exclude_fonts.indexOf(type)||(opts+='<optgroup label="'+group.label+'">',$.each(group.fonts,function(key,value){var selected;opts+='<option value="'+(value="object"==typeof value?key:value)+'" data-type="'+type+'"'+(value===first_font_family?" selected":"")+">"+value+"</option>"}),opts+="</optgroup>")}),$font_family_select.append(opts).trigger("chosen:updated");var $font_style_block=$this.find(".spf--block-font-style");if($font_style_block.length){var $font_style_select=$this.find(".spf--font-style-select"),first_style_value=$font_style_select.val()?$font_style_select.val().replace(/normal/g,""):"",$extra_font_style_block=$this.find(".spf--block-extra-styles");if($extra_font_style_block.length)var $extra_font_style_select,first_extra_style_value=$this.find(".spf--extra-styles").val()}var $subset_block=$this.find(".spf--block-subset");if($subset_block.length)var $subset_select=$this.find(".spf--subset"),first_subset_select_value=$subset_select.val(),subset_multi_select=$subset_select.data("multiple")||!1;var $backup_font_family_block=$this.find(".spf--block-backup-font-family");$font_family_select.on("change spf.change",function(event){$subset_block.length&&$subset_block.addClass("hidden"),$extra_font_style_block.length&&$extra_font_style_block.addClass("hidden"),$backup_font_family_block.length&&$backup_font_family_block.addClass("hidden");var $selected=$font_family_select.find(":selected"),value=$selected.val(),type=$selected.data("type");type&&value?"google"!==type&&"custom"!==type||!$backup_font_family_block.length||$backup_font_family_block.removeClass("hidden"):($subset_block.length&&($subset_select.find("option").not(":first-child").remove(),$subset_select.trigger("chosen:updated")),$font_style_block.length&&($font_style_select.find("option").not(":first-child").remove(),$font_style_select.trigger("chosen:updated"))),$type.val(type)}).trigger("spf.change")},base.init()})},$.fn.spf_field_upload=function(){return this.each(function(){var $this=$(this),$input=$this.find("input"),$upload_button=$this.find(".spf--button"),$remove_button=$this.find(".spf--remove"),$library=$upload_button.data("library")&&$upload_button.data("library").split(",")||"",wp_media_frame;$input.on("change",function(e){$input.val()?$remove_button.removeClass("hidden"):$remove_button.addClass("hidden")}),$upload_button.on("click",function(e){e.preventDefault(),void 0!==window.wp&&window.wp.media&&window.wp.media.gallery&&(wp_media_frame?wp_media_frame.open():((wp_media_frame=window.wp.media({library:{type:$library}})).on("select",function(){$input.val(wp_media_frame.state().get("selection").first().attributes.url).trigger("change")}),wp_media_frame.open()))}),$remove_button.on("click",function(e){e.preventDefault(),$input.val("").trigger("change")})})},$.fn.spf_confirm=function(){return this.each(function(){$(this).on("click",function(e){var confirm_text=$(this).data("confirm")||window.spf_vars.i18n.confirm,confirm_answer=confirm(confirm_text);if(SP_WPCF.vars.is_confirm=!0,!confirm_answer)return e.preventDefault(),SP_WPCF.vars.is_confirm=!1,!1})})},$.fn.serializeObject=function(){var obj={};return $.each(this.serializeArray(),function(i,o){var n=o.name,v=o.value;obj[n]=void 0===obj[n]?v:$.isArray(obj[n])?obj[n].concat(v):[obj[n],v]}),obj},$.fn.spf_save=function(){return this.each(function(){var $this=$(this),$buttons=$(".spf-save"),$panel=$(".spf-options"),flooding=!1,timeout;$this.on("click",function(e){if(!flooding){var $text=$this.data("save"),$value=$this.val();$buttons.attr("value",$text),$this.hasClass("spf-save-ajax")&&(e.preventDefault(),$panel.addClass("spf-saving"),$buttons.prop("disabled",!0),window.wp.ajax.post("spf_"+$panel.data("unique")+"_ajax_save",{data:$("#spf-form").serializeJSONSP_WPCF()}).done(function(response){clearTimeout(timeout);var $result_success=$(".spf-form-success");$result_success.empty().append(response.notice).slideDown("fast",function(){timeout=setTimeout(function(){$result_success.slideUp("fast")},2e3)}),$(".spf-error").remove();var $append_errors=$(".spf-form-error");if($append_errors.empty().hide(),Object.keys(response.errors).length){var error_icon='<i class="spf-label-error spf-error">!</i>';$.each(response.errors,function(key,error_message){var $field=$('[data-depend-id="'+key+'"]'),$link=$("#spf-tab-link-"+($field.closest(".spf-section").index()+1)),$tab=$link.closest(".spf-tab-depth-0");$field.closest(".spf-fieldset").append('<p class="spf-text-error spf-error">'+error_message+"</p>"),$link.find(".spf-error").length||$link.append(error_icon),$tab.find(".spf-arrow .spf-error").length||$tab.find(".spf-arrow").append(error_icon),console.log(error_message),$append_errors.append("<div>"+error_icon+" "+error_message+"</div>")}),$append_errors.show()}$panel.removeClass("spf-saving"),$buttons.prop("disabled",!1).attr("value",$value),flooding=!1}).fail(function(response){alert(response.error)}))}flooding=!0})})},$.fn.spf_taxonomy=function(){return this.each(function(){var $this=$(this),$form=$this.parents("form");if("addtag"===$form.attr("id")){var $submit=$form.find("#submit"),$cloned=$this.find(".spf-field").spf_clone();$submit.on("click",function(){$form.find(".form-required").hasClass("form-invalid")||($this.data("inited",!1),$this.empty(),$this.html($cloned),$cloned=$cloned.spf_clone(),$this.spf_reload_script())})}})},$.fn.spf_shortcode=function(){var base=this;return base.shortcode_parse=function(serialize,key){var shortcode="";return $.each(serialize,function(shortcode_key,shortcode_values){shortcode+="["+(key=key||shortcode_key),$.each(shortcode_values,function(shortcode_tag,shortcode_value){"content"===shortcode_tag?(shortcode+="]",shortcode+=shortcode_value,shortcode+="[/"+key):shortcode+=base.shortcode_tags(shortcode_tag,shortcode_value)}),shortcode+="]"}),shortcode},base.shortcode_tags=function(shortcode_tag,shortcode_value){var shortcode="";return""!==shortcode_value&&("object"!=typeof shortcode_value||$.isArray(shortcode_value)?shortcode+=" "+shortcode_tag.replace("-","_")+'="'+shortcode_value.toString()+'"':$.each(shortcode_value,function(sub_shortcode_tag,sub_shortcode_value){switch(sub_shortcode_tag){case"background-image":sub_shortcode_value=sub_shortcode_value.url?sub_shortcode_value.url:""}""!==sub_shortcode_value&&(shortcode+=" "+sub_shortcode_tag.replace("-","_")+'="'+sub_shortcode_value.toString()+'"')})),shortcode},base.insertAtChars=function(_this,currentValue){var obj=void 0!==_this[0].name?_this[0]:_this;return obj.value.length&&void 0!==obj.selectionStart?(obj.focus(),obj.value.substring(0,obj.selectionStart)+currentValue+obj.value.substring(obj.selectionEnd,obj.value.length)):(obj.focus(),currentValue)},base.send_to_editor=function(html,editor_id){var tinymce_editor;if("undefined"!=typeof tinymce&&(tinymce_editor=tinymce.get(editor_id)),tinymce_editor&&!tinymce_editor.isHidden())tinymce_editor.execCommand("mceInsertContent",!1,html);else{var $editor=$("#"+editor_id);$editor.val(base.insertAtChars($editor,html)).trigger("change")}},this.each(function(){var $modal=$(this),$load=$modal.find(".spf-modal-load"),$content=$modal.find(".spf-modal-content"),$insert=$modal.find(".spf-modal-insert"),$loading=$modal.find(".spf-modal-loading"),$select=$modal.find("select"),modal_id=$modal.data("modal-id"),nonce=$modal.data("nonce"),editor_id,target_id,gutenberg_id,sc_key,sc_name,sc_view,sc_group,$cloned,$button;$(document).on("click",'.spf-shortcode-button[data-modal-id="'+modal_id+'"]',function(e){e.preventDefault(),$button=$(this),editor_id=$button.data("editor-id")||!1,target_id=$button.data("target-id")||!1,gutenberg_id=$button.data("gutenberg-id")||!1,$modal.show(),$modal.hasClass("spf-shortcode-single")&&void 0===sc_name&&$select.trigger("change")}),$select.on("change",function(){var $option=$(this),$selected=$option.find(":selected");sc_key=$option.val(),sc_name=$selected.data("shortcode"),sc_view=$selected.data("view")||"normal",sc_group=$selected.data("group")||sc_name,$load.empty(),sc_key?($loading.show(),window.wp.ajax.post("spf-get-shortcode-"+modal_id,{shortcode_key:sc_key,nonce:nonce}).done(function(response){$loading.hide();var $appended=$(response.content).appendTo($load);$insert.parent().removeClass("hidden"),$cloned=$appended.find(".spf--repeat-shortcode").spf_clone(),$appended.spf_reload_script(),$appended.find(".spf-fields").spf_reload_script()})):$insert.parent().addClass("hidden")}),$insert.on("click",function(e){e.preventDefault();var shortcode="",serialize=$modal.find(".spf-field:not(.hidden)").find(":input").serializeObjectSP_WPCF();switch(sc_view){case"contents":var contentsObj=sc_name?serialize[sc_name]:serialize;$.each(contentsObj,function(sc_key,sc_value){var sc_tag=sc_name||sc_key;shortcode+="["+sc_tag+"]"+sc_value+"[/"+sc_tag+"]"});break;case"group":shortcode+="["+sc_name,$.each(serialize[sc_name],function(sc_key,sc_value){shortcode+=base.shortcode_tags(sc_key,sc_value)}),shortcode+="]",shortcode+=base.shortcode_parse(serialize[sc_group],sc_group),shortcode+="[/"+sc_name+"]";break;case"repeater":shortcode+=base.shortcode_parse(serialize[sc_group],sc_group);break;default:shortcode+=base.shortcode_parse(serialize)}if(gutenberg_id){var content=window.spf_gutenberg_props.attributes.hasOwnProperty("shortcode")?window.spf_gutenberg_props.attributes.shortcode:"";window.spf_gutenberg_props.setAttributes({shortcode:content+shortcode})}else if(editor_id)base.send_to_editor(shortcode,editor_id);else{var $textarea=target_id?$(target_id):$button.parent().find("textarea");$textarea.val(base.insertAtChars($textarea,shortcode)).trigger("change")}$modal.hide()}),$modal.on("click",".spf--repeat-button",function(e){e.preventDefault();var $repeatable=$modal.find(".spf--repeatable"),$new_clone=$cloned.spf_clone(),$remove_btn=$new_clone.find(".spf-repeat-remove"),$appended=$new_clone.appendTo($repeatable);$new_clone.find(".spf-fields").spf_reload_script(),SP_WPCF.helper.name_nested_replace($modal.find(".spf--repeat-shortcode"),sc_group),$remove_btn.on("click",function(){$new_clone.remove(),SP_WPCF.helper.name_nested_replace($modal.find(".spf--repeat-shortcode"),sc_group)})}),$modal.on("click",".spf-modal-close, .spf-modal-overlay",function(){$modal.hide()})})},$.fn.spf_checkbox=function(){return this.each(function(){var $this=$(this),$input=$this.find(".spf--input"),$checkbox=$this.find(".spf--checkbox");$checkbox.on("click",function(){$input.val(Number($checkbox.prop("checked"))).trigger("change")})})},$.fn.spf_field_wp_editor=function(){return this.each(function(){if(void 0!==window.wp.editor&&void 0!==window.tinyMCEPreInit&&void 0!==window.tinyMCEPreInit.mceInit.spf_wp_editor){var $this=$(this),$editor=$this.find(".spf-wp-editor"),$textarea=$this.find("textarea"),$has_wp_editor;($this.find(".wp-editor-wrap").length||$this.find(".mce-container").length)&&($editor.empty(),$editor.append($textarea),$textarea.css("display",""));var uid=SP_WPCF.helper.uid("spf-editor-");$textarea.attr("id",uid);var default_editor_settings={tinymce:window.tinyMCEPreInit.mceInit.spf_wp_editor,quicktags:window.tinyMCEPreInit.qtInit.spf_wp_editor},field_editor_settings=$editor.data("editor-settings"),editor_on_change=function(editor){editor.on("change",SP_WPCF.helper.debounce(function(){editor.save(),$textarea.trigger("change")},250))};default_editor_settings.tinymce=$.extend({},default_editor_settings.tinymce,{selector:"#"+uid,setup:editor_on_change}),!1===field_editor_settings.tinymce&&(default_editor_settings.tinymce=!1,$editor.addClass("spf-no-tinymce")),!1===field_editor_settings.quicktags&&(default_editor_settings.quicktags=!1,$editor.addClass("spf-no-quicktags"));var interval=setInterval(function(){$this.is(":visible")&&(window.wp.editor.initialize(uid,default_editor_settings),clearInterval(interval))});if(field_editor_settings.media_buttons&&window.spf_media_buttons){var $editor_buttons=$editor.find(".wp-media-buttons");if($editor_buttons.length)$editor_buttons.find(".spf-shortcode-button").data("editor-id",uid);else{var $media_buttons=$(window.spf_media_buttons);$media_buttons.find(".spf-shortcode-button").data("editor-id",uid),$editor.prepend($media_buttons)}}}})},$.fn.spf_siblings=function(){return this.each(function(){var $this=$(this),$siblings=$this.find(".spf--sibling"),multiple=$this.data("multiple")||!1;$siblings.on("click",function(){var $sibling=$(this);multiple?$sibling.hasClass("spf--active")?($sibling.removeClass("spf--active"),$sibling.find("input").prop("checked",!1).trigger("change")):($sibling.addClass("spf--active"),$sibling.find("input").prop("checked",!0).trigger("change")):($this.find("input").prop("checked",!1),$sibling.find("input").prop("checked",!0).trigger("change"),$sibling.addClass("spf--active").siblings().removeClass("spf--active"))})})},"function"==typeof Color&&(Color.fn.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var hex=parseInt(this._color,10).toString(16);if(this.error)return"";if(hex.length<6)for(var i=6-hex.length-1;i>=0;i--)hex="0"+hex;return"#"+hex}),SP_WPCF.funcs.parse_color=function(color){var value=color.replace(/\s+/g,""),trans=-1!==value.indexOf("rgba")?parseFloat(100*value.replace(/^.*,(.+)\)/,"$1")):100,rgba;return{value:value,transparent:trans,rgba:trans<100}},$.fn.spf_color=function(){return this.each(function(){var $input=$(this),picker_color=SP_WPCF.funcs.parse_color($input.val()),palette_color=!window.spf_vars.color_palette.length||window.spf_vars.color_palette,$container;$input.hasClass("wp-color-picker")&&$input.closest(".wp-picker-container").after($input).remove(),$input.wpColorPicker({palettes:palette_color,change:function(event,ui){var ui_color_value=ui.color.toString();$container.removeClass("spf--transparent-active"),$container.find(".spf--transparent-offset").css("background-color",ui_color_value),$input.val(ui_color_value).trigger("change")},create:function(){$container=$input.closest(".wp-picker-container");var a8cIris=$input.data("a8cIris"),$transparent_wrap=$('<div class="spf--transparent-wrap"><div class="spf--transparent-slider"></div><div class="spf--transparent-offset"></div><div class="spf--transparent-text"></div><div class="spf--transparent-button button button-small">transparent</div></div>').appendTo($container.find(".wp-picker-holder")),$transparent_slider=$transparent_wrap.find(".spf--transparent-slider"),$transparent_text=$transparent_wrap.find(".spf--transparent-text"),$transparent_offset=$transparent_wrap.find(".spf--transparent-offset"),$transparent_button=$transparent_wrap.find(".spf--transparent-button");"transparent"===$input.val()&&$container.addClass("spf--transparent-active"),$transparent_button.on("click",function(){"transparent"!==$input.val()?($input.val("transparent").trigger("change").removeClass("iris-error"),$container.addClass("spf--transparent-active")):($input.val(a8cIris._color.toString()).trigger("change"),$container.removeClass("spf--transparent-active"))}),$transparent_slider.slider({value:picker_color.transparent,step:1,min:0,max:100,slide:function(event,ui){var slide_value=parseFloat(ui.value/100);a8cIris._color._alpha=slide_value,$input.wpColorPicker("color",a8cIris._color.toString()),$transparent_text.text(1===slide_value||0===slide_value?"":slide_value)},create:function(){var slide_value=parseFloat(picker_color.transparent/100),text_value=slide_value<1?slide_value:"";$transparent_text.text(text_value),$transparent_offset.css("background-color",picker_color.value),$container.on("click",".wp-picker-clear",function(){a8cIris._color._alpha=1,$transparent_text.text(""),$transparent_slider.slider("option","value",100),$container.removeClass("spf--transparent-active"),$input.trigger("change")}),$container.on("click",".wp-picker-default",function(){var default_color=SP_WPCF.funcs.parse_color($input.data("default-color")),default_value=parseFloat(default_color.transparent/100),default_text=default_value<1?default_value:"";a8cIris._color._alpha=default_value,$transparent_text.text(default_text),$transparent_slider.slider("option","value",default_color.transparent)}),$container.on("click",".wp-color-result",function(){$transparent_wrap.toggle()}),$("body").on("click.wpcolorpicker",function(){$transparent_wrap.hide()})}})}})})},$.fn.spf_chosen=function(){return this.each(function(){var $this=$(this),$inited=$this.parent().find(".chosen-container"),is_multi,set_width=$this.attr("multiple")||!1?"100%":"auto",set_options=$.extend({allow_single_deselect:!0,disable_search_threshold:15,width:set_width},$this.data());$inited.length&&$inited.remove(),$this.chosen(set_options)})},$.fn.spf_number=function(){return this.each(function(){$(this).on("keypress",function(e){if(0!==e.keyCode&&8!==e.keyCode&&45!==e.keyCode&&46!==e.keyCode&&(e.keyCode<48||e.keyCode>57))return!1})})},$.fn.spf_help=function(){return this.each(function(){var $this=$(this),$tooltip,offset_left;$this.on({mouseenter:function(){$tooltip=$('<div class="spf-tooltip"></div>').html($this.find(".spf-help-text").html()).appendTo("body"),offset_left=SP_WPCF.vars.is_rtl?$this.offset().left+24:$this.offset().left-$tooltip.outerWidth(),$tooltip.css({top:$this.offset().top-($tooltip.outerHeight()/2-14),left:offset_left})},mouseleave:function(){void 0!==$tooltip&&$tooltip.remove()}})})},$.fn.spf_customizer_refresh=function(){return this.each(function(){var $this=$(this),$complex=$this.closest(".spf-customize-complex");if($complex.length){var $input=$complex.find(":input"),$unique=$complex.data("unique-id"),$option=$complex.data("option-id"),obj=$input.serializeObjectSP_WPCF(),data=$.isEmptyObject(obj)?"":obj[$unique][$option],control=wp.customize.control($unique+"["+$option+"]");control.setting._value=null,control.setting.set(data)}else $this.find(":input").first().trigger("change");$(document).trigger("spf-customizer-refresh",$this)})},$.fn.spf_customizer_listen=function(options){var settings=$.extend({closest:!1},options);return this.each(function(){if(void 0!==window.wp.customize){var $this=settings.closest?$(this).closest(".spf-customize-complex"):$(this),$input=$this.find(":input"),unique_id=$this.data("unique-id"),option_id=$this.data("option-id");void 0!==unique_id&&$input.on("change keyup",SP_WPCF.helper.debounce(function(){var obj=$this.find(":input").serializeObjectSP_WPCF();!$.isEmptyObject(obj)&&obj[unique_id]&&window.wp.customize.control(unique_id+"["+option_id+"]").setting.set(obj[unique_id][option_id])},250))}})},$(document).on("expanded",".control-section-spf",function(){var $this=$(this);$this.hasClass("open")&&!$this.data("inited")&&($this.spf_dependency(),$this.find(".spf-customize-field").spf_reload_script({dependency:!1}),$this.find(".spf-customize-complex").spf_customizer_listen(),$this.data("inited",!0))}),SP_WPCF.vars.$window.on("resize spf.resize",SP_WPCF.helper.debounce(function(event){var window_width;(navigator.userAgent.indexOf("AppleWebKit/")>-1?SP_WPCF.vars.$window.width():window.innerWidth)<=782&&!SP_WPCF.vars.onloaded&&($(".spf-section").spf_reload_script(),SP_WPCF.vars.onloaded=!0)},200)).trigger("spf.resize"),$.fn.spf_widgets=function(){this.length&&($(document).on("widget-added widget-updated",function(event,$widget){$widget.find(".spf-fields").spf_reload_script()}),$(".widgets-sortables, .control-section-sidebar").on("sortstop",function(event,ui){ui.item.find(".spf-fields").spf_reload_script_retry()}),$(document).on("click",".widget-top",function(event){$(this).parent().find(".spf-fields").spf_reload_script()}))},$.fn.spf_reload_script_retry=function(){return this.each(function(){var $this=$(this);$this.data("inited")&&$this.children(".spf-field-wp_editor").spf_field_wp_editor()})},$.fn.spf_reload_script=function(options){var settings=$.extend({dependency:!0},options);return this.each(function(){var $this=$(this);$this.data("inited")||($this.children(".spf-field-accordion").spf_field_accordion(),$this.children(".spf-field-code_editor").spf_field_code_editor(),$this.children(".spf-field-fieldset").spf_field_fieldset(),$this.children(".spf-field-gallery").spf_field_gallery(),$this.children(".spf-field-group").spf_field_group(),$this.children(".spf-field-media").spf_field_media(),$this.children(".spf-field-spinner").spf_field_spinner(),$this.children(".spf-field-switcher").spf_field_switcher(),$this.children(".spf-field-typography").spf_field_typography(),$this.children(".spf-field-upload").spf_field_upload(),$this.children(".spf-field-wp_editor").spf_field_wp_editor(),$this.children(".spf-field-border").find(".spf-color").spf_color(),$this.children(".spf-field-dimensions_advanced").find(".spf-color").spf_color(),$this.children(".spf-field-background_adv").find(".spf-color").spf_color(),$this.children(".spf-field-background").find(".spf-color").spf_color(),$this.children(".spf-field-color").find(".spf-color").spf_color(),$this.children(".spf-field-color_group").find(".spf-color").spf_color(),$this.children(".spf-field-link_color").find(".spf-color").spf_color(),$this.children(".spf-field-typography").find(".spf-color").spf_color(),$this.children(".spf-field-dimensions").find(".spf-number").spf_number(),$this.children(".spf-field-slider").find(".spf-number").spf_number(),$this.children(".spf-field-spacing").find(".spf-number").spf_number(),$this.children(".spf-field-column").find(".spf-number").spf_number(),$this.children(".spf-field-dimensions_advanced").find(".spf-number").spf_number(),$this.children(".spf-field-spinner").find(".spf-number").spf_number(),$this.children(".spf-field-typography").find(".spf-number").spf_number(),$this.children(".spf-field-select").find(".spf-chosen").spf_chosen(),$this.children(".spf-field-checkbox").find(".spf-checkbox").spf_checkbox(),$this.children(".spf-field-button_set").find(".spf-siblings").spf_siblings(),$this.children(".spf-field-image_select").find(".spf-siblings").spf_siblings(),$this.children(".spf-field-carousel_type").find(".spf-siblings").spf_siblings(),$this.children(".spf-field-palette").find(".spf-siblings").spf_siblings(),$this.children(".spf-field").find(".spf-help").spf_help(),settings.dependency&&$this.spf_dependency(),$this.data("inited",!0),$(document).trigger("spf-reload-script",$this))})},$(document).ready(function(){$(".spf-save").spf_save(),$(".spf-confirm").spf_confirm(),$(".spf-nav-options").spf_nav_options(),$(".spf-nav-metabox").spf_nav_metabox(),$(".spf-expand-all").spf_expand_all(),$(".spf-search").spf_search(),$(".spf-sticky-header").spf_sticky(),$(".spf-taxonomy").spf_taxonomy(),$(".spf-shortcode").spf_shortcode(),$(".spf-page-templates").spf_page_templates(),$(".spf-post-formats").spf_post_formats(),$(".spf-onload").spf_reload_script(),$(".widget").spf_widgets()}),$(".sp_wpcp_post_type select").change(function(event){event.preventDefault();var data={action:"wpcp_get_taxonomies",wpcf_post_type:$(this).val()};$.post(ajaxurl,data,function(resp){$(".sp_wpcp_post_taxonomy select").html(resp),$(".sp_wpcp_post_taxonomy select").trigger("chosen:updated")})}),$(".sp_wpcp_post_taxonomy select").change(function(event){event.preventDefault();var data={action:"wpcp_get_terms",wpcf_post_taxonomy:$(this).val()};$.post(ajaxurl,data,function(resp){$(".sp_wpcp_taxonomy_terms select").html(resp),$(".sp_wpcp_taxonomy_terms select").trigger("chosen:updated")})}),$(".sp_wpcp_post_type select").change(function(event){event.preventDefault();var data={action:"wpcp_get_posts",wpcf_post_type:$(this).val()};$.post(ajaxurl,data,function(resp){$(".sp_wpcp_specific_posts select").html(resp),$(".sp_wpcp_specific_posts select").trigger("chosen:updated")})})}(jQuery,window,document);
admin/views/wpcfree-metabox/classes/abstract.class.php ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Abstract Class
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SP_WPCF_Abstract' ) ) {
11
+ abstract class SP_WPCF_Abstract {
12
+
13
+ public $abstract = '';
14
+ public $output_css = '';
15
+ public $typographies = array();
16
+
17
+ public function __construct() {
18
+
19
+ // Check for embed google web fonts
20
+ if ( ! empty( $this->args['enqueue_webfont'] ) ) {
21
+ add_action( 'wp_enqueue_scripts', array( &$this, 'add_enqueue_google_fonts' ), 100 );
22
+ }
23
+
24
+ // Check for embed custom css styles
25
+ if ( ! empty( $this->args['output_css'] ) ) {
26
+ add_action( 'wp_head', array( &$this, 'add_output_css' ), 100 );
27
+ }
28
+
29
+ }
30
+
31
+ public function add_enqueue_google_fonts() {
32
+
33
+ if ( ! empty( $this->pre_fields ) ) {
34
+
35
+ foreach ( $this->pre_fields as $field ) {
36
+
37
+ $field_id = ( ! empty( $field['id'] ) ) ? $field['id'] : '';
38
+ $field_type = ( ! empty( $field['type'] ) ) ? $field['type'] : '';
39
+ $field_output = ( ! empty( $field['output'] ) ) ? $field['output'] : '';
40
+ $field_check = ( $field_type === 'typography' || $field_output ) ? true : false;
41
+
42
+ if ( $field_type && $field_id ) {
43
+
44
+ SP_WPCF::maybe_include_field( $field_type );
45
+
46
+ $class_name = 'SP_WPCF_Field_' . $field_type;
47
+
48
+ if ( class_exists( $class_name ) ) {
49
+
50
+ if ( method_exists( $class_name, 'output' ) || method_exists( $class_name, 'enqueue_google_fonts' ) ) {
51
+
52
+ $field_value = '';
53
+
54
+ if ( $field_check && ( $this->abstract === 'options' || $this->abstract === 'customize' ) ) {
55
+ $field_value = ( isset( $this->options[ $field_id ] ) && $this->options[ $field_id ] !== '' ) ? $this->options[ $field_id ] : '';
56
+ } elseif ( $field_check && $this->abstract === 'metabox' ) {
57
+ $field_value = $this->get_meta_value( $field );
58
+ }
59
+
60
+ $instance = new $class_name( $field, $field_value, $this->unique, 'wp/enqueue', $this );
61
+
62
+ // typography enqueue and embed google web fonts.
63
+ if ( $field_type === 'typography' && $this->args['enqueue_webfont'] && ! empty( $field_value['font-family'] ) ) {
64
+ $instance->enqueue_google_fonts();
65
+ }
66
+
67
+ // output css
68
+ if ( $field_output && $this->args['output_css'] ) {
69
+ $instance->output();
70
+ }
71
+
72
+ unset( $instance );
73
+
74
+ }
75
+ }
76
+ }
77
+ }
78
+ }
79
+
80
+ if ( ! empty( $this->typographies ) && empty( $this->args['async_webfont'] ) ) {
81
+
82
+ $query = array( 'family' => urlencode( implode( '|', $this->typographies ) ) );
83
+ $api = '//fonts.googleapis.com/css';
84
+ $handle = 'SP_WPCF-google-web-fonts-' . $this->unique;
85
+ $src = esc_url( add_query_arg( $query, $api ) );
86
+
87
+ wp_enqueue_style( $handle, $src, array(), null );
88
+ wp_enqueue_style( $handle );
89
+
90
+ }
91
+
92
+ if ( ! empty( $this->typographies ) && ! empty( $this->args['async_webfont'] ) ) {
93
+
94
+ $api = '//ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js';
95
+ echo '<script type="text/javascript">';
96
+ echo 'WebFontConfig={google:{families:[' . "'" . implode( "','", $this->typographies ) . "'" . ']}};';
97
+ echo '!function(e){var t=e.createElement("script"),s=e.scripts[0];t.src="' . $api . '",t.async=!0,s.parentNode.insertBefore(t,s)}(document);';
98
+ echo '</script>';
99
+
100
+ }
101
+
102
+ }
103
+
104
+ public function add_output_css() {
105
+
106
+ $this->output_css = apply_filters( "SP_WPCF_{$this->unique}_output_css", $this->output_css, $this );
107
+
108
+ if ( ! empty( $this->output_css ) ) {
109
+ echo '<style type="text/css">' . $this->output_css . '</style>';
110
+ }
111
+
112
+ }
113
+
114
+ }
115
+ }
admin/views/wpcfree-metabox/classes/fields.class.php ADDED
@@ -0,0 +1,261 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Fields Class
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SP_WPCF_Fields' ) ) {
11
+ abstract class SP_WPCF_Fields extends SP_WPCF_Abstract {
12
+
13
+ public function __construct( $field = array(), $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ $this->field = $field;
15
+ $this->value = $value;
16
+ $this->unique = $unique;
17
+ $this->where = $where;
18
+ $this->parent = $parent;
19
+ }
20
+
21
+ public function field_name( $nested_name = '' ) {
22
+
23
+ $field_id = ( ! empty( $this->field['id'] ) ) ? $this->field['id'] : '';
24
+ $unique_id = ( ! empty( $this->unique ) ) ? $this->unique . '[' . $field_id . ']' : $field_id;
25
+ $field_name = ( ! empty( $this->field['name'] ) ) ? $this->field['name'] : $unique_id;
26
+ $tag_prefix = ( ! empty( $this->field['tag_prefix'] ) ) ? $this->field['tag_prefix'] : '';
27
+
28
+ if ( ! empty( $tag_prefix ) ) {
29
+ $nested_name = str_replace( '[', '[' . $tag_prefix, $nested_name );
30
+ }
31
+
32
+ return $field_name . $nested_name;
33
+
34
+ }
35
+
36
+ public function field_attributes( $custom_atts = array() ) {
37
+
38
+ $field_id = ( ! empty( $this->field['id'] ) ) ? $this->field['id'] : '';
39
+ $attributes = ( ! empty( $this->field['attributes'] ) ) ? $this->field['attributes'] : array();
40
+
41
+ if ( ! empty( $field_id ) ) {
42
+ $attributes['data-depend-id'] = $field_id;
43
+ }
44
+
45
+ if ( ! empty( $this->field['placeholder'] ) ) {
46
+ $attributes['placeholder'] = $this->field['placeholder'];
47
+ }
48
+
49
+ $attributes = wp_parse_args( $attributes, $custom_atts );
50
+
51
+ $atts = '';
52
+
53
+ if ( ! empty( $attributes ) ) {
54
+ foreach ( $attributes as $key => $value ) {
55
+ if ( $value === 'only-key' ) {
56
+ $atts .= ' ' . $key;
57
+ } else {
58
+ $atts .= ' ' . $key . '="' . $value . '"';
59
+ }
60
+ }
61
+ }
62
+
63
+ return $atts;
64
+
65
+ }
66
+
67
+ public function field_before() {
68
+ return ( ! empty( $this->field['before'] ) ) ? $this->field['before'] : '';
69
+ }
70
+
71
+ public function field_after() {
72
+
73
+ $output = ( ! empty( $this->field['desc'] ) ) ? '<p class="spf-text-desc">' . $this->field['desc'] . '</p>' : '';
74
+ $output .= ( ! empty( $this->field['after'] ) ) ? $this->field['after'] : '';
75
+ $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>' : '';
76
+ $output .= ( ! empty( $this->field['_error'] ) ) ? '<p class="spf-text-error">' . $this->field['_error'] . '</p>' : '';
77
+
78
+ return $output;
79
+
80
+ }
81
+
82
+ public function field_data( $type = '' ) {
83
+
84
+ $options = array();
85
+ $query_args = ( ! empty( $this->field['query_args'] ) ) ? $this->field['query_args'] : array();
86
+
87
+ switch ( $type ) {
88
+
89
+ case 'page':
90
+ case 'pages':
91
+ $pages = get_pages( $query_args );
92
+
93
+ if ( ! is_wp_error( $pages ) && ! empty( $pages ) ) {
94
+ foreach ( $pages as $page ) {
95
+ $options[ $page->ID ] = $page->post_title;
96
+ }
97
+ }
98
+
99
+ break;
100
+
101
+ case 'post':
102
+ case 'posts':
103
+ $posts = get_posts( $query_args );
104
+
105
+ if ( ! is_wp_error( $posts ) && ! empty( $posts ) ) {
106
+ foreach ( $posts as $post ) {
107
+ $options[ $post->ID ] = $post->post_title;
108
+ }
109
+ }
110
+
111
+ break;
112
+
113
+ case 'taxonomies':
114
+ case 'taxonomy':
115
+ global $post;
116
+ $saved_meta = get_post_meta( $post->ID, 'sp_wpcp_upload_options', true );
117
+ if ( isset( $saved_meta['wpcp_post_type'] ) && ! empty( $saved_meta['wpcp_post_type'] ) ) {
118
+ $taxonomy_names = get_object_taxonomies( $saved_meta['wpcp_post_type'], 'names' );
119
+ if ( ! is_wp_error( $taxonomy_names ) && ! empty( $taxonomy_names ) ) {
120
+ foreach ( $taxonomy_names as $taxonomy => $label ) {
121
+ $options[ $label ] = $label;
122
+ }
123
+ }
124
+ } else {
125
+ $post_types = get_post_types( array( 'public' => true ) );
126
+ $post_type_list = array();
127
+ $post_type_number = 1;
128
+ foreach ( $post_types as $post_type => $label ) {
129
+ $post_type_list[ $post_type_number++ ] = $label;
130
+ }
131
+ $taxonomy_names = get_object_taxonomies( $post_type_list['1'], 'names' );
132
+ foreach ( $taxonomy_names as $taxonomy => $label ) {
133
+ $options[ $label ] = $label;
134
+ }
135
+ }
136
+
137
+ break;
138
+
139
+ case 'terms':
140
+ case 'term':
141
+ global $post;
142
+ $saved_meta = get_post_meta( $post->ID, 'sp_wpcp_upload_options', true );
143
+ if ( isset( $saved_meta['wpcp_post_taxonomy'] ) && ! empty( $saved_meta['wpcp_post_taxonomy'] ) ) {
144
+ $terms = get_terms( $saved_meta['wpcp_post_taxonomy'] );
145
+ foreach ( $terms as $key => $value ) {
146
+ $options[ $value->term_id ] = $value->name;
147
+ }
148
+ } else {
149
+ $post_types = get_post_types( array( 'public' => true ) );
150
+ $post_type_list = array();
151
+ $post_type_number = 1;
152
+ foreach ( $post_types as $post_type => $label ) {
153
+ $post_type_list[ $post_type_number++ ] = $label;
154
+ }
155
+ $taxonomy_names = get_object_taxonomies( $post_type_list['1'], 'names' );
156
+ $taxonomy_number = 1;
157
+ foreach ( $taxonomy_names as $taxonomy => $label ) {
158
+ $taxonomy_terms[ $taxonomy_number++ ] = $label;
159
+ }
160
+ $terms = get_terms( $taxonomy_terms['1'] );
161
+ foreach ( $terms as $key => $value ) {
162
+ $options[ $value->term_id ] = $value->name;
163
+ }
164
+ }
165
+
166
+ break;
167
+
168
+ case 'category':
169
+ case 'categories':
170
+ $categories = get_categories( $query_args );
171
+
172
+ if ( ! is_wp_error( $categories ) && ! empty( $categories ) && ! isset( $categories['errors'] ) ) {
173
+ foreach ( $categories as $category ) {
174
+ $options[ $category->term_id ] = $category->name;
175
+ }
176
+ }
177
+
178
+ break;
179
+
180
+ case 'tag':
181
+ case 'tags':
182
+ $taxonomies = ( isset( $query_args['taxonomies'] ) ) ? $query_args['taxonomies'] : 'post_tag';
183
+ $tags = get_terms( $taxonomies, $query_args );
184
+
185
+ if ( ! is_wp_error( $tags ) && ! empty( $tags ) ) {
186
+ foreach ( $tags as $tag ) {
187
+ $options[ $tag->term_id ] = $tag->name;
188
+ }
189
+ }
190
+
191
+ break;
192
+
193
+ case 'menu':
194
+ case 'menus':
195
+ $menus = wp_get_nav_menus( $query_args );
196
+
197
+ if ( ! is_wp_error( $menus ) && ! empty( $menus ) ) {
198
+ foreach ( $menus as $menu ) {
199
+ $options[ $menu->term_id ] = $menu->name;
200
+ }
201
+ }
202
+
203
+ break;
204
+
205
+ case 'post_type':
206
+ case 'post_types':
207
+ $post_types = get_post_types(
208
+ array(
209
+ 'show_in_nav_menus' => true,
210
+ )
211
+ );
212
+
213
+ if ( ! is_wp_error( $post_types ) && ! empty( $post_types ) ) {
214
+ foreach ( $post_types as $post_type ) {
215
+ $options[ $post_type ] = ucfirst( $post_type );
216
+ }
217
+ }
218
+
219
+ break;
220
+
221
+ case 'sidebar':
222
+ case 'sidebars':
223
+ global $wp_registered_sidebars;
224
+
225
+ if ( ! empty( $wp_registered_sidebars ) ) {
226
+ foreach ( $wp_registered_sidebars as $sidebar ) {
227
+ $options[ $sidebar['id'] ] = $sidebar['name'];
228
+ }
229
+ }
230
+
231
+ break;
232
+
233
+ case 'role':
234
+ case 'roles':
235
+ global $wp_roles;
236
+
237
+ if ( is_object( $wp_roles ) ) {
238
+ $roles = $wp_roles->get_names();
239
+ if ( ! empty( $wp_roles ) ) {
240
+ foreach ( $roles as $key => $value ) {
241
+ $options[ $key ] = $value;
242
+ }
243
+ }
244
+ }
245
+
246
+ break;
247
+
248
+ default:
249
+ if ( function_exists( $type ) ) {
250
+ $options = call_user_func( $type, $this->value, $this->field );
251
+ }
252
+ break;
253
+
254
+ }
255
+
256
+ return $options;
257
+
258
+ }
259
+
260
+ }
261
+ }
admin/views/wpcfree-metabox/classes/metabox.class.php ADDED
@@ -0,0 +1,389 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
+ /**
3
+ *
4
+ * Metabox Class
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ */
10
+ if( ! class_exists( 'SP_WPCF_Metabox' ) ) {
11
+ class SP_WPCF_Metabox extends SP_WPCF_Abstract{
12
+
13
+ // constans
14
+ public $unique = '';
15
+ public $abstract = 'metabox';
16
+ public $pre_fields = array();
17
+ public $sections = array();
18
+ public $post_type = array();
19
+ public $args = array(
20
+ 'title' => '',
21
+ 'post_type' => 'post',
22
+ 'data_type' => 'serialize',
23
+ 'context' => 'advanced',
24
+ 'priority' => 'default',
25
+ 'exclude_post_types' => array(),
26
+ 'page_templates' => '',
27
+ 'post_formats' => '',
28
+ 'show_restore' => false,
29
+ 'enqueue_webfont' => true,
30
+ 'async_webfont' => false,
31
+ 'output_css' => true,
32
+ 'theme' => 'dark',
33
+ 'defaults' => array(),
34
+ );
35
+
36
+ // run metabox construct
37
+ public function __construct( $key, $params = array() ) {
38
+
39
+ $this->unique = $key;
40
+ $this->args = apply_filters( "spf_{$this->unique}_args", wp_parse_args( $params['args'], $this->args ), $this );
41
+ $this->sections = apply_filters( "spf_{$this->unique}_sections", $params['sections'], $this );
42
+ $this->post_type = ( is_array( $this->args['post_type'] ) ) ? $this->args['post_type'] : array_filter( (array) $this->args['post_type'] );
43
+ $this->post_formats = ( is_array( $this->args['post_formats'] ) ) ? $this->args['post_formats'] : array_filter( (array) $this->args['post_formats'] );
44
+ $this->page_templates = ( is_array( $this->args['page_templates'] ) ) ? $this->args['page_templates'] : array_filter( (array) $this->args['page_templates'] );
45
+ $this->pre_fields = $this->pre_fields( $this->sections );
46
+
47
+ add_action( 'add_meta_boxes', array( &$this, 'add_meta_box' ) );
48
+ add_action( 'save_post', array( &$this, 'save_meta_box' ), 10, 2 );
49
+
50
+ if( ! empty( $this->page_templates ) || ! empty( $this->post_formats ) ) {
51
+ foreach( $this->post_type as $post_type ) {
52
+ add_filter( 'postbox_classes_'. $post_type .'_'. $this->unique, array( &$this, 'add_metabox_classes' ) );
53
+ }
54
+ }
55
+
56
+ // wp enqeueu for typography and output css
57
+ parent::__construct();
58
+
59
+ }
60
+
61
+ // instance
62
+ public static function instance( $key, $params = array() ) {
63
+ return new self( $key, $params );
64
+ }
65
+
66
+ public function pre_fields( $sections ) {
67
+
68
+ $result = array();
69
+
70
+ foreach( $sections as $key => $section ) {
71
+ if( ! empty( $section['fields'] ) ) {
72
+ foreach( $section['fields'] as $field ) {
73
+ $result[] = $field;
74
+ }
75
+ }
76
+ }
77
+
78
+ return $result;
79
+ }
80
+
81
+ public function add_metabox_classes( $classes ) {
82
+
83
+ global $post;
84
+
85
+ if( ! empty( $this->post_formats ) ) {
86
+
87
+ $saved_post_format = ( is_object( $post ) ) ? get_post_format( $post ) : false;
88
+ $saved_post_format = ( ! empty( $saved_post_format ) ) ? $saved_post_format : 'default';
89
+
90
+ $classes[] = 'spf-post-formats';
91
+
92
+ // Sanitize post format for standard to default
93
+ if( ( $key = array_search( 'standard', $this->post_formats ) ) !== false ) {
94
+ $this->post_formats[$key] = 'default';
95
+ }
96
+
97
+ foreach( $this->post_formats as $format ) {
98
+ $classes[] = 'spf-post-format-'. $format;
99
+ }
100
+
101
+ if( ! in_array( $saved_post_format, $this->post_formats ) ) {
102
+ $classes[] = 'spf-hide';
103
+ } else {
104
+ $classes[] = 'spf-show';
105
+ }
106
+
107
+ }
108
+
109
+ if( ! empty( $this->page_templates ) ) {
110
+
111
+ $saved_template = ( is_object( $post ) && ! empty( $post->page_template ) ) ? $post->page_template : 'default';
112
+
113
+ $classes[] = 'spf-page-templates';
114
+
115
+ foreach( $this->page_templates as $template ) {
116
+ $classes[] = 'spf-page-'. preg_replace( '/[^a-zA-Z0-9]+/', '-', strtolower( $template ) );
117
+ }
118
+
119
+ if( ! in_array( $saved_template, $this->page_templates ) ) {
120
+ $classes[] = 'spf-hide';
121
+ } else {
122
+ $classes[] = 'spf-show';
123
+ }
124
+
125
+ }
126
+
127
+ return $classes;
128
+
129
+ }
130
+
131
+ // add metabox
132
+ public function add_meta_box( $post_type ) {
133
+
134
+ if( ! in_array( $post_type, $this->args['exclude_post_types'] ) ) {
135
+ 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 );
136
+ }
137
+
138
+ }
139
+
140
+ // get default value
141
+ public function get_default( $field ) {
142
+
143
+ $default = ( isset( $this->args['defaults'][$field['id']] ) ) ? $this->args['defaults'][$field['id']] : '';
144
+ $default = ( isset( $field['default'] ) ) ? $field['default'] : $default;
145
+
146
+ return $default;
147
+
148
+ }
149
+
150
+ // get meta value
151
+ public function get_meta_value( $field ) {
152
+
153
+ global $post;
154
+
155
+ $value = '';
156
+
157
+ if( is_object( $post ) && ! empty( $field['id'] ) ) {
158
+
159
+ if( $this->args['data_type'] !== 'serialize' ) {
160
+ $meta = get_post_meta( $post->ID, $field['id'] );
161
+ $value = ( isset( $meta[0] ) ) ? $meta[0] : null;
162
+ } else {
163
+ $meta = get_post_meta( $post->ID, $this->unique, true );
164
+ $value = ( isset( $meta[$field['id']] ) ) ? $meta[$field['id']] : null;
165
+ }
166
+
167
+ $default = $this->get_default( $field );
168
+ $value = ( isset( $value ) ) ? $value : $default;
169
+
170
+ }
171
+
172
+ return $value;
173
+
174
+ }
175
+
176
+ // add metabox content
177
+ public function add_meta_box_content( $post, $callback ) {
178
+
179
+ global $post;
180
+
181
+ $has_nav = ( count( $this->sections ) > 1 && $this->args['context'] !== 'side' ) ? true : false;
182
+ $show_all = ( ! $has_nav ) ? ' spf-show-all' : '';
183
+ $errors = ( is_object ( $post ) ) ? get_post_meta( $post->ID, '_spf_errors', true ) : array();
184
+ $errors = ( ! empty( $errors ) ) ? $errors : array();
185
+
186
+ if( is_object ( $post ) && ! empty( $errors ) ) {
187
+ delete_post_meta( $post->ID, '_spf_errors' );
188
+ }
189
+
190
+ wp_nonce_field( 'spf_metabox_nonce', 'spf_metabox_nonce' );
191
+
192
+ echo '<div class="spf spf-theme-'. $this->args['theme'] .' spf-metabox">';
193
+
194
+ echo '<div class="spf-wrapper'. $show_all .'">';
195
+
196
+ if( $has_nav ) {
197
+
198
+ echo '<div class="spf-nav spf-nav-metabox" data-unique="'. $this->unique .'">';
199
+
200
+ echo '<ul>';
201
+ $tab_key = 1;
202
+ foreach( $this->sections as $section ) {
203
+
204
+ $tab_error = ( ! empty( $errors['sections'][$tab_key] ) ) ? '<i class="spf-label-error spf-error">!</i>' : '';
205
+ $tab_icon = ( ! empty( $section['icon'] ) ) ? '<i class="spf-icon '. $section['icon'] .'"></i>' : '';
206
+
207
+ echo '<li><a href="#" data-section="'. $this->unique .'_'. $tab_key .'">'. $tab_icon . $section['title'] . $tab_error .'</a></li>';
208
+
209
+ $tab_key++;
210
+ }
211
+ echo '</ul>';
212
+
213
+ echo '</div>';
214
+
215
+ }
216
+
217
+ echo '<div class="spf-content">';
218
+
219
+ echo '<div class="spf-sections">';
220
+
221
+ $section_key = 1;
222
+
223
+ foreach( $this->sections as $section ) {
224
+
225
+ $onload = ( ! $has_nav ) ? ' spf-onload' : '';
226
+
227
+ echo '<div id="spf-section-'. $this->unique .'_'. $section_key .'" class="spf-section'. $onload .'">';
228
+
229
+ $section_icon = ( ! empty( $section['icon'] ) ) ? '<i class="spf-icon '. $section['icon'] .'"></i>' : '';
230
+ $section_title = ( ! empty( $section['title'] ) ) ? $section['title'] : '';
231
+
232
+ echo ( $section_title || $section_icon ) ? '<div class="spf-section-title"><h3>'. $section_icon . $section_title .'</h3></div>' : '';
233
+
234
+ if( ! empty( $section['fields'] ) ) {
235
+
236
+ foreach ( $section['fields'] as $field ) {
237
+
238
+ if( ! empty( $field['id'] ) && ! empty( $errors['fields'][$field['id']] ) ) {
239
+ $field['_error'] = $errors['fields'][$field['id']];
240
+ }
241
+
242
+ SP_WPCF::field( $field, $this->get_meta_value( $field ), $this->unique, 'metabox' );
243
+
244
+ }
245
+
246
+ } else {
247
+
248
+ echo '<div class="spf-no-option spf-text-muted">'. esc_html__( 'No option provided by developer.', 'wp-carousel-free' ) .'</div>';
249
+
250
+ }
251
+
252
+ echo '</div>';
253
+
254
+ $section_key++;
255
+ }
256
+
257
+ echo '</div>';
258
+
259
+ echo '<div class="clear"></div>';
260
+
261
+ if( ! empty( $this->args['show_restore'] ) ) {
262
+
263
+ echo '<div class=" spf-metabox-restore">';
264
+ echo '<label>';
265
+ echo '<input type="checkbox" name="'. $this->unique .'[_restore]" />';
266
+ echo '<span class="button spf-button-restore">'. esc_html__( 'Restore', 'wp-carousel-free' ) .'</span>';
267
+ 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>';
268
+ echo '</label>';
269
+ echo '</div>';
270
+
271
+ }
272
+
273
+ echo '</div>';
274
+
275
+ echo ( $has_nav ) ? '<div class="spf-nav-background"></div>' : '';
276
+
277
+ echo '<div class="clear"></div>';
278
+
279
+ echo '</div>';
280
+
281
+ echo '</div>';
282
+
283
+ }
284
+
285
+ // save metabox
286
+ public function save_meta_box( $post_id, $post ) {
287
+
288
+ if ( wp_verify_nonce( spf_get_var( 'spf_metabox_nonce' ), 'spf_metabox_nonce' ) ) {
289
+
290
+ $errors = array();
291
+ $request = spf_get_var( $this->unique );
292
+
293
+ if( ! empty( $request ) ) {
294
+
295
+ // ignore _nonce
296
+ if( isset( $request['_nonce'] ) ) {
297
+ unset( $request['_nonce'] );
298
+ }
299
+
300
+ // sanitize and validate
301
+ $section_key = 1;
302
+ foreach( $this->sections as $section ) {
303
+
304
+ if( ! empty( $section['fields'] ) ) {
305
+
306
+ foreach( $section['fields'] as $field ) {
307
+
308
+ if( ! empty( $field['id'] ) ) {
309
+
310
+ // sanitize
311
+ if( ! empty( $field['sanitize'] ) ) {
312
+
313
+ $sanitize = $field['sanitize'];
314
+ $value_sanitize = isset( $request[$field['id']] ) ? $request[$field['id']] : '';
315
+ $request[$field['id']] = call_user_func( $sanitize, $value_sanitize );
316
+
317
+ }
318
+
319
+ // validate
320
+ if( ! empty( $field['validate'] ) ) {
321
+
322
+ $validate = $field['validate'];
323
+ $value_validate = isset( $request[$field['id']] ) ? $request[$field['id']] : '';
324
+ $has_validated = call_user_func( $validate, $value_validate );
325
+
326
+ if( ! empty( $has_validated ) ) {
327
+
328
+ $errors['sections'][$section_key] = true;
329
+ $errors['fields'][$field['id']] = $has_validated;
330
+ $request[$field['id']] = $this->get_meta_value( $field );
331
+
332
+ }
333
+
334
+ }
335
+
336
+ // auto sanitize
337
+ if( ! isset( $request[$field['id']] ) || is_null( $request[$field['id']] ) ) {
338
+ $request[$field['id']] = '';
339
+ }
340
+
341
+ }
342
+
343
+ }
344
+
345
+ }
346
+
347
+ $section_key++;
348
+ }
349
+
350
+ $request = apply_filters( "spf_{$this->unique}_save", $request, $post_id, $this );
351
+
352
+ do_action( "spf_{$this->unique}_save_before", $request, $post_id, $this );
353
+
354
+ if( empty( $request ) || ! empty( $request['_restore'] ) ) {
355
+
356
+ if( $this->args['data_type'] !== 'serialize' ) {
357
+ foreach ( $request as $key => $value ) {
358
+ delete_post_meta( $post_id, $key );
359
+ }
360
+ } else {
361
+ delete_post_meta( $post_id, $this->unique );
362
+ }
363
+
364
+ } else {
365
+
366
+ if( $this->args['data_type'] !== 'serialize' ) {
367
+ foreach ( $request as $key => $value ) {
368
+ update_post_meta( $post_id, $key, $value );
369
+ }
370
+ } else {
371
+ update_post_meta( $post_id, $this->unique, $request );
372
+ }
373
+
374
+ if( ! empty( $errors ) ) {
375
+ update_post_meta( $post_id, '_spf_errors', $errors );
376
+ }
377
+
378
+ }
379
+
380
+ do_action( "spf_{$this->unique}_saved", $request, $post_id, $this );
381
+
382
+ do_action( "spf_{$this->unique}_save_after", $request, $post_id, $this );
383
+
384
+ }
385
+
386
+ }
387
+ }
388
+ }
389
+ }
admin/views/wpcfree-metabox/classes/options.class.php ADDED
@@ -0,0 +1,713 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ public $unique = '';
15
+ public $notice = '';
16
+ public $abstract = 'options';
17
+ public $sections = array();
18
+ public $options = array();
19
+ public $errors = array();
20
+ public $pre_tabs = array();
21
+ public $pre_fields = array();
22
+ public $pre_sections = array();
23
+
24
+ // default args.
25
+ public $args = array(
26
+
27
+ // framework title.
28
+ 'framework_title' => 'Codestar Framework <small>by Codestar</small>',
29
+ 'framework_class' => '',
30
+
31
+ // menu settings.
32
+ 'menu_title' => '',
33
+ 'menu_slug' => '',
34
+ 'menu_type' => 'menu',
35
+ 'menu_capability' => 'manage_options',
36
+ 'menu_icon' => null,
37
+ 'menu_position' => null,
38
+ 'menu_hidden' => false,
39
+ 'menu_parent' => '',
40
+
41
+ // menu extras.
42
+ 'show_bar_menu' => true,
43
+ 'show_sub_menu' => true,
44
+ 'show_network_menu' => true,
45
+ 'show_in_customizer' => false,
46
+
47
+ 'show_search' => true,
48
+ 'show_reset_all' => true,
49
+ 'show_reset_section' => true,
50
+ 'show_footer' => true,
51
+ 'show_all_options' => true,
52
+ 'sticky_header' => true,
53
+ 'save_defaults' => true,
54
+ 'ajax_save' => true,
55
+
56
+ // admin bar menu settings.
57
+ 'admin_bar_menu_icon' => '',
58
+ 'admin_bar_menu_priority' => 80,
59
+
60
+ // footer.
61
+ 'footer_text' => '',
62
+ 'footer_after' => '',
63
+ 'footer_credit' => '',
64
+
65
+ // database model.
66
+ 'database' => '', // options, transient, theme_mod, network.
67
+ 'transient_time' => 0,
68
+
69
+ // contextual help.
70
+ 'contextual_help' => array(),
71
+ 'contextual_help_sidebar' => '',
72
+
73
+ // typography options.
74
+ 'enqueue_webfont' => true,
75
+ 'async_webfont' => false,
76
+
77
+ // others.
78
+ 'output_css' => true,
79
+
80
+ // theme.
81
+ 'theme' => 'dark',
82
+
83
+ // external default values.
84
+ 'defaults' => array(),
85
+
86
+ );
87
+
88
+ // run framework construct.
89
+ public function __construct( $key, $params = array() ) {
90
+
91
+ $this->unique = $key;
92
+ $this->args = apply_filters( "spf_{$this->unique}_args", wp_parse_args( $params['args'], $this->args ), $this );
93
+ $this->sections = apply_filters( "spf_{$this->unique}_sections", $params['sections'], $this );
94
+
95
+ // run only is admin panel options, avoid performance loss.
96
+ $this->pre_tabs = $this->pre_tabs( $this->sections );
97
+ $this->pre_fields = $this->pre_fields( $this->sections );
98
+ $this->pre_sections = $this->pre_sections( $this->sections );
99
+
100
+ $this->get_options();
101
+ $this->set_options();
102
+ $this->save_defaults();
103
+
104
+ add_action( 'admin_menu', array( &$this, 'add_admin_menu' ) );
105
+ add_action( 'admin_bar_menu', array( &$this, 'add_admin_bar_menu' ), $this->args['admin_bar_menu_priority'] );
106
+ add_action( 'wp_ajax_spf_' . $this->unique . '_ajax_save', array( &$this, 'ajax_save' ) );
107
+
108
+ if ( ! empty( $this->args['show_network_menu'] ) ) {
109
+ add_action( 'network_admin_menu', array( &$this, 'add_admin_menu' ) );
110
+ }
111
+
112
+ // wp enqeueu for typography and output css.
113
+ parent::__construct();
114
+
115
+ }
116
+
117
+ // instance.
118
+ public static function instance( $key, $params = array() ) {
119
+ return new self( $key, $params );
120
+ }
121
+
122
+ public function pre_tabs( $sections ) {
123
+
124
+ $result = array();
125
+ $parents = array();
126
+ $count = 100;
127
+
128
+ foreach ( $sections as $key => $section ) {
129
+ if ( ! empty( $section['parent'] ) ) {
130
+ $section['priority'] = ( isset( $section['priority'] ) ) ? $section['priority'] : $count;
131
+ $parents[ $section['parent'] ][] = $section;
132
+ unset( $sections[ $key ] );
133
+ }
134
+ $count++;
135
+ }
136
+
137
+ foreach ( $sections as $key => $section ) {
138
+ $section['priority'] = ( isset( $section['priority'] ) ) ? $section['priority'] : $count;
139
+ if ( ! empty( $section['id'] ) && ! empty( $parents[ $section['id'] ] ) ) {
140
+ $section['subs'] = wp_list_sort( $parents[ $section['id'] ], array( 'priority' => 'ASC' ), 'ASC', true );
141
+ }
142
+ $result[] = $section;
143
+ $count++;
144
+ }
145
+
146
+ return wp_list_sort( $result, array( 'priority' => 'ASC' ), 'ASC', true );
147
+ }
148
+
149
+ public function pre_fields( $sections ) {
150
+
151
+ $result = array();
152
+
153
+ foreach ( $sections as $key => $section ) {
154
+ if ( ! empty( $section['fields'] ) ) {
155
+ foreach ( $section['fields'] as $field ) {
156
+ $result[] = $field;
157
+ }
158
+ }
159
+ }
160
+
161
+ return $result;
162
+ }
163
+
164
+ public function pre_sections( $sections ) {
165
+
166
+ $result = array();
167
+
168
+ foreach ( $this->pre_tabs as $tab ) {
169
+ if ( ! empty( $tab['subs'] ) ) {
170
+ foreach ( $tab['subs'] as $sub ) {
171
+ $result[] = $sub;
172
+ }
173
+ }
174
+ if ( empty( $tab['subs'] ) ) {
175
+ $result[] = $tab;
176
+ }
177
+ }
178
+
179
+ return $result;
180
+ }
181
+
182
+ // add admin bar menu.
183
+ public function add_admin_bar_menu( $wp_admin_bar ) {
184
+
185
+ if ( ! empty( $this->args['show_bar_menu'] ) && empty( $this->args['menu_hidden'] ) ) {
186
+
187
+ global $submenu;
188
+
189
+ $menu_slug = $this->args['menu_slug'];
190
+ $menu_icon = ( ! empty( $this->args['admin_bar_menu_icon'] ) ) ? '<span class="spf-ab-icon ab-icon ' . $this->args['admin_bar_menu_icon'] . '"></span>' : '';
191
+
192
+ $wp_admin_bar->add_node(
193
+ array(
194
+ 'id' => $menu_slug,
195
+ 'title' => $menu_icon . $this->args['menu_title'],
196
+ 'href' => ( is_network_admin() ) ? network_admin_url( 'admin.php?page=' . $menu_slug ) : admin_url( 'admin.php?page=' . $menu_slug ),
197
+ )
198
+ );
199
+
200
+ if ( ! empty( $submenu[ $menu_slug ] ) ) {
201
+ foreach ( $submenu[ $menu_slug ] as $key => $menu ) {
202
+ $wp_admin_bar->add_node(
203
+ array(
204
+ 'parent' => $menu_slug,
205
+ 'id' => $menu_slug . '-' . $key,
206
+ 'title' => $menu[0],
207
+ 'href' => ( is_network_admin() ) ? network_admin_url( 'admin.php?page=' . $menu[2] ) : admin_url( 'admin.php?page=' . $menu[2] ),
208
+ )
209
+ );
210
+ }
211
+ }
212
+
213
+ if ( ! empty( $this->args['show_network_menu'] ) ) {
214
+ $wp_admin_bar->add_node(
215
+ array(
216
+ 'parent' => 'network-admin',
217
+ 'id' => $menu_slug . '-network-admin',
218
+ 'title' => $menu_icon . $this->args['menu_title'],
219
+ 'href' => network_admin_url( 'admin.php?page=' . $menu_slug ),
220
+ )
221
+ );
222
+ }
223
+ }
224
+
225
+ }
226
+
227
+ public function ajax_save() {
228
+
229
+ if ( ! empty( $_POST['data'] ) ) {
230
+
231
+ $_POST = json_decode( stripslashes( $_POST['data'] ), true );
232
+
233
+ if ( ! empty( $_POST['spf_options_nonce'] ) && wp_verify_nonce( $_POST['spf_options_nonce'], 'spf_options_nonce' ) ) {
234
+
235
+ $this->set_options();
236
+
237
+ wp_send_json_success(
238
+ array(
239
+ 'success' => true,
240
+ 'notice' => $this->notice,
241
+ 'errors' => $this->errors,
242
+ )
243
+ );
244
+
245
+ }
246
+ }
247
+
248
+ wp_send_json_error(
249
+ array(
250
+ 'success' => false,
251
+ 'error' => esc_html__(
252
+ 'Error while saving.',
253
+ 'wp-carousel-pro'
254
+ ),
255
+ )
256
+ );
257
+
258
+ }
259
+
260
+ // get default value
261
+ public function get_default( $field, $options = array() ) {
262
+
263
+ $default = ( isset( $this->args['defaults'][ $field['id'] ] ) ) ? $this->args['defaults'][ $field['id'] ] : '';
264
+ $default = ( isset( $field['default'] ) ) ? $field['default'] : $default;
265
+ $default = ( isset( $options[ $field['id'] ] ) ) ? $options[ $field['id'] ] : $default;
266
+
267
+ return $default;
268
+
269
+ }
270
+
271
+ // save defaults and set new fields value to main options.
272
+ public function save_defaults() {
273
+
274
+ $tmp_options = $this->options;
275
+
276
+ foreach ( $this->pre_fields as $field ) {
277
+ if ( ! empty( $field['id'] ) ) {
278
+ $this->options[ $field['id'] ] = $this->get_default( $field, $this->options );
279
+ }
280
+ }
281
+
282
+ if ( $this->args['save_defaults'] && empty( $tmp_options ) ) {
283
+ $this->save_options( $this->options );
284
+ }
285
+
286
+ }
287
+
288
+ // set options.
289
+ public function set_options() {
290
+
291
+ if ( wp_verify_nonce( spf_get_var( 'spf_options_nonce' ), 'spf_options_nonce' ) ) {
292
+
293
+ $request = spf_get_var( $this->unique, array() );
294
+ $transient = spf_get_var( 'spf_transient' );
295
+ $section_id = ( ! empty( $transient['section'] ) ) ? $transient['section'] : '';
296
+
297
+ // import data.
298
+ if ( ! empty( $transient['spf_import_data'] ) ) {
299
+
300
+ $import_data = json_decode( stripslashes( trim( $transient['spf_import_data'] ) ), true );
301
+ $request = ( is_array( $import_data ) ) ? $import_data : array();
302
+
303
+ $this->notice = esc_html__( 'Success. Imported backup options.', 'wp-carousel-free' );
304
+
305
+ } elseif ( ! empty( $transient['reset'] ) ) {
306
+
307
+ foreach ( $this->pre_fields as $field ) {
308
+ if ( ! empty( $field['id'] ) ) {
309
+ $request[ $field['id'] ] = $this->get_default( $field );
310
+ }
311
+ }
312
+
313
+ $this->notice = esc_html__( 'Default options restored.', 'wp-carousel-free' );
314
+
315
+ } elseif ( ! empty( $transient['reset_section'] ) && ! empty( $section_id ) ) {
316
+
317
+ if ( ! empty( $this->pre_sections[ $section_id - 1 ]['fields'] ) ) {
318
+
319
+ foreach ( $this->pre_sections[ $section_id - 1 ]['fields'] as $field ) {
320
+ if ( ! empty( $field['id'] ) ) {
321
+ $request[ $field['id'] ] = $this->get_default( $field );
322
+ }
323
+ }
324
+ }
325
+
326
+ $this->notice = esc_html__( 'Default options restored for only this section.', 'wp-carousel-free' );
327
+
328
+ } else {
329
+
330
+ // sanitize and validate.
331
+ foreach ( $this->pre_fields as $field ) {
332
+
333
+ if ( ! empty( $field['id'] ) ) {
334
+
335
+ // sanitize.
336
+ if ( ! empty( $field['sanitize'] ) ) {
337
+
338
+ $sanitize = $field['sanitize'];
339
+ $value_sanitize = isset( $request[ $field['id'] ] ) ? $request[ $field['id'] ] : '';
340
+ $request[ $field['id'] ] = call_user_func( $sanitize, $value_sanitize );
341
+
342
+ }
343
+
344
+ // validate.
345
+ if ( ! empty( $field['validate'] ) ) {
346
+
347
+ $value_validate = isset( $request[ $field['id'] ] ) ? $request[ $field['id'] ] : '';
348
+ $has_validated = call_user_func( $field['validate'], $value_validate );
349
+
350
+ if ( ! empty( $has_validated ) ) {
351
+ $request[ $field['id'] ] = ( isset( $this->options[ $field['id'] ] ) ) ? $this->options[ $field['id'] ] : '';
352
+ $this->errors[ $field['id'] ] = $has_validated;
353
+ }
354
+ }
355
+
356
+ // auto sanitize.
357
+ if ( ! isset( $request[ $field['id'] ] ) || is_null( $request[ $field['id'] ] ) ) {
358
+ $request[ $field['id'] ] = '';
359
+ }
360
+ }
361
+ }
362
+ }
363
+
364
+ // ignore nonce requests.
365
+ if ( isset( $request['_nonce'] ) ) {
366
+ unset( $request['_nonce'] ); }
367
+
368
+ $request = wp_unslash( $request );
369
+
370
+ $request = apply_filters( "spf_{$this->unique}_save", $request, $this );
371
+
372
+ do_action( "spf_{$this->unique}_save_before", $request, $this );
373
+
374
+ $this->options = $request;
375
+
376
+ $this->save_options( $request );
377
+
378
+ do_action( "spf_{$this->unique}_save_after", $request, $this );
379
+
380
+ if ( empty( $this->notice ) ) {
381
+ $this->notice = esc_html__( 'Settings saved.', 'wp-carousel-free' );
382
+ }
383
+ }
384
+
385
+ return true;
386
+
387
+ }
388
+
389
+ // save options database.
390
+ public function save_options( $request ) {
391
+
392
+ if ( $this->args['database'] === 'transient' ) {
393
+ set_transient( $this->unique, $request, $this->args['transient_time'] );
394
+ } elseif ( $this->args['database'] === 'theme_mod' ) {
395
+ set_theme_mod( $this->unique, $request );
396
+ } elseif ( $this->args['database'] === 'network' ) {
397
+ update_site_option( $this->unique, $request );
398
+ } else {
399
+ update_option( $this->unique, $request );
400
+ }
401
+
402
+ do_action( "spf_{$this->unique}_saved", $request, $this );
403
+
404
+ }
405
+
406
+ // get options from database.
407
+ public function get_options() {
408
+
409
+ if ( $this->args['database'] === 'transient' ) {
410
+ $this->options = get_transient( $this->unique );
411
+ } elseif ( $this->args['database'] === 'theme_mod' ) {
412
+ $this->options = get_theme_mod( $this->unique );
413
+ } elseif ( $this->args['database'] === 'network' ) {
414
+ $this->options = get_site_option( $this->unique );
415
+ } else {
416
+ $this->options = get_option( $this->unique );
417
+ }
418
+
419
+ if ( empty( $this->options ) ) {
420
+ $this->options = array();
421
+ }
422
+
423
+ return $this->options;
424
+
425
+ }
426
+
427
+ // wp api: admin menu.
428
+ public function add_admin_menu() {
429
+
430
+ extract( $this->args );
431
+
432
+ if ( $menu_type === 'submenu' ) {
433
+
434
+ $menu_page = call_user_func( 'add_submenu_page', $menu_parent, $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'add_options_html' ) );
435
+
436
+ } else {
437
+
438
+ $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 );
439
+
440
+ if ( ! empty( $this->args['show_sub_menu'] ) && count( $this->pre_tabs ) > 1 ) {
441
+
442
+ // create submenus.
443
+ $tab_key = 1;
444
+ foreach ( $this->pre_tabs as $section ) {
445
+
446
+ call_user_func( 'add_submenu_page', $menu_slug, $section['title'], $section['title'], $menu_capability, $menu_slug . '#tab=' . $tab_key, '__return_null' );
447
+
448
+ if ( ! empty( $section['subs'] ) ) {
449
+ $tab_key += ( count( $section['subs'] ) - 1 );
450
+ }
451
+
452
+ $tab_key++;
453
+
454
+ }
455
+
456
+ remove_submenu_page( $menu_slug, $menu_slug );
457
+
458
+ }
459
+
460
+ if ( ! empty( $menu_hidden ) ) {
461
+ remove_menu_page( $menu_slug );
462
+ }
463
+ }
464
+
465
+ add_action( 'load-' . $menu_page, array( &$this, 'add_page_on_load' ) );
466
+
467
+ }
468
+
469
+ public function add_page_on_load() {
470
+
471
+ if ( ! empty( $this->args['contextual_help'] ) ) {
472
+
473
+ $screen = get_current_screen();
474
+
475
+ foreach ( $this->args['contextual_help'] as $tab ) {
476
+ $screen->add_help_tab( $tab );
477
+ }
478
+
479
+ if ( ! empty( $this->args['contextual_help_sidebar'] ) ) {
480
+ $screen->set_help_sidebar( $this->args['contextual_help_sidebar'] );
481
+ }
482
+ }
483
+
484
+ add_filter( 'admin_footer_text', array( &$this, 'add_admin_footer_text' ) );
485
+
486
+ }
487
+
488
+ public function add_admin_footer_text() {
489
+ $default = 'Thank you for creating with <a href="http://codestarframework.com/" target="_blank">Codestar Framework</a>';
490
+ echo ( ! empty( $this->args['footer_credit'] ) ) ? $this->args['footer_credit'] : $default;
491
+ }
492
+
493
+ public function error_check( $sections, $err = '' ) {
494
+
495
+ if ( ! $this->args['ajax_save'] ) {
496
+
497
+ if ( ! empty( $sections['fields'] ) ) {
498
+ foreach ( $sections['fields'] as $field ) {
499
+ if ( ! empty( $field['id'] ) ) {
500
+ if ( array_key_exists( $field['id'], $this->errors ) ) {
501
+ $err = '<span class="spf-label-error">!</span>';
502
+ }
503
+ }
504
+ }
505
+ }
506
+
507
+ if ( ! empty( $sections['subs'] ) ) {
508
+ foreach ( $sections['subs'] as $sub ) {
509
+ $err = $this->error_check( $sub, $err );
510
+ }
511
+ }
512
+
513
+ if ( ! empty( $sections['id'] ) && array_key_exists( $sections['id'], $this->errors ) ) {
514
+ $err = $this->errors[ $sections['id'] ];
515
+ }
516
+ }
517
+
518
+ return $err;
519
+ }
520
+
521
+ /**
522
+ * Option page html output.
523
+ *
524
+ * @return void
525
+ */
526
+ public function add_options_html() {
527
+
528
+ $has_nav = ( count( $this->pre_tabs ) > 1 ) ? true : false;
529
+ $show_all = ( ! $has_nav ) ? ' spf-show-all' : '';
530
+ $ajax_class = ( $this->args['ajax_save'] ) ? ' spf-save-ajax' : '';
531
+ $sticky_class = ( $this->args['sticky_header'] ) ? ' spf-sticky-header' : '';
532
+ $wrapper_class = ( $this->args['framework_class'] ) ? ' ' . $this->args['framework_class'] : '';
533
+ echo '<div class="wrap"><h1>' . $this->args['menu_title'] . '</h1></div>';
534
+ echo '<div class="spf spf-theme-' . $this->args['theme'] . ' spf-options' . $wrapper_class . '" data-slug="' . $this->args['menu_slug'] . '" data-unique="' . $this->unique . '">';
535
+
536
+ $notice_class = ( ! empty( $this->notice ) ) ? ' spf-form-show' : '';
537
+ $notice_text = ( ! empty( $this->notice ) ) ? $this->notice : '';
538
+
539
+ echo '<div class="spf-form-result spf-form-success' . $notice_class . '">' . $notice_text . '</div>';
540
+
541
+ $error_class = ( ! empty( $this->errors ) ) ? ' spf-form-show' : '';
542
+
543
+ echo '<div class="spf-form-result spf-form-error' . $error_class . '">';
544
+ if ( ! empty( $this->errors ) ) {
545
+ foreach ( $this->errors as $error ) {
546
+ echo '<i class="spf-label-error">!</i> ' . $error . '<br />';
547
+ }
548
+ }
549
+ echo '</div>';
550
+
551
+ echo '<div class="spf-container">';
552
+
553
+ echo '<form method="post" action="" enctype="multipart/form-data" id="spf-form">';
554
+
555
+ echo '<input type="hidden" class="spf-section-id" name="spf_transient[section]" value="1">';
556
+ wp_nonce_field( 'spf_options_nonce', 'spf_options_nonce' );
557
+
558
+ echo '<div class="spf-header' . esc_attr( $sticky_class ) . '">';
559
+ echo '<div class="spf-header-inner">';
560
+
561
+ echo '<div class="spf-header-left">';
562
+ echo '<h1>' . $this->args['framework_title'] . '</h1>';
563
+ echo '</div>';
564
+
565
+ echo '<div class="spf-header-right">';
566
+
567
+ 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>' : '';
568
+
569
+ echo ( $this->args['show_search'] ) ? '<div class="spf-search"><input type="text" placeholder="' . esc_html__( 'Search option(s)', 'wp-carousel-free' ) . '" /></div>' : '';
570
+
571
+ echo '<div class="spf-buttons">';
572
+ echo '<input type="submit" name="' . $this->unique . '[_nonce][save]" class="button button-primary spf-save' . $ajax_class . '" value="' . esc_html__( 'Save', 'wp-carousel-free' ) . '" data-save="' . esc_html__( 'Saving...', 'wp-carousel-free' ) . '">';
573
+ 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' ) . '">' : '';
574
+ 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' ) . '">' : '';
575
+ echo '</div>';
576
+
577
+ echo '</div>';
578
+
579
+ echo '<div class="clear"></div>';
580
+ echo '</div>';
581
+ echo '</div>';
582
+
583
+ echo '<div class="spf-wrapper' . $show_all . '">';
584
+
585
+ if ( $has_nav ) {
586
+ echo '<div class="spf-nav spf-nav-options">';
587
+
588
+ echo '<ul>';
589
+
590
+ $tab_key = 1;
591
+
592
+ foreach ( $this->pre_tabs as $tab ) {
593
+
594
+ $tab_error = $this->error_check( $tab );
595
+ $tab_icon = ( ! empty( $tab['icon'] ) ) ? '<i class="' . $tab['icon'] . '"></i>' : '';
596
+
597
+ if ( ! empty( $tab['subs'] ) ) {
598
+
599
+ echo '<li class="spf-tab-depth-0">';
600
+
601
+ echo '<a href="#tab=' . $tab_key . '" class="spf-arrow">' . $tab_icon . $tab['title'] . $tab_error . '</a>';
602
+
603
+ echo '<ul>';
604
+
605
+ foreach ( $tab['subs'] as $sub ) {
606
+
607
+ $sub_error = $this->error_check( $sub );
608
+ $sub_icon = ( ! empty( $sub['icon'] ) ) ? '<i class="' . $sub['icon'] . '"></i>' : '';
609
+
610
+ echo '<li class="spf-tab-depth-1"><a id="spf-tab-link-' . $tab_key . '" href="#tab=' . $tab_key . '">' . $sub_icon . $sub['title'] . $sub_error . '</a></li>';
611
+
612
+ $tab_key++;
613
+ }
614
+
615
+ echo '</ul>';
616
+
617
+ echo '</li>';
618
+
619
+ } else {
620
+
621
+ echo '<li class="spf-tab-depth-0"><a id="spf-tab-link-' . $tab_key . '" href="#tab=' . $tab_key . '">' . $tab_icon . $tab['title'] . $tab_error . '</a></li>';
622
+
623
+ $tab_key++;
624
+ }
625
+ }
626
+
627
+ echo '</ul>';
628
+
629
+ echo '</div>';
630
+
631
+ }
632
+
633
+ echo '<div class="spf-content">';
634
+
635
+ echo '<div class="spf-sections">';
636
+
637
+ $section_key = 1;
638
+
639
+ foreach ( $this->pre_sections as $section ) {
640
+
641
+ $onload = ( ! $has_nav ) ? ' spf-onload' : '';
642
+ $section_icon = ( ! empty( $section['icon'] ) ) ? '<i class="spf-icon ' . $section['icon'] . '"></i>' : '';
643
+
644
+ echo '<div id="spf-section-' . $section_key . '" class="spf-section' . $onload . '">';
645
+ echo ( $has_nav ) ? '<div class="spf-section-title"><h3>' . $section_icon . $section['title'] . '</h3></div>' : '';
646
+ echo ( ! empty( $section['description'] ) ) ? '<div class="spf-field spf-section-description">' . $section['description'] . '</div>' : '';
647
+
648
+ if ( ! empty( $section['fields'] ) ) {
649
+
650
+ foreach ( $section['fields'] as $field ) {
651
+
652
+ $is_field_error = $this->error_check( $field );
653
+
654
+ if ( ! empty( $is_field_error ) ) {
655
+ $field['_error'] = $is_field_error;
656
+ }
657
+
658
+ $value = ( ! empty( $field['id'] ) && isset( $this->options[ $field['id'] ] ) ) ? $this->options[ $field['id'] ] : '';
659
+
660
+ SP_WPCF::field( $field, $value, $this->unique, 'options' );
661
+
662
+ }
663
+ } else {
664
+
665
+ echo '<div class="spf-no-option spf-text-muted">' . esc_html__( 'No option provided by developer.', 'wp-carousel-free' ) . '</div>';
666
+
667
+ }
668
+
669
+ echo '</div>';
670
+
671
+ $section_key++;
672
+ }
673
+
674
+ echo '</div>';
675
+
676
+ echo '<div class="clear"></div>';
677
+
678
+ echo '</div>';
679
+
680
+ echo '<div class="spf-nav-background"></div>';
681
+
682
+ echo '</div>';
683
+
684
+ if ( ! empty( $this->args['show_footer'] ) ) {
685
+
686
+ echo '<div class="spf-footer">';
687
+
688
+ echo '<div class="spf-buttons">';
689
+ echo '<input type="submit" name="spf_transient[save]" class="button button-primary spf-save' . $ajax_class . '" value="' . esc_html__( 'Save', 'wp-carousel-free' ) . '" data-save="' . esc_html__( 'Saving...', 'wp-carousel-free' ) . '">';
690
+ 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' ) . '">' : '';
691
+ 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' ) . '">' : '';
692
+ echo '</div>';
693
+
694
+ echo ( ! empty( $this->args['footer_text'] ) ) ? '<div class="spf-copyright">' . $this->args['footer_text'] . '</div>' : '';
695
+
696
+ echo '<div class="clear"></div>';
697
+ echo '</div>';
698
+
699
+ }
700
+
701
+ echo '</form>';
702
+
703
+ echo '</div>';
704
+
705
+ echo '<div class="clear"></div>';
706
+
707
+ echo ( ! empty( $this->args['footer_after'] ) ) ? $this->args['footer_after'] : '';
708
+
709
+ echo '</div>';
710
+
711
+ }
712
+ }
713
+ }
admin/views/wpcfree-metabox/classes/setup.class.php ADDED
@@ -0,0 +1,382 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Setup Class
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SP_WPCF' ) ) {
11
+ class SP_WPCF {
12
+
13
+ /**
14
+ * Constants.
15
+ *
16
+ * @var string
17
+ */
18
+ public static $version = '2.0.6';
19
+ public static $premium = true;
20
+ public static $dir = null;
21
+ public static $url = null;
22
+ public static $inited = array();
23
+ public static $fields = array();
24
+ public static $args = array(
25
+ 'options' => array(),
26
+ 'customize_options' => array(),
27
+ 'metaboxes' => array(),
28
+ 'shortcoders' => array(),
29
+ 'taxonomy_options' => array(),
30
+ 'widgets' => array(),
31
+ );
32
+
33
+ // shortcode instances.
34
+ public static $shortcode_instances = array();
35
+
36
+ // init.
37
+ public static function init() {
38
+
39
+ // init action.
40
+ do_action( 'spf_init' );
41
+
42
+ // set constants.
43
+ self::constants();
44
+
45
+ // include files.
46
+ self::includes();
47
+
48
+ add_action( 'after_setup_theme', array( 'SP_WPCF', 'setup' ) );
49
+ add_action( 'init', array( 'SP_WPCF', 'setup' ) );
50
+ add_action( 'switch_theme', array( 'SP_WPCF', 'setup' ) );
51
+ add_action( 'admin_enqueue_scripts', array( 'SP_WPCF', 'add_admin_enqueue_scripts' ), 20 );
52
+
53
+ }
54
+
55
+ // setup.
56
+ public static function setup() {
57
+
58
+ // setup options.
59
+ $params = array();
60
+ if ( ! empty( self::$args['options'] ) ) {
61
+ foreach ( self::$args['options'] as $key => $value ) {
62
+ if ( ! empty( self::$args['sections'][ $key ] ) && ! isset( self::$inited[ $key ] ) ) {
63
+
64
+ $params['args'] = $value;
65
+ $params['sections'] = self::$args['sections'][ $key ];
66
+ self::$inited[ $key ] = true;
67
+
68
+ SP_WPCF_Options::instance( $key, $params );
69
+
70
+ if ( ! empty( $value['show_in_customizer'] ) ) {
71
+ self::$args['customize_options'][ $key ] = ( is_array( $value['show_in_customizer'] ) ) ? $value['show_in_customizer'] : $value;
72
+ }
73
+ }
74
+ }
75
+ }
76
+
77
+
78
+ // setup metaboxes.
79
+ $params = array();
80
+ if ( ! empty( self::$args['metaboxes'] ) ) {
81
+ foreach ( self::$args['metaboxes'] as $key => $value ) {
82
+ if ( ! empty( self::$args['sections'][ $key ] ) && ! isset( self::$inited[ $key ] ) ) {
83
+
84
+ $params['args'] = $value;
85
+ $params['sections'] = self::$args['sections'][ $key ];
86
+ self::$inited[ $key ] = true;
87
+
88
+ SP_WPCF_Metabox::instance( $key, $params );
89
+
90
+ }
91
+ }
92
+ }
93
+
94
+ // setup taxonomy options.
95
+ $params = array();
96
+ if ( ! empty( self::$args['taxonomy_options'] ) ) {
97
+ foreach ( self::$args['taxonomy_options'] as $key => $value ) {
98
+ if ( ! empty( self::$args['sections'][ $key ] ) && ! isset( self::$inited[ $key ] ) ) {
99
+
100
+ $params['args'] = $value;
101
+ $params['sections'] = self::$args['sections'][ $key ];
102
+ self::$inited[ $key ] = true;
103
+
104
+ SP_WPCF_Taxonomy_Options::instance( $key, $params );
105
+
106
+ }
107
+ }
108
+ }
109
+
110
+ do_action( 'spf_loaded' );
111
+
112
+ }
113
+
114
+ // create options.
115
+ public static function createOptions( $id, $args = array() ) {
116
+ self::$args['options'][ $id ] = $args;
117
+ }
118
+
119
+ // create metabox options.
120
+ public static function createMetabox( $id, $args = array() ) {
121
+ self::$args['metaboxes'][ $id ] = $args;
122
+ }
123
+
124
+ // create section.
125
+ public static function createSection( $id, $sections ) {
126
+ self::$args['sections'][ $id ][] = $sections;
127
+ self::set_used_fields( $sections );
128
+ }
129
+
130
+ // constants.
131
+ public static function constants() {
132
+
133
+ // we need this path-finder code for set URL of framework.
134
+ $dirname = wp_normalize_path( dirname( dirname( __FILE__ ) ) );
135
+ $theme_dir = wp_normalize_path( get_theme_file_path() );
136
+ $plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
137
+ $located_plugin = ( preg_match( '#' . self::sanitize_dirname( $plugin_dir ) . '#', self::sanitize_dirname( $dirname ) ) ) ? true : false;
138
+ $directory = ( $located_plugin ) ? $plugin_dir : $theme_dir;
139
+ $directory_uri = ( $located_plugin ) ? WP_PLUGIN_URL : get_theme_file_uri();
140
+ $foldername = str_replace( $directory, '', $dirname );
141
+
142
+ self::$dir = $dirname;
143
+ self::$url = $directory_uri . $foldername;
144
+
145
+ }
146
+
147
+ public static function include_plugin_file( $file, $load = true ) {
148
+
149
+ $path = '';
150
+ $file = ltrim( $file, '/' );
151
+ $override = apply_filters( 'spf_override', 'spf-override' );
152
+
153
+ if ( file_exists( get_parent_theme_file_path( $override . '/' . $file ) ) ) {
154
+ $path = get_parent_theme_file_path( $override . '/' . $file );
155
+ } elseif ( file_exists( get_theme_file_path( $override . '/' . $file ) ) ) {
156
+ $path = get_theme_file_path( $override . '/' . $file );
157
+ } elseif ( file_exists( self::$dir . '/' . $override . '/' . $file ) ) {
158
+ $path = self::$dir . '/' . $override . '/' . $file;
159
+ } elseif ( file_exists( self::$dir . '/' . $file ) ) {
160
+ $path = self::$dir . '/' . $file;
161
+ }
162
+
163
+ if ( ! empty( $path ) && ! empty( $file ) && $load ) {
164
+
165
+ global $wp_query;
166
+
167
+ if ( is_object( $wp_query ) && function_exists( 'load_template' ) ) {
168
+
169
+ load_template( $path, true );
170
+
171
+ } else {
172
+
173
+ require_once $path;
174
+
175
+ }
176
+ } else {
177
+
178
+ return self::$dir . '/' . $file;
179
+
180
+ }
181
+
182
+ }
183
+
184
+ public static function is_active_plugin( $file = '' ) {
185
+ return in_array( $file, (array) get_option( 'active_plugins', array() ) );
186
+ }
187
+
188
+ // Sanitize dirname.
189
+ public static function sanitize_dirname( $dirname ) {
190
+ return preg_replace( '/[^A-Za-z]/', '', $dirname );
191
+ }
192
+
193
+ // Set plugin url.
194
+ public static function include_plugin_url( $file ) {
195
+ return self::$url . '/' . ltrim( $file, '/' );
196
+ }
197
+
198
+ // General includes.
199
+ public static function includes() {
200
+
201
+ // includes helpers.
202
+ self::include_plugin_file( 'functions/actions.php' );
203
+ self::include_plugin_file( 'functions/deprecated.php' );
204
+ self::include_plugin_file( 'functions/helpers.php' );
205
+ self::include_plugin_file( 'functions/sanitize.php' );
206
+ self::include_plugin_file( 'functions/validate.php' );
207
+
208
+ // includes free version classes.
209
+ self::include_plugin_file( 'classes/abstract.class.php' );
210
+ self::include_plugin_file( 'classes/fields.class.php' );
211
+ self::include_plugin_file( 'classes/options.class.php' );
212
+
213
+ // includes premium version classes.
214
+ if ( self::$premium ) {
215
+ self::include_plugin_file( 'classes/metabox.class.php' );
216
+
217
+ }
218
+
219
+ }
220
+
221
+ // Include field.
222
+ public static function maybe_include_field( $type = '' ) {
223
+ if ( ! class_exists( 'SP_WPCF_Field_' . $type ) && class_exists( 'SP_WPCF_Fields' ) ) {
224
+ self::include_plugin_file( 'fields/' . $type . '/' . $type . '.php' );
225
+ }
226
+ }
227
+
228
+
229
+ // Get all of fields.
230
+ public static function set_used_fields( $sections ) {
231
+
232
+ if ( ! empty( $sections['fields'] ) ) {
233
+
234
+ foreach ( $sections['fields'] as $field ) {
235
+
236
+ if ( ! empty( $field['fields'] ) ) {
237
+ self::set_used_fields( $field );
238
+ }
239
+
240
+ if ( ! empty( $field['type'] ) ) {
241
+ self::$fields[ $field['type'] ] = $field;
242
+ }
243
+ }
244
+ }
245
+
246
+ }
247
+
248
+ //
249
+ // Enqueue admin and fields styles and scripts.
250
+ public static function add_admin_enqueue_scripts() {
251
+ $current_screen = get_current_screen();
252
+ $the_current_post_type = $current_screen->post_type;
253
+ if ( 'sp_wp_carousel' === $the_current_post_type ) {
254
+
255
+ // check for developer mode
256
+ $min = ( apply_filters( 'spf_dev_mode', false ) || WP_DEBUG ) ? '' : '.min';
257
+
258
+ // admin utilities.
259
+ wp_enqueue_media();
260
+
261
+ // wp color picker.
262
+ wp_enqueue_style( 'wp-color-picker' );
263
+ wp_enqueue_script( 'wp-color-picker' );
264
+
265
+ // framework core styles
266
+ wp_enqueue_style( 'spf', self::include_plugin_url( 'assets/css/spf' . $min . '.css' ), array(), '1.0.0', 'all' );
267
+
268
+ // rtl styles.
269
+ if ( is_rtl() ) {
270
+ wp_enqueue_style( 'spf-rtl', self::include_plugin_url( 'assets/css/spf-rtl' . $min . '.css' ), array(), '1.0.0', 'all' );
271
+ }
272
+
273
+ // framework core scripts.
274
+ wp_enqueue_script( 'spf-plugins', self::include_plugin_url( 'assets/js/spf-plugins' . $min . '.js' ), array(), '1.0.0', true );
275
+ wp_enqueue_script( 'spf', self::include_plugin_url( 'assets/js/spf' . $min . '.js' ), array( 'spf-plugins' ), '1.0.0', true );
276
+
277
+ wp_localize_script(
278
+ 'spf',
279
+ 'spf_vars',
280
+ array(
281
+ 'color_palette' => apply_filters( 'spf_color_palette', array() ),
282
+ 'i18n' => array(
283
+ 'confirm' => esc_html__( 'Are you sure?', 'wp-carousel-free' ),
284
+ 'reset_notification' => esc_html__( 'Restoring options.', 'wp-carousel-free' ),
285
+ 'import_notification' => esc_html__( 'Importing options.', 'wp-carousel-free' ),
286
+ ),
287
+ )
288
+ );
289
+
290
+ // load admin enqueue scripts and styles.
291
+ $enqueued = array();
292
+
293
+ if ( ! empty( self::$fields ) ) {
294
+ foreach ( self::$fields as $field ) {
295
+ if ( ! empty( $field['type'] ) ) {
296
+ $classname = 'SP_WPCF_Field_' . $field['type'];
297
+ self::maybe_include_field( $field['type'] );
298
+ if ( class_exists( $classname ) && method_exists( $classname, 'enqueue' ) ) {
299
+ $instance = new $classname( $field );
300
+ if ( method_exists( $classname, 'enqueue' ) ) {
301
+ $instance->enqueue();
302
+ }
303
+ unset( $instance );
304
+ }
305
+ }
306
+ }
307
+ }
308
+
309
+ do_action( 'spf_enqueue' );
310
+ } // Check screen ID.
311
+
312
+ }
313
+
314
+ //
315
+ // Add a new framework field.
316
+ public static function field( $field = array(), $value = '', $unique = '', $where = '', $parent = '' ) {
317
+
318
+ // Check for unallow fields.
319
+ if ( ! empty( $field['_notice'] ) ) {
320
+
321
+ $field_type = $field['type'];
322
+
323
+ $field = array();
324
+ $field['content'] = sprintf( esc_html__( 'Ooops! This field type (%s) can not be used here, yet.', 'wp-carousel-free' ), '<strong>' . $field_type . '</strong>' );
325
+ $field['type'] = 'notice';
326
+ $field['style'] = 'danger';
327
+
328
+ }
329
+
330
+ $depend = '';
331
+ $hidden = '';
332
+ $unique = ( ! empty( $unique ) ) ? $unique : '';
333
+ $class = ( ! empty( $field['class'] ) ) ? ' ' . $field['class'] : '';
334
+ $is_pseudo = ( ! empty( $field['pseudo'] ) ) ? ' spf-pseudo-field' : '';
335
+ $field_type = ( ! empty( $field['type'] ) ) ? $field['type'] : '';
336
+
337
+ if ( ! empty( $field['dependency'] ) ) {
338
+ $hidden = ' hidden';
339
+ $depend .= ' data-controller="' . $field['dependency'][0] . '"';
340
+ $depend .= ' data-condition="' . $field['dependency'][1] . '"';
341
+ $depend .= ' data-value="' . $field['dependency'][2] . '"';
342
+ $depend .= ( ! empty( $field['dependency'][3] ) ) ? ' data-depend-global="true"' : '';
343
+ }
344
+
345
+ if ( ! empty( $field_type ) ) {
346
+
347
+ echo '<div class="spf-field spf-field-' . $field_type . $is_pseudo . $class . $hidden . '"' . $depend . '>';
348
+
349
+ if ( ! empty( $field['title'] ) ) {
350
+ $subtitle = ( ! empty( $field['subtitle'] ) ) ? '<p class="spf-text-subtitle">' . $field['subtitle'] . '</p>' : '';
351
+ echo '<div class="spf-title"><h4>' . $field['title'] . '</h4>' . $subtitle . '</div>';
352
+ }
353
+
354
+ echo ( ! empty( $field['title'] ) ) ? '<div class="spf-fieldset">' : '';
355
+
356
+ $value = ( ! isset( $value ) && isset( $field['default'] ) ) ? $field['default'] : $value;
357
+ $value = ( isset( $field['value'] ) ) ? $field['value'] : $value;
358
+
359
+ self::maybe_include_field( $field_type );
360
+
361
+ $classname = 'SP_WPCF_Field_' . $field_type;
362
+
363
+ if ( class_exists( $classname ) ) {
364
+ $instance = new $classname( $field, $value, $unique, $where, $parent );
365
+ $instance->render();
366
+ } else {
367
+ echo '<p>' . esc_html__( 'This field class is not available!', 'wp-carousel-free' ) . '</p>';
368
+ }
369
+ } else {
370
+ echo '<p>' . esc_html__( 'This type is not found!', 'wp-carousel-free' ) . '</p>';
371
+ }
372
+
373
+ echo ( ! empty( $field['title'] ) ) ? '</div>' : '';
374
+ echo '<div class="clear"></div>';
375
+ echo '</div>';
376
+
377
+ }
378
+
379
+ }
380
+
381
+ SP_WPCF::init();
382
+ }
admin/views/wpcfree-metabox/classes/widgets.class.php ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ // constans
14
+ public $unique = '';
15
+ public $args = array(
16
+ 'title' => '',
17
+ 'classname' => '',
18
+ 'description' => '',
19
+ 'width' => '',
20
+ 'defaults' => array(),
21
+ 'fields' => array(),
22
+ );
23
+
24
+ public function __construct( $key, $params ) {
25
+
26
+ $widget_ops = array();
27
+ $control_ops = array();
28
+
29
+ $this->unique = $key;
30
+ $this->args = apply_filters( "spf_{$this->unique}_args", wp_parse_args( $params, $this->args ), $this );
31
+
32
+ // Set control options
33
+ if ( ! empty( $this->args['width'] ) ) {
34
+ $control_ops['width'] = $this->args['width'];
35
+ }
36
+
37
+ // Set widget options
38
+ if ( ! empty( $this->args['description'] ) ) {
39
+ $widget_ops['description'] = $this->args['description'];
40
+ }
41
+
42
+ if ( ! empty( $this->args['classname'] ) ) {
43
+ $widget_ops['classname'] = $this->args['classname'];
44
+ }
45
+
46
+ // Set filters
47
+ $widget_ops = apply_filters( "spf_{$this->unique}_widget_ops", $widget_ops, $this );
48
+ $control_ops = apply_filters( "spf_{$this->unique}_control_ops", $control_ops, $this );
49
+
50
+ parent::__construct( $this->unique, $this->args['title'], $widget_ops, $control_ops );
51
+
52
+ }
53
+
54
+ // Register widget with WordPress
55
+ public static function instance( $key, $params = array() ) {
56
+ return new self( $key, $params );
57
+ }
58
+
59
+ // Front-end display of widget.
60
+ public function widget( $args, $instance ) {
61
+ call_user_func( $this->unique, $args, $instance );
62
+ }
63
+
64
+ // get default value
65
+ public function get_default( $field, $options = array() ) {
66
+
67
+ $default = ( isset( $this->args['defaults'][ $field['id'] ] ) ) ? $this->args['defaults'][ $field['id'] ] : '';
68
+ $default = ( isset( $field['default'] ) ) ? $field['default'] : $default;
69
+ $default = ( isset( $options[ $field['id'] ] ) ) ? $options[ $field['id'] ] : $default;
70
+
71
+ return $default;
72
+
73
+ }
74
+
75
+ // Back-end widget form.
76
+ public function form( $instance ) {
77
+
78
+ if ( ! empty( $this->args['fields'] ) ) {
79
+
80
+ echo '<div class="spf spf-widgets spf-fields">';
81
+
82
+ foreach ( $this->args['fields'] as $field ) {
83
+
84
+ $field_value = '';
85
+ $field_unique = '';
86
+
87
+ if ( ! empty( $field['id'] ) ) {
88
+
89
+ $field_value = $this->get_default( $field, $instance );
90
+ $field_unique = 'widget-' . $this->unique . '[' . $this->number . ']';
91
+
92
+ if ( $field['id'] === 'title' ) {
93
+ $field['attributes']['id'] = 'widget-' . $this->unique . '-' . $this->number . '-title';
94
+ }
95
+ }
96
+
97
+ SP_WPCF::field( $field, $field_value, $field_unique );
98
+
99
+ }
100
+
101
+ echo '</div>';
102
+
103
+ }
104
+
105
+ }
106
+
107
+ // Sanitize widget form values as they are saved.
108
+ public function update( $new_instance, $old_instance ) {
109
+
110
+ $new_instance = apply_filters( "spf_{$this->unique}_save", $new_instance, $this->args, $this );
111
+
112
+ do_action( "spf_{$this->unique}_save_before", $new_instance, $this->args, $this );
113
+
114
+ return $new_instance;
115
+
116
+ }
117
+ }
118
+ }
admin/views/wpcfree-metabox/fields/backup/backup.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
+ /**
3
+ *
4
+ * Field: backup
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ */
10
+ if( ! class_exists( 'SP_WPCF_Field_backup' ) ) {
11
+ class SP_WPCF_Field_backup extends SP_WPCF_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $unique = $this->unique;
20
+ $nonce = wp_create_nonce( 'spf_backup_nonce' );
21
+ $export = add_query_arg( array( 'action' => 'spf-export', 'export' => $unique, 'nonce' => $nonce ), admin_url( 'admin-ajax.php' ) );
22
+
23
+ echo $this->field_before();
24
+
25
+ echo '<textarea name="spf_transient[spf_import_data]" class="spf-import-data"></textarea>';
26
+ echo '<button type="submit" class="button button-primary spf-confirm spf-import" data-unique="'. $unique .'" data-nonce="'. $nonce .'">'. esc_html__( 'Import', 'wp-carousel-free' ) .'</button>';
27
+ echo '<small>( '. esc_html__( 'copy-paste your backup string here', 'wp-carousel-free' ).' )</small>';
28
+
29
+ echo '<hr />';
30
+ echo '<textarea readonly="readonly" class="spf-export-data">'. json_encode( get_option( $unique ) ) .'</textarea>';
31
+
32
+ echo '<a href="'. esc_url( $export ) .'" class="button button-primary spf-export" target="_blank">'. esc_html__( 'Export and Download Backup', 'wp-carousel-free' ) .'</a>';
33
+ echo '<hr />';
34
+ echo '<button type="submit" name="spf_transient[spf_reset_all]" value="spf_reset_all" class="button button-primary spf-warning-primary spf-confirm spf-reset" data-unique="'. $unique .'" data-nonce="'. $nonce .'">'. esc_html__( 'Reset All', 'wp-carousel-free' ) .'</button>';
35
+ echo '<small class="spf-text-error">'. esc_html__( 'Please be sure for reset all of options.', 'wp-carousel-free' ) .'</small>';
36
+
37
+ echo $this->field_after();
38
+
39
+ }
40
+
41
+ }
42
+ }
admin/views/wpcfree-metabox/fields/border/border.php ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args(
20
+ $this->field,
21
+ array(
22
+ 'top_icon' => '<i class="fa fa-long-arrow-up"></i>',
23
+ 'left_icon' => '<i class="fa fa-long-arrow-left"></i>',
24
+ 'bottom_icon' => '<i class="fa fa-long-arrow-down"></i>',
25
+ 'right_icon' => '<i class="fa fa-long-arrow-right"></i>',
26
+ 'all_icon' => '<i class="fa fa-arrows"></i>',
27
+ 'top_placeholder' => esc_html__( 'top', 'wp-carousel-free' ),
28
+ 'right_placeholder' => esc_html__( 'right', 'wp-carousel-free' ),
29
+ 'bottom_placeholder' => esc_html__( 'bottom', 'wp-carousel-free' ),
30
+ 'left_placeholder' => esc_html__( 'left', 'wp-carousel-free' ),
31
+ 'all_placeholder' => esc_html__( 'all', 'wp-carousel-free' ),
32
+ 'top' => true,
33
+ 'left' => true,
34
+ 'bottom' => true,
35
+ 'right' => true,
36
+ 'all' => false,
37
+ 'color' => true,
38
+ 'style' => true,
39
+ 'unit' => 'px',
40
+ 'min' => '0',
41
+ )
42
+ );
43
+
44
+ $default_value = array(
45
+ 'top' => '',
46
+ 'right' => '',
47
+ 'bottom' => '',
48
+ 'left' => '',
49
+ 'color' => '',
50
+ 'style' => 'solid',
51
+ 'all' => '',
52
+ 'min' => '',
53
+ );
54
+
55
+ $border_props = array(
56
+ 'solid' => esc_html__( 'Solid', 'wp-carousel-free' ),
57
+ 'dashed' => esc_html__( 'Dashed', 'wp-carousel-free' ),
58
+ 'dotted' => esc_html__( 'Dotted', 'wp-carousel-free' ),
59
+ 'double' => esc_html__( 'Double', 'wp-carousel-free' ),
60
+ 'inset' => esc_html__( 'Inset', 'wp-carousel-free' ),
61
+ 'outset' => esc_html__( 'Outset', 'wp-carousel-free' ),
62
+ 'groove' => esc_html__( 'Groove', 'wp-carousel-free' ),
63
+ 'ridge' => esc_html__( 'ridge', 'wp-carousel-free' ),
64
+ 'none' => esc_html__( 'None', 'wp-carousel-free' ),
65
+ );
66
+
67
+ $default_value = ( ! empty( $this->field['default'] ) ) ? wp_parse_args( $this->field['default'], $default_value ) : $default_value;
68
+
69
+ $value = wp_parse_args( $this->value, $default_value );
70
+
71
+ echo $this->field_before();
72
+
73
+ $min = ( isset( $args['min'] ) ) ? ' min="' . $args['min'] . '"' : '';
74
+
75
+ if ( ! empty( $args['all'] ) ) {
76
+
77
+ $placeholder = ( ! empty( $args['all_placeholder'] ) ) ? ' placeholder="' . $args['all_placeholder'] . '"' : '';
78
+
79
+ echo '<div class="spf--left spf--input">';
80
+ echo ( ! empty( $args['all_icon'] ) ) ? '<span class="spf--label spf--label-icon">' . $args['all_icon'] . '</span>' : '';
81
+ echo '<input type="number" name="' . $this->field_name( '[all]' ) . '" value="' . $value['all'] . '"' . $placeholder . $min . ' class="spf-number" />';
82
+ echo ( ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--label-unit">' . $args['unit'] . '</span>' : '';
83
+ echo '</div>';
84
+
85
+ } else {
86
+
87
+ $properties = array();
88
+
89
+ foreach ( array( 'top', 'right', 'bottom', 'left' ) as $prop ) {
90
+ if ( ! empty( $args[ $prop ] ) ) {
91
+ $properties[] = $prop;
92
+ }
93
+ }
94
+
95
+ $properties = ( $properties === array( 'right', 'left' ) ) ? array_reverse( $properties ) : $properties;
96
+
97
+ foreach ( $properties as $property ) {
98
+
99
+ $placeholder = ( ! empty( $args[ $property . '_placeholder' ] ) ) ? ' placeholder="' . $args[ $property . '_placeholder' ] . '"' : '';
100
+
101
+ echo '<div class="spf--left spf--input">';
102
+ echo ( ! empty( $args[ $property . '_icon' ] ) ) ? '<span class="spf--label spf--label-icon">' . $args[ $property . '_icon' ] . '</span>' : '';
103
+ echo '<input type="number" name="' . $this->field_name( '[' . $property . ']' ) . '" value="' . $value[ $property ] . '"' . $placeholder . $min . ' class="spf-number" />';
104
+ echo ( ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--label-unit">' . $args['unit'] . '</span>' : '';
105
+ echo '</div>';
106
+
107
+ }
108
+ }
109
+
110
+ if ( ! empty( $args['style'] ) ) {
111
+ echo '<div class="spf--left spf--input">';
112
+ echo '<select name="' . $this->field_name( '[style]' ) . '">';
113
+ foreach ( $border_props as $border_prop_key => $border_prop_value ) {
114
+ $selected = ( $value['style'] === $border_prop_key ) ? ' selected' : '';
115
+ echo '<option value="' . $border_prop_key . '"' . $selected . '>' . $border_prop_value . '</option>';
116
+ }
117
+ echo '</select>';
118
+ echo '</div>';
119
+ }
120
+
121
+ if ( ! empty( $args['color'] ) ) {
122
+ $default_color_attr = ( ! empty( $default_value['color'] ) ) ? ' data-default-color="' . $default_value['color'] . '"' : '';
123
+ echo '<div class="spf--left spf-field-color">';
124
+ echo '<input type="text" name="' . $this->field_name( '[color]' ) . '" value="' . $value['color'] . '" class="spf-color"' . $default_color_attr . ' />';
125
+ echo '</div>';
126
+ }
127
+
128
+ echo '<div class="clear"></div>';
129
+
130
+ echo $this->field_after();
131
+
132
+ }
133
+
134
+ public function output() {
135
+
136
+ $output = '';
137
+ $unit = ( ! empty( $this->value['unit'] ) ) ? $this->value['unit'] : 'px';
138
+ $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
139
+ $element = ( is_array( $this->field['output'] ) ) ? join( ',', $this->field['output'] ) : $this->field['output'];
140
+
141
+ // properties
142
+ $top = ( isset( $this->value['top'] ) && $this->value['top'] !== '' ) ? $this->value['top'] : '';
143
+ $right = ( isset( $this->value['right'] ) && $this->value['right'] !== '' ) ? $this->value['right'] : '';
144
+ $bottom = ( isset( $this->value['bottom'] ) && $this->value['bottom'] !== '' ) ? $this->value['bottom'] : '';
145
+ $left = ( isset( $this->value['left'] ) && $this->value['left'] !== '' ) ? $this->value['left'] : '';
146
+ $style = ( isset( $this->value['style'] ) && $this->value['style'] !== '' ) ? $this->value['style'] : '';
147
+ $color = ( isset( $this->value['color'] ) && $this->value['color'] !== '' ) ? $this->value['color'] : '';
148
+ $all = ( isset( $this->value['all'] ) && $this->value['all'] !== '' ) ? $this->value['all'] : '';
149
+
150
+ if ( ! empty( $this->field['all'] ) && ( $all !== '' || $color !== '' ) ) {
151
+
152
+ $output = $element . '{';
153
+ $output .= ( $all !== '' ) ? 'border-width:' . $all . $unit . $important . ';' : '';
154
+ $output .= ( $color !== '' ) ? 'border-color:' . $color . $important . ';' : '';
155
+ $output .= ( $style !== '' ) ? 'border-style:' . $style . $important . ';' : '';
156
+ $output .= '}';
157
+
158
+ } elseif ( $top !== '' || $right !== '' || $bottom !== '' || $left !== '' || $color !== '' ) {
159
+
160
+ $output = $element . '{';
161
+ $output .= ( $top !== '' ) ? 'border-top-width:' . $top . $unit . $important . ';' : '';
162
+ $output .= ( $right !== '' ) ? 'border-right-width:' . $right . $unit . $important . ';' : '';
163
+ $output .= ( $bottom !== '' ) ? 'border-bottom-width:' . $bottom . $unit . $important . ';' : '';
164
+ $output .= ( $left !== '' ) ? 'border-left-width:' . $left . $unit . $important . ';' : '';
165
+ $output .= ( $color !== '' ) ? 'border-color:' . $color . $important . ';' : '';
166
+ $output .= ( $style !== '' ) ? 'border-style:' . $style . $important . ';' : '';
167
+ $output .= '}';
168
+
169
+ }
170
+
171
+ $this->parent->output_css .= $output;
172
+
173
+ return $output;
174
+
175
+ }
176
+
177
+ }
178
+ }
admin/views/wpcfree-metabox/fields/button_set/button_set.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
+ /**
3
+ *
4
+ * Field: button_set
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ */
10
+ if( ! class_exists( 'SP_WPCF_Field_button_set' ) ) {
11
+ class SP_WPCF_Field_button_set extends SP_WPCF_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args( $this->field, array(
20
+ 'multiple' => false,
21
+ 'options' => array(),
22
+ ) );
23
+
24
+ $value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
25
+
26
+ echo $this->field_before();
27
+
28
+ if( ! empty( $args['options'] ) ) {
29
+
30
+ echo '<div class="spf-siblings spf--button-group" data-multiple="'. $args['multiple'] .'">';
31
+
32
+ foreach( $args['options'] as $key => $option ) {
33
+
34
+ $type = ( $args['multiple'] ) ? 'checkbox' : 'radio';
35
+ $extra = ( $args['multiple'] ) ? '[]' : '';
36
+ $active = ( in_array( $key, $value ) ) ? ' spf--active' : '';
37
+ $checked = ( in_array( $key, $value ) ) ? ' checked' : '';
38
+
39
+ echo '<div class="spf--sibling spf--button'. $active .'">';
40
+ echo '<input type="'. $type .'" name="'. $this->field_name( $extra ) .'" value="'. $key .'"'. $this->field_attributes() . $checked .'/>';
41
+ echo $option;
42
+ echo '</div>';
43
+
44
+ }
45
+
46
+ echo '</div>';
47
+
48
+ }
49
+
50
+ echo '<div class="clear"></div>';
51
+
52
+ echo $this->field_after();
53
+
54
+ }
55
+
56
+ }
57
+ }
admin/views/wpcfree-metabox/fields/carousel_type/carousel_type.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: image_select
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SP_WPCF_Field_carousel_type' ) ) {
11
+ class SP_WPCF_Field_carousel_type extends SP_WPCF_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args(
20
+ $this->field,
21
+ array(
22
+ 'multiple' => false,
23
+ 'options' => array(),
24
+ )
25
+ );
26
+
27
+ $value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
28
+
29
+ echo $this->field_before();
30
+
31
+ if ( ! empty( $args['options'] ) ) {
32
+
33
+ echo '<div class="spf-siblings spf--image-group" data-multiple="' . $args['multiple'] . '">';
34
+
35
+ $num = 1;
36
+
37
+ foreach ( $args['options'] as $key => $option ) {
38
+
39
+ $type = ( $args['multiple'] ) ? 'checkbox' : 'radio';
40
+ $extra = ( $args['multiple'] ) ? '[]' : '';
41
+ $active = ( in_array( $key, $value ) ) ? ' spf--active' : '';
42
+ $checked = ( in_array( $key, $value ) ) ? ' checked' : '';
43
+ $pro_only = isset( $option['pro_only'] ) ? ' disabled' : '';
44
+ $pro_only_text = isset( $option['pro_only'] ) ? '<strong class="ct-pro-only">' . esc_html__( 'PRO', 'wp-carousel-free' ) . '</strong>' : '';
45
+ echo '<div class="spf--sibling spf--image' . $active . '">';
46
+ echo '<label><input' . $pro_only . ' type="' . $type . '" name="' . $this->field_name( $extra ) . '" value="' . $key . '"' . $this->field_attributes() . $checked . '/>' . $pro_only_text . '<i class="' . $option['icon'] . '"></i><p class="sp-carousel-type">' . $option['text'] . '</p></label>';
47
+ echo '</div>';
48
+
49
+ }
50
+
51
+ echo '</div>';
52
+
53
+ }
54
+
55
+ echo '<div class="clear"></div>';
56
+
57
+ echo $this->field_after();
58
+
59
+ }
60
+
61
+ public function output() {
62
+
63
+ $output = '';
64
+ $bg_image = array();
65
+ $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
66
+ $elements = ( is_array( $this->field['output'] ) ) ? join( ',', $this->field['output'] ) : $this->field['output'];
67
+
68
+ if ( ! empty( $elements ) && isset( $this->value ) && $this->value !== '' ) {
69
+ $output = $elements . '{background-image:url(' . $this->value . ')' . $important . ';}';
70
+ }
71
+
72
+ $this->parent->output_css .= $output;
73
+
74
+ return $output;
75
+
76
+ }
77
+
78
+ }
79
+ }
admin/views/wpcfree-metabox/fields/checkbox/checkbox.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
+ /**
3
+ *
4
+ * Field: checkbox
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ */
10
+ if( ! class_exists( 'SP_WPCF_Field_checkbox' ) ) {
11
+ class SP_WPCF_Field_checkbox extends SP_WPCF_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args( $this->field, array(
20
+ 'inline' => false,
21
+ ) );
22
+
23
+ $inline_class = ( $args['inline'] ) ? ' class="spf--inline-list"' : '';
24
+
25
+ echo $this->field_before();
26
+
27
+ if( ! empty( $this->field['options'] ) ) {
28
+
29
+ $value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
30
+ $options = $this->field['options'];
31
+ $options = ( is_array( $options ) ) ? $options : array_filter( $this->field_data( $options ) );
32
+
33
+ if( ! empty( $options ) ) {
34
+
35
+ echo '<ul'. $inline_class .'>';
36
+ foreach ( $options as $option_key => $option_value ) {
37
+ $checked = ( in_array( $option_key, $value ) ) ? ' checked' : '';
38
+ echo '<li><label><input type="checkbox" name="'. $this->field_name( '[]' ) .'" value="'. $option_key .'"'. $this->field_attributes() . $checked .'/> '. $option_value .'</label></li>';
39
+ }
40
+ echo '</ul>';
41
+
42
+ } else {
43
+
44
+ echo ( ! empty( $this->field['empty_message'] ) ) ? $this->field['empty_message'] : esc_html__( 'No data provided for this option type.', 'wp-carousel-free' );
45
+
46
+ }
47
+
48
+ } else {
49
+ echo '<label class="spf-checkbox">';
50
+ echo '<input type="hidden" name="'. $this->field_name() .'" value="'. $this->value .'" class="spf--input"'. $this->field_attributes() .'/>';
51
+ echo '<input type="checkbox" class="spf--checkbox"'. checked( $this->value, 1, false ) .'/>';
52
+ echo ( ! empty( $this->field['label'] ) ) ? ' '. $this->field['label'] : '';
53
+ echo '</label>';
54
+ }
55
+
56
+ echo $this->field_after();
57
+
58
+ }
59
+
60
+ }
61
+ }
admin/views/wpcfree-metabox/fields/code_editor/code_editor.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
+ /**
3
+ *
4
+ * Field: code_editor
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ */
10
+ if( ! class_exists( 'SP_WPCF_Field_code_editor' ) ) {
11
+ class SP_WPCF_Field_code_editor extends SP_WPCF_Fields {
12
+
13
+ public $version = '5.41.0';
14
+ public $cdn_url = 'https://cdn.jsdelivr.net/npm/codemirror@';
15
+
16
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
17
+ parent::__construct( $field, $value, $unique, $where, $parent );
18
+ }
19
+
20
+ public function render() {
21
+
22
+ $default_settings = array(
23
+ 'tabSize' => 2,
24
+ 'lineNumbers' => true,
25
+ 'theme' => 'default',
26
+ 'mode' => 'htmlmixed',
27
+ 'cdnURL' => $this->cdn_url . $this->version,
28
+ );
29
+
30
+ $settings = ( ! empty( $this->field['settings'] ) ) ? $this->field['settings'] : array();
31
+ $settings = wp_parse_args( $settings, $default_settings );
32
+ $encoded = htmlspecialchars( json_encode( $settings ) );
33
+
34
+ echo $this->field_before();
35
+ echo '<textarea name="'. $this->field_name() .'"'. $this->field_attributes() .' data-editor="'. $encoded .'">'. $this->value .'</textarea>';
36
+ echo $this->field_after();
37
+
38
+ }
39
+
40
+ public function enqueue() {
41
+
42
+ // Do not loads CodeMirror in revslider page.
43
+ if( in_array( spf_get_var( 'page' ), array( 'revslider' ) ) ) { return; }
44
+
45
+ if( ! wp_script_is( 'spf-codemirror' ) ) {
46
+ wp_enqueue_script( 'spf-codemirror', $this->cdn_url . $this->version .'/lib/codemirror.min.js', array( 'spf' ), $this->version, true );
47
+ wp_enqueue_script( 'spf-codemirror-loadmode', $this->cdn_url . $this->version .'/addon/mode/loadmode.min.js', array( 'spf-codemirror' ), $this->version, true );
48
+ }
49
+
50
+ if( ! wp_style_is( 'spf-codemirror' ) ) {
51
+ wp_enqueue_style( 'spf-codemirror', $this->cdn_url . $this->version .'/lib/codemirror.min.css', array(), $this->version );
52
+ }
53
+
54
+ }
55
+
56
+ }
57
+ }
admin/views/wpcfree-metabox/fields/color/color.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
+ /**
3
+ *
4
+ * Field: color
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ */
10
+ if( ! class_exists( 'SP_WPCF_Field_color' ) ) {
11
+ class SP_WPCF_Field_color extends SP_WPCF_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $default_attr = ( ! empty( $this->field['default'] ) ) ? ' data-default-color="'. $this->field['default'] .'"' : '';
20
+
21
+ echo $this->field_before();
22
+ echo '<input type="text" name="'. $this->field_name() .'" value="'. $this->value .'" class="spf-color"'. $default_attr . $this->field_attributes() .'/>';
23
+ echo $this->field_after();
24
+
25
+ }
26
+
27
+ public function output() {
28
+
29
+ $output = '';
30
+ $elements = ( is_array( $this->field['output'] ) ) ? $this->field['output'] : array_filter( (array) $this->field['output'] );
31
+ $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
32
+ $mode = ( ! empty( $this->field['output_mode'] ) ) ? $this->field['output_mode'] : 'color';
33
+
34
+ if( ! empty( $elements ) && isset( $this->value ) && $this->value !== '' ) {
35
+ foreach( $elements as $key_property => $element ) {
36
+ if( is_numeric( $key_property ) ) {
37
+ $output = implode( ',', $elements ) .'{'. $mode .':'. $this->value . $important .';}';
38
+ break;
39
+ } else {
40
+ $output .= $element .'{'. $key_property .':'. $this->value . $important .'}';
41
+ }
42
+ }
43
+ }
44
+
45
+ $this->parent->output_css .= $output;
46
+
47
+ return $output;
48
+
49
+ }
50
+
51
+ }
52
+ }
admin/views/wpcfree-metabox/fields/color_group/color_group.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
+ /**
3
+ *
4
+ * Field: color_group
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ */
10
+ if( ! class_exists( 'SP_WPCF_Field_color_group' ) ) {
11
+ class SP_WPCF_Field_color_group extends SP_WPCF_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $options = ( ! empty( $this->field['options'] ) ) ? $this->field['options'] : array();
20
+
21
+ echo $this->field_before();
22
+
23
+ if( ! empty( $options ) ) {
24
+ foreach( $options as $key => $option ) {
25
+
26
+ $color_value = ( ! empty( $this->value[$key] ) ) ? $this->value[$key] : '';
27
+ $default_attr = ( ! empty( $this->field['default'][$key] ) ) ? ' data-default-color="'. $this->field['default'][$key] .'"' : '';
28
+
29
+ echo '<div class="spf--left spf-field-color">';
30
+ echo '<div class="spf--title">'. $option .'</div>';
31
+ echo '<input type="text" name="'. $this->field_name('['. $key .']') .'" value="'. $color_value .'" class="spf-color"'. $default_attr . $this->field_attributes() .'/>';
32
+ echo '</div>';
33
+
34
+ }
35
+ }
36
+
37
+ echo '<div class="clear"></div>';
38
+
39
+ echo $this->field_after();
40
+
41
+ }
42
+
43
+ }
44
+ }
admin/views/wpcfree-metabox/fields/column/column.php ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ /**
13
+ * The column field class.
14
+ */
15
+ class SP_WPCF_Field_column extends SP_WPCF_Fields {
16
+
17
+ /**
18
+ * Column field constructor.
19
+ *
20
+ * @param array $field The field type.
21
+ * @param string $value The values of the field.
22
+ * @param string $unique The unique ID for the field.
23
+ * @param string $where To where show the output CSS.
24
+ * @param string $parent The parent args.
25
+ */
26
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
27
+ parent::__construct( $field, $value, $unique, $where, $parent );
28
+ }
29
+
30
+ /**
31
+ * Render column function.
32
+ *
33
+ * @return void
34
+ */
35
+ public function render() {
36
+
37
+ $args = wp_parse_args(
38
+ $this->field,
39
+ array(
40
+ 'lg_desktop_icon' => '<i class="fa fa-television"></i>',
41
+ 'desktop_icon' => '<i class="fa fa-desktop"></i>',
42
+ 'laptop_icon' => '<i class="fa fa-laptop"></i>',
43
+ 'tablet_icon' => '<i class="fa fa-tablet"></i>',
44
+ 'mobile_icon' => '<i class="fa fa-mobile"></i>',
45
+ 'all_text' => '<i class="fa fa-arrows"></i>',
46
+ 'lg_desktop_placeholder' => esc_html__( 'Large Desktop', 'wp-carousel-free' ),
47
+ 'desktop_placeholder' => esc_html__( 'Desktop', 'wp-carousel-free' ),
48
+ 'laptop_placeholder' => esc_html__( 'Small Desktop', 'wp-carousel-free' ),
49
+ 'tablet_placeholder' => esc_html__( 'Tablet', 'wp-carousel-free' ),
50
+ 'mobile_placeholder' => esc_html__( 'Mobile', 'wp-carousel-free' ),
51
+ 'all_placeholder' => esc_html__( 'all', 'wp-carousel-free' ),
52
+ 'lg_desktop' => true,
53
+ 'desktop' => true,
54
+ 'laptop' => true,
55
+ 'tablet' => true,
56
+ 'mobile' => true,
57
+ 'min' => '0',
58
+ 'unit' => false,
59
+ 'all' => false,
60
+ 'units' => array( 'px', '%', 'em' ),
61
+ )
62
+ );
63
+
64
+ $default_values = array(
65
+ 'lg_desktop' => '5',
66
+ 'desktop' => '4',
67
+ 'laptop' => '3',
68
+ 'tablet' => '2',
69
+ 'mobile' => '1',
70
+ 'min' => '',
71
+ 'all' => '',
72
+ 'unit' => 'px',
73
+ );
74
+
75
+ $value = wp_parse_args( $this->value, $default_values );
76
+
77
+ echo $this->field_before();
78
+
79
+ $min = ( isset( $args['min'] ) ) ? ' min="' . $args['min'] . '"' : '';
80
+ if ( ! empty( $args['all'] ) ) {
81
+
82
+ $placeholder = ( ! empty( $args['all_placeholder'] ) ) ? ' placeholder="' . $args['all_placeholder'] . '"' : '';
83
+
84
+ echo '<div class="spf--input">';
85
+ echo ( ! empty( $args['all_text'] ) ) ? '<span class="spf--label spf--label-icon">' . $args['all_text'] . '</span>' : '';
86
+ echo '<input type="number" name="' . $this->field_name( '[all]' ) . '" value="' . $value['all'] . '"' . $placeholder . $min . ' class="spf-number" />';
87
+ echo ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--label-unit">' . $args['units'][0] . '</span>' : '';
88
+ echo '</div>';
89
+
90
+ } else {
91
+
92
+ $properties = array();
93
+
94
+ foreach ( array( 'lg_desktop', 'desktop', 'laptop', 'tablet', 'mobile' ) as $prop ) {
95
+ if ( ! empty( $args[ $prop ] ) ) {
96
+ $properties[] = $prop;
97
+ }
98
+ }
99
+
100
+ $properties = ( $properties === array( 'laptop', 'mobile' ) ) ? array_reverse( $properties ) : $properties;
101
+
102
+ foreach ( $properties as $property ) {
103
+
104
+ $placeholder = ( ! empty( $args[ $property . '_placeholder' ] ) ) ? ' placeholder="' . $args[ $property . '_placeholder' ] . '"' : '';
105
+
106
+ echo '<div class="spf--input">';
107
+ echo ( ! empty( $args[ $property . '_icon' ] ) ) ? '<span class="spf--label spf--label-icon">' . $args[ $property . '_icon' ] . '</span>' : '';
108
+ echo '<input type="number" name="' . $this->field_name( '[' . $property . ']' ) . '" value="' . $value[ $property ] . '"' . $placeholder . $min . ' class="spf-number" />';
109
+ echo ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--label-unit">' . $args['units'][0] . '</span>' : '';
110
+ echo '</div>';
111
+
112
+ }
113
+ }
114
+
115
+ if ( ! empty( $args['unit'] ) && count( $args['units'] ) > 1 ) {
116
+ echo '<select name="' . $this->field_name( '[unit]' ) . '">';
117
+ foreach ( $args['units'] as $unit ) {
118
+ $selected = ( $value['unit'] === $unit ) ? ' selected' : '';
119
+ echo '<option value="' . $unit . '"' . $selected . '>' . $unit . '</option>';
120
+ }
121
+ echo '</select>';
122
+ }
123
+
124
+ echo '<div class="clear"></div>';
125
+
126
+ echo $this->field_after();
127
+
128
+ }
129
+
130
+ /**
131
+ * The output function.
132
+ *
133
+ * @return void
134
+ */
135
+ public function output() {
136
+
137
+ $output = '';
138
+ $element = ( is_array( $this->field['output'] ) ) ? join( ',', $this->field['output'] ) : $this->field['output'];
139
+ $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
140
+ $unit = ( ! empty( $this->value['unit'] ) ) ? $this->value['unit'] : 'px';
141
+
142
+ $mode = ( ! empty( $this->field['output_mode'] ) ) ? $this->field['output_mode'] : 'padding';
143
+ $mode = ( $mode === 'relative' || $mode === 'absolute' || $mode === 'none' ) ? '' : $mode;
144
+ $mode = ( ! empty( $mode ) ) ? $mode . '-' : '';
145
+
146
+ if ( ! empty( $this->field['all'] ) && isset( $this->value['all'] ) && $this->value['all'] !== '' ) {
147
+
148
+ $output = $element . '{';
149
+ $output .= $mode . 'lg_desktop:' . $this->value['all'] . $unit . $important . ';';
150
+ $output .= $mode . 'desktop:' . $this->value['all'] . $unit . $important . ';';
151
+ $output .= $mode . 'laptop:' . $this->value['all'] . $unit . $important . ';';
152
+ $output .= $mode . 'tablet:' . $this->value['all'] . $unit . $important . ';';
153
+ $output .= $mode . 'mobile:' . $this->value['all'] . $unit . $important . ';';
154
+ $output .= '}';
155
+
156
+ } else {
157
+
158
+ $lg_desktop = ( isset( $this->value['lg_desktop'] ) && $this->value['lg_desktop'] !== '' ) ? $mode . 'lg_desktop:' . $this->value['lg_desktop'] . $unit . $important . ';' : '';
159
+ $desktop = ( isset( $this->value['desktop'] ) && $this->value['desktop'] !== '' ) ? $mode . 'desktop:' . $this->value['desktop'] . $unit . $important . ';' : '';
160
+ $laptop = ( isset( $this->value['laptop'] ) && $this->value['laptop'] !== '' ) ? $mode . 'laptop:' . $this->value['laptop'] . $unit . $important . ';' : '';
161
+ $tablet = ( isset( $this->value['tablet'] ) && $this->value['tablet'] !== '' ) ? $mode . 'tablet:' . $this->value['tablet'] . $unit . $important . ';' : '';
162
+ $mobile = ( isset( $this->value['mobile'] ) && $this->value['mobile'] !== '' ) ? $mode . 'mobile:' . $this->value['mobile'] . $unit . $important . ';' : '';
163
+
164
+ if ( $lg_desktop !== '' || $desktop !== '' || $laptop !== '' || $tablet !== '' || $mobile !== '' ) {
165
+ $output = $element . '{' . $lg_desktop . $desktop . $laptop . $tablet . $mobile . '}';
166
+ }
167
+ }
168
+
169
+ $this->parent->output_css .= $output;
170
+
171
+ return $output;
172
+
173
+ }
174
+
175
+ }
176
+ }
admin/views/wpcfree-metabox/fields/gallery/gallery.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: gallery
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SP_WPCF_Field_gallery' ) ) {
11
+ class SP_WPCF_Field_gallery extends SP_WPCF_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args(
20
+ $this->field,
21
+ array(
22
+ 'add_title' => esc_html__( 'Add Gallery', 'wp-carousel-free' ),
23
+ 'edit_title' => esc_html__( 'Edit Gallery', 'wp-carousel-free' ),
24
+ 'clear_title' => esc_html__( 'Clear', 'wp-carousel-free' ),
25
+ )
26
+ );
27
+
28
+ $hidden = ( empty( $this->value ) ) ? ' hidden' : '';
29
+
30
+ echo $this->field_before();
31
+ echo '<a href="#" class="button button-primary spf-button"><i class="fa fa-plus-circle"></i>' . $args['add_title'] . '</a>';
32
+ echo '<ul class="sp-gallery-images">';
33
+ if ( ! empty( $this->value ) ) {
34
+
35
+ $values = explode( ',', $this->value );
36
+
37
+ foreach ( $values as $id ) {
38
+ $attachment = wp_get_attachment_image_src( $id, 'thumbnail' );
39
+ echo '<li><img src="' . $attachment[0] . '" alt="" /></li>';
40
+ }
41
+ }
42
+
43
+ echo '</ul>';
44
+
45
+ // echo '<a href="#" class="button spf-edit-gallery' . $hidden . '"><i class="fa fa-pencil-square-o"></i>' . $args['edit_title'] . '</a>';
46
+ // echo '<a href="#" class="button spf-warning-primary spf-clear-gallery' . $hidden . '"><i class="fa fa-trash"></i>' . $args['clear_title'] . '</a>';
47
+ echo '<ul><li><a href="#" class="button spf-edit-gallery' . $hidden . '"><i class="fa fa-pencil-square-o"></i>' . $args['edit_title'] . '</a></li></ul>';
48
+ echo '<ul><li><a href="#" class="button spf-warning-primary spf-clear-gallery' . $hidden . '"><i class="fa fa-trash"></i>' . $args['clear_title'] . '</a></li></ul>';
49
+ echo '<input type="text" name="' . $this->field_name() . '" value="' . $this->value . '"' . $this->field_attributes() . '/></span>';
50
+
51
+ echo $this->field_after();
52
+
53
+ }
54
+
55
+ }
56
+ }
admin/views/wpcfree-metabox/fields/heading/heading.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ echo ( ! empty( $this->field['content'] ) ) ? $this->field['content'] : '';
20
+ echo ( ! empty( $this->field['image'] ) ) ? '<img src="' . $this->field['image'] . '">' : '';
21
+
22
+ echo ( ! empty( $this->field['after'] ) && ! empty( $this->field['link'] ) ) ? '<span class="spacer"></span><span class="support"><a target="_blank" href="' . $this->field['link'] . '">' . $this->field['after'] . '</a></span>' : '';
23
+ }
24
+
25
+ }
26
+ }
admin/views/wpcfree-metabox/fields/image_sizes/image_sizes.php ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: Image sizes.
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SP_WPCF_Field_image_sizes' ) ) {
11
+ class SP_WPCF_Field_image_sizes extends SP_WPCF_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args(
20
+ $this->field,
21
+ array(
22
+ 'chosen' => false,
23
+ 'multiple' => false,
24
+ 'placeholder' => '',
25
+ )
26
+ );
27
+
28
+ $this->value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
29
+
30
+ echo $this->field_before();
31
+
32
+ // Get the image sizes.
33
+ global $_wp_additional_image_sizes;
34
+ $sizes = array();
35
+
36
+ foreach ( get_intermediate_image_sizes() as $_size ) {
37
+ if ( in_array( $_size, array( 'thumbnail', 'medium', 'medium_large', 'large' ) ) ) {
38
+
39
+ $width = get_option( "{$_size}_size_w" );
40
+ $height = get_option( "{$_size}_size_h" );
41
+ $crop = (bool) get_option( "{$_size}_crop" ) ? 'hard' : 'soft';
42
+
43
+ $sizes[ $_size ] = ucfirst( "{$_size} - $crop:{$width}x{$height}" );
44
+
45
+ } elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {
46
+
47
+ $width = $_wp_additional_image_sizes[ $_size ]['width'];
48
+ $height = $_wp_additional_image_sizes[ $_size ]['height'];
49
+ $crop = $_wp_additional_image_sizes[ $_size ]['crop'] ? 'hard' : 'soft';
50
+
51
+ $sizes[ $_size ] = ucfirst( "{$_size} - $crop:{$width}X{$height}" );
52
+ }
53
+ }
54
+ $sizes = array_merge(
55
+ $sizes,
56
+ array(
57
+ 'full' => __( 'Original uploaded image', 'wp-carousel-free' ),
58
+ )
59
+ );
60
+
61
+ if ( ! empty( $sizes ) ) {
62
+ $multiple_name = ( $args['multiple'] ) ? '[]' : '';
63
+ $multiple_attr = ( $args['multiple'] ) ? ' multiple="multiple"' : '';
64
+ $chosen_rtl = ( is_rtl() ) ? ' chosen-rtl' : '';
65
+ $chosen_attr = ( $args['chosen'] ) ? ' class="spf-chosen' . $chosen_rtl . '"' : '';
66
+ $placeholder_attr = ( $args['chosen'] && $args['placeholder'] ) ? ' data-placeholder="' . $args['placeholder'] . '"' : '';
67
+
68
+ if ( ! empty( $sizes ) ) {
69
+
70
+ echo '<select name="' . $this->field_name( $multiple_name ) . '"' . $multiple_attr . $chosen_attr . $placeholder_attr . $this->field_attributes() . '>';
71
+
72
+ if ( $args['placeholder'] && empty( $args['multiple'] ) ) {
73
+ if ( ! empty( $args['chosen'] ) ) {
74
+ echo '<option value=""></option>';
75
+ } else {
76
+ echo '<option value="">' . $args['placeholder'] . '</option>';
77
+ }
78
+ }
79
+
80
+ foreach ( $sizes as $option_key => $option ) {
81
+
82
+ if ( is_array( $option ) && ! empty( $option ) ) {
83
+
84
+ echo '<optgroup label="' . $option_key . '">';
85
+
86
+ foreach ( $option as $sub_key => $sub_value ) {
87
+ $selected = ( in_array( $sub_key, $this->value ) ) ? ' selected' : '';
88
+ echo '<option value="' . $sub_key . '" ' . $selected . '>' . $sub_value . '</option>';
89
+ }
90
+
91
+ echo '</optgroup>';
92
+
93
+ } else {
94
+ $selected = ( in_array( $option_key, $this->value ) ) ? ' selected' : '';
95
+ echo '<option value="' . $option_key . '" ' . $selected . '>' . $option . '</option>';
96
+ }
97
+ }
98
+
99
+ echo '</select>';
100
+
101
+ } else {
102
+
103
+ echo ( ! empty( $this->field['empty_message'] ) ) ? $this->field['empty_message'] : esc_html__( 'No image sizes found.', 'wp-carousel-free' );
104
+
105
+ }
106
+ }
107
+
108
+ echo $this->field_after();
109
+
110
+ }
111
+
112
+ }
113
+ }
admin/views/{meta-box → wpcfree-metabox/fields}/index.php RENAMED
File without changes
admin/views/wpcfree-metabox/fields/media/media.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
+ /**
3
+ *
4
+ * Field: media
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ */
10
+ if( ! class_exists( 'SP_WPCF_Field_media' ) ) {
11
+ class SP_WPCF_Field_media extends SP_WPCF_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args( $this->field, array(
20
+ 'url' => true,
21
+ 'preview' => true,
22
+ 'library' => array(),
23
+ 'button_title' => esc_html__( 'Upload', 'wp-carousel-free' ),
24
+ 'remove_title' => esc_html__( 'Remove', 'wp-carousel-free' ),
25
+ 'preview_size' => 'thumbnail',
26
+ ) );
27
+
28
+ $default_values = array(
29
+ 'url' => '',
30
+ 'id' => '',
31
+ 'width' => '',
32
+ 'height' => '',
33
+ 'thumbnail' => '',
34
+ 'alt' => '',
35
+ 'title' => '',
36
+ 'description' => ''
37
+ );
38
+
39
+ // fallback
40
+ if( is_numeric( $this->value ) ) {
41
+ $this->value = array(
42
+ 'id' => $this->value,
43
+ 'url' => wp_get_attachment_url( $this->value ),
44
+ 'thumbnail' => wp_get_attachment_image_src( $this->value, 'thumbnail', true )[0],
45
+ );
46
+ }
47
+ $this->value = wp_parse_args( $this->value, $default_values );
48
+
49
+ $library = ( is_array( $args['library'] ) ) ? $args['library'] : array_filter( (array) $args['library'] );
50
+ $library = ( ! empty( $library ) ) ? implode(',', $library ) : '';
51
+ $preview_src = ( $args['preview_size'] !== 'thumbnail' ) ? $this->value['url'] : $this->value['thumbnail'];
52
+ $hidden_url = ( empty( $args['url'] ) ) ? ' hidden' : '';
53
+ $hidden_auto = ( empty( $this->value['url'] ) ) ? ' hidden' : '';
54
+ $placeholder = ( empty( $this->field['placeholder'] ) ) ? ' placeholder="'. esc_html__( 'No media selected', 'wp-carousel-free' ) .'"' : '';
55
+
56
+ echo $this->field_before();
57
+
58
+ if( ! empty( $args['preview'] ) ) {
59
+ echo '<div class="spf--preview'. $hidden_auto .'">';
60
+ echo '<div class="spf-image-preview"><a href="#" class="spf--remove fa fa-times"></a><img src="'. $preview_src .'" class="spf--src" alt=""/></div>';
61
+ echo '</div>';
62
+ }
63
+
64
+ echo '<div class="spf--placeholder">';
65
+ echo '<input type="text" name="'. $this->field_name('[url]') .'" value="'. $this->value['url'] .'" class="spf--url'. $hidden_url .'" readonly="readonly"'. $this->field_attributes() . $placeholder .' />';
66
+ echo '<a href="#" class="button button-primary spf--button" data-library="'. esc_attr( $library ) .'" data-preview-size="'. esc_attr( $args['preview_size'] ) .'">'. $args['button_title'] .'</a>';
67
+ echo ( empty( $args['preview'] ) ) ? '<a href="#" class="button button-secondary spf-warning-primary spf--remove'. $hidden_auto .'">'. $args['remove_title'] .'</a>' : '';
68
+ echo '</div>';
69
+
70
+ echo '<input type="hidden" name="'. $this->field_name('[id]') .'" value="'. $this->value['id'] .'" class="spf--id"/>';
71
+ echo '<input type="hidden" name="'. $this->field_name('[width]') .'" value="'. $this->value['width'] .'" class="spf--width"/>';
72
+ echo '<input type="hidden" name="'. $this->field_name('[height]') .'" value="'. $this->value['height'] .'" class="spf--height"/>';
73
+ echo '<input type="hidden" name="'. $this->field_name('[thumbnail]') .'" value="'. $this->value['thumbnail'] .'" class="spf--thumbnail"/>';
74
+ echo '<input type="hidden" name="'. $this->field_name('[alt]') .'" value="'. $this->value['alt'] .'" class="spf--alt"/>';
75
+ echo '<input type="hidden" name="'. $this->field_name('[title]') .'" value="'. $this->value['title'] .'" class="spf--title"/>';
76
+ echo '<input type="hidden" name="'. $this->field_name('[description]') .'" value="'. $this->value['description'] .'" class="spf--description"/>';
77
+
78
+ echo $this->field_after();
79
+
80
+ }
81
+
82
+ }
83
+ }
admin/views/wpcfree-metabox/fields/notice/notice.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: notice
6
+ *
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
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $style = ( ! empty( $this->field['style'] ) ) ? $this->field['style'] : 'normal';
20
+
21
+ echo ( ! empty( $this->field['content'] ) ) ? '<div class="spf-notice spf-notice-' . $style . '">' . $this->field['content'] . '</div>' : '';
22
+
23
+ }
24
+
25
+ }
26
+ }
admin/views/wpcfree-metabox/fields/radio/radio.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args(
20
+ $this->field,
21
+ array(
22
+ 'inline' => false,
23
+ )
24
+ );
25
+
26
+ $inline_class = ( $args['inline'] ) ? ' class="spf--inline-list"' : '';
27
+
28
+ echo $this->field_before();
29
+
30
+ if ( isset( $this->field['options'] ) ) {
31
+
32
+ $options = $this->field['options'];
33
+ $options = ( is_array( $options ) ) ? $options : array_filter( $this->field_data( $options ) );
34
+
35
+ if ( ! empty( $options ) ) {
36
+
37
+ echo '<ul' . $inline_class . '>';
38
+ foreach ( $options as $option_key => $option_value ) {
39
+ $checked = ( $option_key === $this->value ) ? ' checked' : '';
40
+ echo '<li><label><input type="radio" name="' . $this->field_name() . '" value="' . $option_key . '"' . $this->field_attributes() . $checked . '/> ' . $option_value . '</label></li>';
41
+ }
42
+ echo '</ul>';
43
+
44
+ } else {
45
+
46
+ echo ( ! empty( $this->field['empty_message'] ) ) ? $this->field['empty_message'] : esc_html__( 'No data provided for this option type.', 'wp-carousel-free' );
47
+
48
+ }
49
+ } else {
50
+ $label = ( isset( $this->field['label'] ) ) ? $this->field['label'] : '';
51
+ echo '<label><input type="radio" name="' . $this->field_name() . '" value="1"' . $this->field_attributes() . checked( $this->value, 1, false ) . '/> ' . $label . '</label>';
52
+ }
53
+
54
+ echo $this->field_after();
55
+
56
+ }
57
+
58
+ }
59
+ }
admin/views/wpcfree-metabox/fields/select/select.php ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args(
20
+ $this->field,
21
+ array(
22
+ 'chosen' => false,
23
+ 'multiple' => false,
24
+ 'placeholder' => '',
25
+ )
26
+ );
27
+
28
+ $this->value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
29
+
30
+ echo $this->field_before();
31
+
32
+ if ( ! empty( $this->field['options'] ) ) {
33
+
34
+ $options = ( is_array( $this->field['options'] ) ) ? $this->field['options'] : $this->field_data( $this->field['options'] );
35
+ $multiple_name = ( $args['multiple'] ) ? '[]' : '';
36
+ $multiple_attr = ( $args['multiple'] ) ? ' multiple="multiple"' : '';
37
+ $chosen_rtl = ( is_rtl() ) ? ' chosen-rtl' : '';
38
+ $chosen_attr = ( $args['chosen'] ) ? ' class="spf-chosen' . $chosen_rtl . '"' : '';
39
+ $placeholder_attr = ( $args['chosen'] && $args['placeholder'] ) ? ' data-placeholder="' . $args['placeholder'] . '"' : '';
40
+
41
+ if ( ! empty( $options ) ) {
42
+
43
+ echo '<select name="' . $this->field_name( $multiple_name ) . '"' . $multiple_attr . $chosen_attr . $placeholder_attr . $this->field_attributes() . '>';
44
+
45
+ if ( $args['placeholder'] && empty( $args['multiple'] ) ) {
46
+ if ( ! empty( $args['chosen'] ) ) {
47
+ echo '<option value=""></option>';
48
+ } else {
49
+ echo '<option value="">' . $args['placeholder'] . '</option>';
50
+ }
51
+ }
52
+
53
+ foreach ( $options as $option_key => $option ) {
54
+
55
+ if ( is_array( $option ) && ! empty( $option ) ) {
56
+
57
+ echo '<optgroup label="' . $option_key . '">';
58
+
59
+ foreach ( $option as $sub_key => $sub_value ) {
60
+ $selected = ( in_array( $sub_key, $this->value ) ) ? ' selected' : '';
61
+ echo '<option value="' . $sub_key . '" ' . $selected . '>' . $sub_value . '</option>';
62
+ }
63
+
64
+ echo '</optgroup>';
65
+
66
+ } else {
67
+ $selected = ( in_array( $option_key, $this->value ) ) ? ' selected' : '';
68
+ echo '<option value="' . $option_key . '" ' . $selected . '>' . $option . '</option>';
69
+ }
70
+ }
71
+
72
+ echo '</select>';
73
+
74
+ } else {
75
+
76
+ echo ( ! empty( $this->field['empty_message'] ) ) ? $this->field['empty_message'] : esc_html__( 'No data provided for this option type.', 'wp-carousel-free' );
77
+
78
+ }
79
+ }
80
+
81
+ echo $this->field_after();
82
+
83
+ }
84
+
85
+ }
86
+ }
admin/views/wpcfree-metabox/fields/selectf/selectf.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_selectf' ) ) {
11
+ class SP_WPCF_Field_selectf extends SP_WPCF_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args(
20
+ $this->field,
21
+ array(
22
+ 'chosen' => false,
23
+ 'multiple' => false,
24
+ 'placeholder' => '',
25
+ )
26
+ );
27
+
28
+ $this->value = ( is_array( $this->value ) ) ? $this->value : array_filter( (array) $this->value );
29
+
30
+ echo $this->field_before();
31
+
32
+ if ( ! empty( $this->field['options'] ) ) {
33
+
34
+ $options = ( is_array( $this->field['options'] ) ) ? $this->field['options'] : $this->field_data( $this->field['options'] );
35
+ $multiple_name = ( $args['multiple'] ) ? '[]' : '';
36
+ $multiple_attr = ( $args['multiple'] ) ? ' multiple="multiple"' : '';
37
+ $chosen_rtl = ( is_rtl() ) ? ' chosen-rtl' : '';
38
+ $chosen_attr = ( $args['chosen'] ) ? ' class="spf-chosen' . $chosen_rtl . '"' : '';
39
+ $placeholder_attr = ( $args['chosen'] && $args['placeholder'] ) ? ' data-placeholder="' . $args['placeholder'] . '"' : '';
40
+
41
+ if ( ! empty( $options ) ) {
42
+
43
+ echo '<select name="' . $this->field_name( $multiple_name ) . '"' . $multiple_attr . $chosen_attr . $placeholder_attr . $this->field_attributes() . '>';
44
+
45
+ if ( $args['placeholder'] && empty( $args['multiple'] ) ) {
46
+ if ( ! empty( $args['chosen'] ) ) {
47
+ echo '<option value=""></option>';
48
+ } else {
49
+ echo '<option value="">' . $args['placeholder'] . '</option>';
50
+ }
51
+ }
52
+
53
+ foreach ( $options as $option_key => $option ) {
54
+ $pro_only = true == $option['pro_only'] ? ' disabled' : '';
55
+ // if ( is_array( $option ) && ! empty( $option ) ) {
56
+ // echo '<optgroup label="' . $option_key . '">';
57
+ // foreach ( $option as $sub_key => $sub_value ) {
58
+ // $selected = ( in_array( $sub_key, $this->value ) ) ? ' selected' : '';
59
+ // echo '<option' . $pro_only . ' value="' . $sub_key . '" ' . $selected . '>' . $sub_value . '</option>';
60
+ // }
61
+ // echo '</optgroup>';
62
+ // } else {
63
+ $selected = ( in_array( $option_key, $this->value ) ) ? ' selected' : '';
64
+ echo '<option' . $pro_only . ' value="' . $option_key . '" ' . $selected . '>' . $option['text'] . '</option>';
65
+ // }
66
+ }
67
+
68
+ echo '</select>';
69
+
70
+ } else {
71
+
72
+ echo ( ! empty( $this->field['empty_message'] ) ) ? $this->field['empty_message'] : esc_html__( 'No data provided for this option type.', 'wp-carousel-free' );
73
+
74
+ }
75
+ }
76
+
77
+ echo $this->field_after();
78
+
79
+ }
80
+
81
+ }
82
+ }
admin/views/wpcfree-metabox/fields/shortcode/shortcode.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: shortcode
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SP_WPCF_Field_shortcode' ) ) {
11
+ class SP_WPCF_Field_shortcode extends SP_WPCF_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ // Get the Post ID.
20
+ $post_id = get_the_ID();
21
+
22
+ echo ( ! empty( $post_id ) ) ? '<div class="wpcp-scode-wrap"><span class="wpcp-sc-title">Shrotcode:</span><span class="wpcp-shortcode-selectable">[sp_wpcarousel id="' . $post_id . '"]</span></div><div class="wpcp-scode-wrap"><span class="wpcp-sc-title">Template Include:</span><span class="wpcp-shortcode-selectable">&lt;?php echo do_shortcode(\'[sp_wpcarousel id="' . $post_id . '"]\'); ?&gt;</span></div>' : '';
23
+ }
24
+
25
+ }
26
+ }
admin/views/wpcfree-metabox/fields/spacing/spacing.php ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 );
24
+ }
25
+
26
+ /**
27
+ * Function to render the field.
28
+ *
29
+ * @return void
30
+ */
31
+ public function render() {
32
+
33
+ $args = wp_parse_args(
34
+ $this->field,
35
+ array(
36
+ 'top_icon' => '<i class="fa fa-long-arrow-up"></i>',
37
+ 'right_icon' => '<i class="fa fa-long-arrow-right"></i>',
38
+ 'bottom_icon' => '<i class="fa fa-long-arrow-down"></i>',
39
+ 'left_icon' => '<i class="fa fa-long-arrow-left"></i>',
40
+ 'all_text' => '<i class="fa fa-arrows"></i>',
41
+ 'top_placeholder' => esc_html__( 'top', 'wp-carousel-free' ),
42
+ 'right_placeholder' => esc_html__( 'right', 'wp-carousel-free' ),
43
+ 'bottom_placeholder' => esc_html__( 'bottom', 'wp-carousel-free' ),
44
+ 'left_placeholder' => esc_html__( 'left', 'wp-carousel-free' ),
45
+ 'all_placeholder' => esc_html__( 'all', 'wp-carousel-free' ),
46
+ 'top' => true,
47
+ 'left' => true,
48
+ 'bottom' => true,
49
+ 'right' => true,
50
+ 'unit' => true,
51
+ 'min' => '0',
52
+ 'all' => false,
53
+ 'units' => array( 'px', '%', 'em' ),
54
+ )
55
+ );
56
+
57
+ $default_values = array(
58
+ 'top' => '',
59
+ 'right' => '',
60
+ 'bottom' => '',
61
+ 'left' => '',
62
+ 'all' => '',
63
+ 'unit' => 'px',
64
+ 'min' => '',
65
+ );
66
+
67
+ $value = wp_parse_args( $this->value, $default_values );
68
+
69
+ echo $this->field_before();
70
+
71
+ $min = ( isset( $args['min'] ) ) ? ' min="' . $args['min'] . '"' : '';
72
+ if ( ! empty( $args['all'] ) ) {
73
+
74
+ $placeholder = ( ! empty( $args['all_placeholder'] ) ) ? ' placeholder="' . $args['all_placeholder'] . '"' : '';
75
+
76
+ echo '<div class="spf--input">';
77
+ echo ( ! empty( $args['all_text'] ) ) ? '<span class="spf--label spf--label-icon">' . $args['all_text'] . '</span>' : '';
78
+ echo '<input type="number" name="' . $this->field_name( '[all]' ) . '" value="' . $value['all'] . '"' . $placeholder . $min . ' class="spf-number" />';
79
+ echo ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--label-unit">' . $args['units'][0] . '</span>' : '';
80
+ echo '</div>';
81
+
82
+ } else {
83
+
84
+ $properties = array();
85
+
86
+ foreach ( array( 'top', 'right', 'bottom', 'left' ) as $prop ) {
87
+ if ( ! empty( $args[ $prop ] ) ) {
88
+ $properties[] = $prop;
89
+ }
90
+ }
91
+
92
+ $properties = ( $properties === array( 'right', 'left' ) ) ? array_reverse( $properties ) : $properties;
93
+
94
+ foreach ( $properties as $property ) {
95
+
96
+ $placeholder = ( ! empty( $args[ $property . '_placeholder' ] ) ) ? ' placeholder="' . $args[ $property . '_placeholder' ] . '"' : '';
97
+
98
+ echo '<div class="spf--input">';
99
+ echo ( ! empty( $args[ $property . '_icon' ] ) ) ? '<span class="spf--label spf--label-icon">' . $args[ $property . '_icon' ] . '</span>' : '';
100
+ echo '<input type="number" name="' . $this->field_name( '[' . $property . ']' ) . '" value="' . $value[ $property ] . '"' . $placeholder . $min . ' class="spf-number" />';
101
+ echo ( count( $args['units'] ) === 1 && ! empty( $args['unit'] ) ) ? '<span class="spf--label spf--label-unit">' . $args['units'][0] . '</span>' : '';
102
+ echo '</div>';
103
+
104
+ }
105
+ }
106
+
107
+ if ( ! empty( $args['unit'] ) && count( $args['units'] ) > 1 ) {
108
+ echo '<select name="' . $this->field_name( '[unit]' ) . '">';
109
+ foreach ( $args['units'] as $unit ) {
110
+ $selected = ( $value['unit'] === $unit ) ? ' selected' : '';
111
+ echo '<option value="' . $unit . '"' . $selected . '>' . $unit . '</option>';
112
+ }
113
+ echo '</select>';
114
+ }
115
+
116
+ echo '<div class="clear"></div>';
117
+
118
+ echo $this->field_after();
119
+
120
+ }
121
+
122
+ public function output() {
123
+
124
+ $output = '';
125
+ $element = ( is_array( $this->field['output'] ) ) ? join( ',', $this->field['output'] ) : $this->field['output'];
126
+ $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
127
+ $unit = ( ! empty( $this->value['unit'] ) ) ? $this->value['unit'] : 'px';
128
+
129
+ $mode = ( ! empty( $this->field['output_mode'] ) ) ? $this->field['output_mode'] : 'padding';
130
+ $mode = ( $mode === 'relative' || $mode === 'absolute' || $mode === 'none' ) ? '' : $mode;
131
+ $mode = ( ! empty( $mode ) ) ? $mode . '-' : '';
132
+
133
+ if ( ! empty( $this->field['all'] ) && isset( $this->value['all'] ) && $this->value['all'] !== '' ) {
134
+
135
+ $output = $element . '{';
136
+ $output .= $mode . 'top:' . $this->value['all'] . $unit . $important . ';';
137
+ $output .= $mode . 'right:' . $this->value['all'] . $unit . $important . ';';
138
+ $output .= $mode . 'bottom:' . $this->value['all'] . $unit . $important . ';';
139
+ $output .= $mode . 'left:' . $this->value['all'] . $unit . $important . ';';
140
+ $output .= '}';
141
+
142
+ } else {
143
+
144
+ $top = ( isset( $this->value['top'] ) && $this->value['top'] !== '' ) ? $mode . 'top:' . $this->value['top'] . $unit . $important . ';' : '';
145
+ $right = ( isset( $this->value['right'] ) && $this->value['right'] !== '' ) ? $mode . 'right:' . $this->value['right'] . $unit . $important . ';' : '';
146
+ $bottom = ( isset( $this->value['bottom'] ) && $this->value['bottom'] !== '' ) ? $mode . 'bottom:' . $this->value['bottom'] . $unit . $important . ';' : '';
147
+ $left = ( isset( $this->value['left'] ) && $this->value['left'] !== '' ) ? $mode . 'left:' . $this->value['left'] . $unit . $important . ';' : '';
148
+
149
+ if ( $top !== '' || $right !== '' || $bottom !== '' || $left !== '' ) {
150
+ $output = $element . '{' . $top . $right . $bottom . $left . '}';
151
+ }
152
+ }
153
+
154
+ $this->parent->output_css .= $output;
155
+
156
+ return $output;
157
+
158
+ }
159
+
160
+ }
161
+ }
admin/views/wpcfree-metabox/fields/spinner/spinner.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: spinner
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SP_WPCF_Field_spinner' ) ) {
11
+ class SP_WPCF_Field_spinner extends SP_WPCF_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $args = wp_parse_args(
20
+ $this->field,
21
+ array(
22
+ 'max' => 100,
23
+ 'min' => 0,
24
+ 'step' => 1,
25
+ 'unit' => '',
26
+ )
27
+ );
28
+
29
+ echo $this->field_before();
30
+ echo '<div class="spf--spin">';
31
+ echo '<input type="text" name="' . $this->field_name() . '" value="' . $this->value . '"' . $this->field_attributes( array( 'class' => 'spf-number' ) ) . ' data-max="' . $args['max'] . '" data-min="' . $args['min'] . '" data-step="' . $args['step'] . '"/>';
32
+ echo ( ! empty( $args['unit'] ) ) ? '<div class="spf--unit">' . $args['unit'] . '</div>' : '';
33
+ echo '</div>';
34
+ echo '<div class="clear"></div>';
35
+ echo $this->field_after();
36
+
37
+ }
38
+
39
+ public function enqueue() {
40
+
41
+ if ( ! wp_script_is( 'jquery-ui-spinner' ) ) {
42
+ wp_enqueue_script( 'jquery-ui-spinner' );
43
+ }
44
+
45
+ }
46
+
47
+ public function output() {
48
+
49
+ $output = '';
50
+ $elements = ( is_array( $this->field['output'] ) ) ? $this->field['output'] : array_filter( (array) $this->field['output'] );
51
+ $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
52
+ $mode = ( ! empty( $this->field['output_mode'] ) ) ? $this->field['output_mode'] : 'width';
53
+ $unit = ( ! empty( $this->field['unit'] ) ) ? $this->field['unit'] : 'px';
54
+
55
+ if ( ! empty( $elements ) && isset( $this->value ) && $this->value !== '' ) {
56
+ foreach ( $elements as $key_property => $element ) {
57
+ if ( is_numeric( $key_property ) ) {
58
+ if ( $mode ) {
59
+ $output = implode( ',', $elements ) . '{' . $mode . ':' . $this->value . $unit . $important . ';}';
60
+ }
61
+ break;
62
+ } else {
63
+ $output .= $element . '{' . $key_property . ':' . $this->value . $unit . $important . '}';
64
+ }
65
+ }
66
+ }
67
+
68
+ $this->parent->output_css .= $output;
69
+
70
+ return $output;
71
+
72
+ }
73
+
74
+ }
75
+ }
admin/views/wpcfree-metabox/fields/subheading/subheading.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
+ /**
3
+ *
4
+ * Field: subheading
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ */
10
+ if( ! class_exists( 'SP_WPCF_Field_subheading' ) ) {
11
+ class SP_WPCF_Field_subheading extends SP_WPCF_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ echo ( ! empty( $this->field['content'] ) ) ? $this->field['content'] : '';
20
+
21
+ }
22
+
23
+ }
24
+ }
admin/views/wpcfree-metabox/fields/switcher/switcher.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: switcher
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SP_WPCF_Field_switcher' ) ) {
11
+ class SP_WPCF_Field_switcher extends SP_WPCF_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $active = ( ! empty( $this->value ) ) ? ' spf--active' : '';
20
+ $text_on = ( ! empty( $this->field['text_on'] ) ) ? $this->field['text_on'] : esc_html__( 'On', 'wp-carousel-free' );
21
+ $text_off = ( ! empty( $this->field['text_off'] ) ) ? $this->field['text_off'] : esc_html__( 'Off', 'wp-carousel-free' );
22
+ $text_width = ( ! empty( $this->field['text_width'] ) ) ? ' style="width: ' . $this->field['text_width'] . 'px;"' : '';
23
+
24
+ echo $this->field_before();
25
+
26
+ echo '<div class="spf--switcher' . $active . '"' . $text_width . '>';
27
+ echo '<span class="spf--on">' . $text_on . '</span>';
28
+ echo '<span class="spf--off">' . $text_off . '</span>';
29
+ echo '<span class="spf--ball"></span>';
30
+ echo '<input type="text" name="' . $this->field_name() . '" value="' . $this->value . '"' . $this->field_attributes() . ' />';
31
+ echo '</div>';
32
+
33
+ echo ( ! empty( $this->field['label'] ) ) ? '<span class="spf--label">' . $this->field['label'] . '</span>' : '';
34
+
35
+ echo '<div class="clear"></div>';
36
+
37
+ echo $this->field_after();
38
+
39
+ }
40
+
41
+ }
42
+ }
admin/views/wpcfree-metabox/fields/switcherf/switcherf.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: switcher
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SP_WPCF_Field_switcherf' ) ) {
11
+ class SP_WPCF_Field_switcherf extends SP_WPCF_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $text_off = ( ! empty( $this->field['text_off'] ) ) ? $this->field['text_off'] : esc_html__( 'Off', 'wp-carousel-free' );
20
+ $text_width = ( ! empty( $this->field['text_width'] ) ) ? ' style="width: ' . $this->field['text_width'] . 'px;"' : '';
21
+
22
+ echo $this->field_before();
23
+
24
+ echo '<div class="spf--switcher"' . $text_width . '>';
25
+ echo '<span class="spf--off">' . $text_off . '</span>';
26
+ echo '<span class="spf--ball"></span>';
27
+ echo '<input type="text" name="' . $this->field_name() . '" value="' . $this->value . '"' . $this->field_attributes() . ' />';
28
+ echo '</div>';
29
+
30
+ echo ( ! empty( $this->field['label'] ) ) ? '<span class="spf--label">' . $this->field['label'] . '</span>' : '';
31
+
32
+ echo '<div class="clear"></div>';
33
+
34
+ echo $this->field_after();
35
+
36
+ }
37
+
38
+ }
39
+ }
admin/views/wpcfree-metabox/fields/text/text.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
+ /**
3
+ *
4
+ * Field: text
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ */
10
+ if( ! class_exists( 'SP_WPCF_Field_text' ) ) {
11
+ class SP_WPCF_Field_text extends SP_WPCF_Fields {
12
+
13
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
14
+ parent::__construct( $field, $value, $unique, $where, $parent );
15
+ }
16
+
17
+ public function render() {
18
+
19
+ $type = ( ! empty( $this->field['attributes']['type'] ) ) ? $this->field['attributes']['type'] : 'text';
20
+
21
+ echo $this->field_before();
22
+
23
+ echo '<input type="'. $type .'" name="'. $this->field_name() .'" value="'. $this->value .'"'. $this->field_attributes() .' />';
24
+
25
+ echo $this->field_after();
26
+
27
+ }
28
+
29
+ }
30
+ }
admin/views/wpcfree-metabox/fields/typography/typography.php ADDED
@@ -0,0 +1,578 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Field: typography
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! class_exists( 'SP_WPCF_Field_typography' ) ) {
11
+ class SP_WPCF_Field_typography extends SP_WPCF_Fields {
12
+
13
+ public $chosen = false;
14
+
15
+ public $value = array();
16
+
17
+ public function __construct( $field, $value = '', $unique = '', $where = '', $parent = '' ) {
18
+ parent::__construct( $field, $value, $unique, $where, $parent );
19
+ }
20
+
21
+ public function render() {
22
+
23
+ echo $this->field_before();
24
+
25
+ $args = wp_parse_args(
26
+ $this->field,
27
+ array(
28
+ 'font_family' => true,
29
+ 'font_weight' => true,
30
+ 'font_style' => true,
31
+ 'font_size' => true,
32
+ 'line_height' => true,
33
+ 'letter_spacing' => true,
34
+ 'text_align' => true,
35
+ 'text_transform' => true,
36
+ 'color' => true,
37
+ 'hover_color' => false,
38
+ 'chosen' => true,
39
+ 'preview' => true,
40
+ 'subset' => true,
41
+ 'multi_subset' => false,
42
+ 'extra_styles' => false,
43
+ 'backup_font_family' => false,
44
+ 'font_variant' => false,
45
+ 'word_spacing' => false,
46
+ 'text_decoration' => false,
47
+ 'custom_style' => false,
48
+ 'exclude' => '',
49
+ 'unit' => 'px',
50
+ 'preview_text' => 'The quick brown fox jumps over the lazy dog',
51
+ )
52
+ );
53
+
54
+ $default_value = array(
55
+ 'font-family' => '',
56
+ 'font-weight' => '',
57
+ 'font-style' => '',
58
+ 'font-variant' => '',
59
+ 'font-size' => '',
60
+ 'line-height' => '',
61
+ 'letter-spacing' => '',
62
+ 'word-spacing' => '',
63
+ 'text-align' => '',
64
+ 'text-transform' => '',
65
+ 'text-decoration' => '',
66
+ 'backup-font-family' => '',
67
+ 'color' => '',
68
+ 'hover_color' => '',
69
+ 'custom-style' => '',
70
+ 'type' => '',
71
+ 'subset' => '',
72
+ 'extra-styles' => array(),
73
+ );
74
+
75
+ $default_value = ( ! empty( $this->field['default'] ) ) ? wp_parse_args( $this->field['default'], $default_value ) : $default_value;
76
+ $this->value = wp_parse_args( $this->value, $default_value );
77
+ $this->chosen = $args['chosen'];
78
+ $chosen_class = ( $this->chosen ) ? ' spf--chosen' : '';
79
+
80
+ echo '<div class="spf--typography' . $chosen_class . '" data-unit="' . $args['unit'] . '" data-exclude="' . $args['exclude'] . '">';
81
+
82
+ echo '<div class="spf--blocks spf--blocks-selects">';
83
+
84
+ //
85
+ // Font Family.
86
+ if ( ! empty( $args['font_family'] ) ) {
87
+ echo '<div class="spf--block">';
88
+ echo '<div class="spf--title">' . esc_html__( 'Font Family', 'wp-carousel-free' ) . '</div>';
89
+ echo '<select disabled name="sp_wpcp_shortcode_options[wpcp_section_title_typography][font-family]" class="spf--font-family" data-placeholder="Select a font" style="display: none;">
90
+ <option>Open Sans</option>
91
+ </select>';
92
+ echo '</div>';
93
+ }
94
+ // if ( ! empty( $args['font_family'] ) ) {
95
+ // echo '<div class="spf--block">';
96
+ // echo '<div class="spf--title">' . esc_html__( 'Font Family', 'wp-carousel-free' ) . '</div>';
97
+ // echo $this->create_select( array( $this->value['font-family'] => $this->value['font-family'] ), 'font-family', esc_html__( 'Select a font', 'wp-carousel-free' ) );
98
+ // echo '</div>';
99
+ // }
100
+
101
+ //
102
+ // Backup Font Family.
103
+ if ( ! empty( $args['backup_font_family'] ) ) {
104
+ echo '<div class="spf--block spf--block-backup-font-family hidden">';
105
+ echo '<div class="spf--title">' . esc_html__( 'Backup Font Family', 'wp-carousel-free' ) . '</div>';
106
+ echo $this->create_select(
107
+ apply_filters(
108
+ 'spf_field_typography_backup_font_family',
109
+ array(
110
+ 'Arial, Helvetica, sans-serif',
111
+ "'Arial Black', Gadget, sans-serif",
112
+ "'Comic Sans MS', cursive, sans-serif",
113
+ 'Impact, Charcoal, sans-serif',
114
+ "'Lucida Sans Unicode', 'Lucida Grande', sans-serif",
115
+ 'Tahoma, Geneva, sans-serif',
116
+ "'Trebuchet MS', Helvetica, sans-serif'",
117
+ 'Verdana, Geneva, sans-serif',
118
+ "'Courier New', Courier, monospace",
119
+ "'Lucida Console', Monaco, monospace",
120
+ 'Georgia, serif',
121
+ 'Palatino Linotype',
122
+ )
123
+ ),
124
+ 'backup-font-family',
125
+ esc_html__( 'Default', 'wp-carousel-free' )
126
+ );
127
+ echo '</div>';
128
+ }
129
+
130
+ //
131
+ // Font Style and Extra Style Select.
132
+ if ( ! empty( $args['font_weight'] ) || ! empty( $args['font_style'] ) ) {
133
+
134
+ //
135
+ // Font Style Select.
136
+ echo '<div class="spf--block spf--block-font-style hidden">';
137
+ echo '<div class="spf--title">' . esc_html__( 'Font Style', 'wp-carousel-free' ) . '</div>';
138
+ echo '<select disabled class="spf--font-style-select" data-placeholder="Default">';
139
+ echo '<option disabled value="">' . ( ! $this->chosen ? esc_html__( 'Default', 'wp-carousel-free' ) : '' ) . '</option>';
140
+ if ( ! empty( $this->value['font-weight'] ) || ! empty( $this->value['font-style'] ) ) {
141
+ echo '<option disabled value="' . strtolower( $this->value['font-weight'] . $this->value['font-style'] ) . '" selected></option>';
142
+ }
143
+ echo '</select>';
144
+ echo '<input disabled type="hidden" name="' . $this->field_name( '[font-weight]' ) . '" class="spf--font-weight" value="' . $this->value['font-weight'] . '" />';
145
+ echo '<input disabled type="hidden" name="' . $this->field_name( '[font-style]' ) . '" class="spf--font-style" value="' . $this->value['font-style'] . '" />';
146
+
147
+ //
148
+ // Extra Font Style Select.
149
+ if ( ! empty( $args['extra_styles'] ) ) {
150
+ echo '<div class="spf--block-extra-styles hidden">';
151
+ echo ( ! $this->chosen ) ? '<div class="spf--title">' . esc_html__( 'Load Extra Styles', 'wp-carousel-free' ) . '</div>' : '';
152
+ $placeholder = ( $this->chosen ) ? esc_html__( 'Load Extra Styles', 'wp-carousel-free' ) : esc_html__( 'Default', 'wp-carousel-free' );
153
+ echo $this->create_select( $this->value['extra-styles'], 'extra-styles', $placeholder, true );
154
+ echo '</div>';
155
+ }
156
+
157
+ echo '</div>';
158
+
159
+ }
160
+
161
+ //
162
+ // Subset.
163
+ if ( ! empty( $args['subset'] ) ) {
164
+ echo '<div class="spf--block spf--block-subset hidden">';
165
+ echo '<div class="spf--title">' . esc_html__( 'Subset', 'wp-carousel-free' ) . '</div>';
166
+ $subset = ( is_array( $this->value['subset'] ) ) ? $this->value['subset'] : array_filter( (array) $this->value['subset'] );
167
+ echo '<select disabled name="sp_wpcp_shortcode_options[wpcp_section_title_typography][subset]" class="spf--subset" data-placeholder="Default" style="display: none;"><option value="default"></option></select>';
168
+ echo '</div>';
169
+ }
170
+
171
+ //
172
+ // Text Align.
173
+ if ( ! empty( $args['text_align'] ) ) {
174
+ echo '<div class="spf--block">';
175
+ echo '<div class="spf--title">' . esc_html__( 'Text Align', 'wp-carousel-free' ) . '</div>';
176
+ // echo $this->create_select(
177
+ // array(
178
+ // 'inherit' => esc_html__( 'Inherit', 'wp-carousel-free' ),
179
+ // 'left' => esc_html__( 'Left', 'wp-carousel-free' ),
180
+ // 'center' => esc_html__( 'Center', 'wp-carousel-free' ),
181
+ // 'right' => esc_html__( 'Right', 'wp-carousel-free' ),
182
+ // 'justify' => esc_html__( 'Justify', 'wp-carousel-free' ),
183
+ // 'initial' => esc_html__( 'Initial', 'wp-carousel-free' ),
184
+ // ),
185
+ // 'text-align',
186
+ // esc_html__( 'Default', 'wp-carousel-free' )
187
+ // );
188
+ echo '<select disabled name="sp_wpcp_shortcode_options[wpcp_section_title_typography][text-align]" class="spf--text-align" data-placeholder="Center" style="display: none;"><option value="">Center</option></select>';
189
+ echo '</div>';
190
+ }
191
+
192
+ //
193
+ // Font Variant.
194
+ if ( ! empty( $args['font_variant'] ) ) {
195
+ echo '<div class="spf--block">';
196
+ echo '<div class="spf--title">' . esc_html__( 'Font Variant', 'wp-carousel-free' ) . '</div>';
197
+ echo $this->create_select(
198
+ array(
199
+ 'normal' => esc_html__( 'Normal', 'wp-carousel-free' ),
200
+ 'small-caps' => esc_html__( 'Small Caps', 'wp-carousel-free' ),
201
+ 'all-small-caps' => esc_html__( 'All Small Caps', 'wp-carousel-free' ),
202
+ ),
203
+ 'font-variant',
204
+ esc_html__( 'Default', 'wp-carousel-free' )
205
+ );
206
+ echo '</div>';
207
+ }
208
+
209
+ //
210
+ // Text Transform.
211
+ if ( ! empty( $args['text_transform'] ) ) {
212
+ echo '<div class="spf--block">';
213
+ echo '<div class="spf--title">' . esc_html__( 'Text Transform', 'wp-carousel-free' ) . '</div>';
214
+ echo '<select disabled name="sp_wpcp_shortcode_options[wpcp_title_typography][text-align]" class="spf--text-align" data-placeholder="Default" style="display: none;"><option value="none">None</option></select>';
215
+ echo '</div>';
216
+ }
217
+
218
+ //
219
+ // Text Decoration.
220
+ if ( ! empty( $args['text_decoration'] ) ) {
221
+ echo '<div class="spf--block">';
222
+ echo '<div class="spf--title">' . esc_html__( 'Text Decoration', 'wp-carousel-free' ) . '</div>';
223
+ echo $this->create_select(
224
+ array(
225
+ 'none' => esc_html__( 'None', 'wp-carousel-free' ),
226
+ 'underline' => esc_html__( 'Solid', 'wp-carousel-free' ),
227
+ 'underline double' => esc_html__( 'Double', 'wp-carousel-free' ),
228
+ 'underline dotted' => esc_html__( 'Dotted', 'wp-carousel-free' ),
229
+ 'underline dashed' => esc_html__( 'Dashed', 'wp-carousel-free' ),
230
+ 'underline wavy' => esc_html__( 'Wavy', 'wp-carousel-free' ),
231
+ 'underline overline' => esc_html__( 'Overline', 'wp-carousel-free' ),
232
+ 'line-through' => esc_html__( 'Line-through', 'wp-carousel-free' ),
233
+ ),
234
+ 'text-decoration',
235
+ esc_html__( 'Default', 'wp-carousel-free' )
236
+ );
237
+ echo '</div>';
238
+ }
239
+
240
+ echo '</div>'; // End of .spf--blocks-selects.
241
+
242
+ echo '<div class="spf--blocks spf--blocks-inputs">';
243
+
244
+ //
245
+ // Font Size
246
+ if ( ! empty( $args['font_size'] ) ) {
247
+ echo '<div class="spf--block">';
248
+ echo '<div class="spf--title">' . esc_html__( 'Font Size', 'wp-carousel-free' ) . '</div>';
249
+ echo '<div class="spf--blocks">';
250
+ echo '<div class="spf--block"><input disabled type="text" name="' . $this->field_name( '[font-size]' ) . '" class="spf--font-size spf--input spf-number" value="' . $this->value['font-size'] . '" /></div>';
251
+ echo '<div class="spf--block spf--unit">' . $args['unit'] . '</div>';
252
+ echo '</div>';
253
+ echo '</div>';
254
+ }
255
+
256
+ //
257
+ // Line Height.
258
+ if ( ! empty( $args['line_height'] ) ) {
259
+ echo '<div class="spf--block">';
260
+ echo '<div class="spf--title">' . esc_html__( 'Line Height', 'wp-carousel-free' ) . '</div>';
261
+ echo '<div class="spf--blocks">';
262
+ echo '<div class="spf--block"><input disabled type="text" name="' . $this->field_name( '[line-height]' ) . '" class="spf--line-height spf--input spf-number" value="' . $this->value['line-height'] . '" /></div>';
263
+ echo '<div class="spf--block spf--unit">' . $args['unit'] . '</div>';
264
+ echo '</div>';
265
+ echo '</div>';
266
+ }
267
+
268
+ //
269
+ // Letter Spacing.
270
+ if ( ! empty( $args['letter_spacing'] ) ) {
271
+ echo '<div class="spf--block">';
272
+ echo '<div class="spf--title">' . esc_html__( 'Letter Spacing', 'wp-carousel-free' ) . '</div>';
273
+ echo '<div class="spf--blocks">';
274
+ echo '<div class="spf--block"><input disabled type="text" name="' . $this->field_name( '[letter-spacing]' ) . '" class="spf--letter-spacing spf--input spf-number" value="' . $this->value['letter-spacing'] . '" /></div>';
275
+ echo '<div class="spf--block spf--unit">' . $args['unit'] . '</div>';
276
+ echo '</div>';
277
+ echo '</div>';
278
+ }
279
+
280
+ //
281
+ // Word Spacing.
282
+ if ( ! empty( $args['word_spacing'] ) ) {
283
+ echo '<div class="spf--block">';
284
+ echo '<div class="spf--title">' . esc_html__( 'Word Spacing', 'wp-carousel-free' ) . '</div>';
285
+ echo '<div class="spf--blocks">';
286
+ echo '<div class="spf--block"><input disabled type="text" name="' . $this->field_name( '[word-spacing]' ) . '" class="spf--word-spacing spf--input spf-number" value="' . $this->value['word-spacing'] . '" /></div>';
287
+ echo '<div class="spf--block spf--unit">' . $args['unit'] . '</div>';
288
+ echo '</div>';
289
+ echo '</div>';
290
+ }
291
+
292
+ echo '</div>'; // End of spf--blocks-inputs.
293
+
294
+ //
295
+ // Font Color.
296
+ if ( ! empty( $args['color'] ) ) {
297
+ echo '<div class="spf--blocks spf--blocks-color">';
298
+ $default_color_attr = ( ! empty( $default_value['color'] ) ) ? ' data-default-color="' . $default_value['color'] . '"' : '';
299
+ echo '<div class="spf--block spf--block-font-color">';
300
+ echo '<div class="spf--title">' . esc_html__( 'Font Color', 'wp-carousel-free' ) . '</div>';
301
+ echo '<div class="spf-field-color">';
302
+ echo '<input disabled type="text" name="' . $this->field_name( '[color]' ) . '" class="spf-color spf--color" value="' . $this->value['color'] . '"' . $default_color_attr . ' />';
303
+ echo '</div>';
304
+ echo '</div>';
305
+
306
+ //
307
+ // Font Hover Color.
308
+ if ( ! empty( $args['hover_color'] ) ) {
309
+ $default_hover_color_attr = ( ! empty( $default_value['hover_color'] ) ) ? ' data-default-color="' . $default_value['hover_color'] . '"' : '';
310
+ echo '<div class="spf--block spf--block-font-color">';
311
+ echo '<div class="spf--title">' . esc_html__( 'Font Hover Color', 'wp-carousel-free' ) . '</div>';
312
+ echo '<div class="spf-field-color">';
313
+ echo '<input disabled type="text" name="' . $this->field_name( '[hover_color]' ) . '" class="spf-color spf--color" value="' . $this->value['hover_color'] . '"' . $default_hover_color_attr . ' />';
314
+ echo '</div>';
315
+ echo '</div>';
316
+ }
317
+ echo '</div>'; // End of spf--blocks-color
318
+ }
319
+
320
+ //
321
+ // Custom style.
322
+ if ( ! empty( $args['custom_style'] ) ) {
323
+ echo '<div class="spf--block spf--block-custom-style">';
324
+ echo '<div class="spf--title">' . esc_html__( 'Custom Style', 'wp-carousel-free' ) . '</div>';
325
+ echo '<textarea name="' . $this->field_name( '[custom-style]' ) . '" class="spf--custom-style">' . $this->value['custom-style'] . '</textarea>';
326
+ echo '</div>';
327
+ }
328
+
329
+ //
330
+ // Preview.
331
+ $always_preview = ( $args['preview'] !== 'always' ) ? ' hidden' : '';
332
+
333
+ if ( ! empty( $args['preview'] ) ) {
334
+ echo '<div class="spf--block spf--block-preview' . $always_preview . '">';
335
+ echo '<div class="spf--toggle fa fa-toggle-off"></div>';
336
+ echo '<div class="spf--preview">' . $args['preview_text'] . '</div>';
337
+ echo '</div>';
338
+ }
339
+
340
+ echo '<input type="hidden" name="' . $this->field_name( '[type]' ) . '" class="spf--type" value="' . $this->value['type'] . '" />';
341
+ echo '<input type="hidden" name="' . $this->field_name( '[unit]' ) . '" class="spf--unit-save" value="' . $args['unit'] . '" />';
342
+
343
+ echo '</div>';
344
+
345
+ echo $this->field_after();
346
+
347
+ }
348
+
349
+ public function create_select( $options, $name, $placeholder = '', $is_multiple = false ) {
350
+
351
+ $multiple_name = ( $is_multiple ) ? '[]' : '';
352
+ $multiple_attr = ( $is_multiple ) ? ' multiple data-multiple="true"' : '';
353
+ $chosen_rtl = ( $this->chosen && is_rtl() ) ? ' chosen-rtl' : '';
354
+
355
+ $output = '<select name="' . $this->field_name( '[' . $name . ']' . $multiple_name ) . '" class="spf--' . $name . $chosen_rtl . '" data-placeholder="' . $placeholder . '"' . $multiple_attr . '>';
356
+ $output .= ( ! empty( $placeholder ) ) ? '<option value="">' . ( ( ! $this->chosen ) ? $placeholder : '' ) . '</option>' : '';
357
+
358
+ if ( ! empty( $options ) ) {
359
+ foreach ( $options as $option_key => $option_value ) {
360
+ if ( $is_multiple ) {
361
+ $selected = ( in_array( $option_value, $this->value[ $name ] ) ) ? ' selected' : '';
362
+ $output .= '<option disabled value="' . $option_value . '"' . $selected . '>' . $option_value . '</option>';
363
+ } else {
364
+ $option_key = ( is_numeric( $option_key ) ) ? $option_value : $option_key;
365
+ $selected = ( $option_key === $this->value[ $name ] ) ? ' selected' : '';
366
+ $output .= '<option disabled value="' . $option_key . '"' . $selected . '>' . $option_value . '</option>';
367
+ }
368
+ }
369
+ }
370
+
371
+ $output .= '</select>';
372
+
373
+ return $output;
374
+
375
+ }
376
+
377
+ public function enqueue() {
378
+
379
+ if ( ! wp_style_is( 'spf-webfont-loader' ) ) {
380
+
381
+ wp_enqueue_script( 'spf-webfont-loader', 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js', array( 'spf' ), '1.6.28', true );
382
+
383
+ $webfonts = array();
384
+
385
+ $customwebfonts = apply_filters( 'spf_field_typography_customwebfonts', array() );
386
+
387
+ if ( ! empty( $customwebfonts ) ) {
388
+ $webfonts['custom'] = array(
389
+ 'label' => esc_html__( 'Custom Web Fonts', 'wp-carousel-free' ),
390
+ 'fonts' => $customwebfonts,
391
+ );
392
+ }
393
+
394
+ $webfonts['safe'] = array(
395
+ 'label' => esc_html__( 'Safe Web Fonts', 'wp-carousel-free' ),
396
+ 'fonts' => apply_filters(
397
+ 'spf_field_typography_safewebfonts',
398
+ array(
399
+ 'Arial',
400
+ 'Arial Black',
401
+ 'Helvetica',
402
+ 'Times New Roman',
403
+ 'Courier New',
404
+ 'Tahoma',
405
+ 'Verdana',
406
+ 'Impact',
407
+ 'Trebuchet MS',
408
+ 'Comic Sans MS',
409
+ 'Lucida Console',
410
+ 'Lucida Sans Unicode',
411
+ 'Georgia, serif',
412
+ 'Palatino Linotype',
413
+ )
414
+ ),
415
+ );
416
+
417
+ $webfonts['google'] = array(
418
+ 'label' => esc_html__( 'Google Web Fonts', 'wp-carousel-free' ),
419
+ 'spf_field_typography_googlewebfonts',
420
+ );
421
+
422
+ $defaultstyles = apply_filters( 'spf_field_typography_defaultstyles', array( 'normal', 'italic', '700', '700italic' ) );
423
+
424
+ $googlestyles = apply_filters(
425
+ 'spf_field_typography_googlestyles',
426
+ array(
427
+ '100' => 'Thin 100',
428
+ '100italic' => 'Thin 100 Italic',
429
+ '200' => 'Extra-Light 200',
430
+ '200italic' => 'Extra-Light 200 Italic',
431
+ '300' => 'Light 300',
432
+ '300italic' => 'Light 300 Italic',
433
+ 'normal' => 'Normal 400',
434
+ 'italic' => 'Normal 400 Italic',
435
+ '500' => 'Medium 500',
436
+ '500italic' => 'Medium 500 Italic',
437
+ '600' => 'Semi-Bold 600',
438
+ '600italic' => 'Semi-Bold 600 Italic',
439
+ '700' => 'Bold 700',
440
+ '700italic' => 'Bold 700 Italic',
441
+ '800' => 'Extra-Bold 800',
442
+ '800italic' => 'Extra-Bold 800 Italic',
443
+ '900' => 'Black 900',
444
+ '900italic' => 'Black 900 Italic',
445
+ )
446
+ );
447
+
448
+ $webfonts = apply_filters( 'spf_field_typography_webfonts', $webfonts );
449
+
450
+ wp_localize_script(
451
+ 'spf',
452
+ 'spf_typography_json',
453
+ array(
454
+ 'webfonts' => $webfonts,
455
+ 'defaultstyles' => $defaultstyles,
456
+ 'googlestyles' => $googlestyles,
457
+ )
458
+ );
459
+
460
+ }
461
+
462
+ }
463
+
464
+ public function enqueue_google_fonts() {
465
+
466
+ $value = $this->value;
467
+ $families = array();
468
+ $is_google = false;
469
+
470
+ if ( ! empty( $this->value['type'] ) ) {
471
+ $is_google = ( $this->value['type'] === 'google' ) ? true : false;
472
+ } else {
473
+ SP_WPCF::include_plugin_file( 'fields/typography/google-fonts.php' );
474
+ $is_google = ( array_key_exists( $this->value['font-family'], spf_get_google_fonts() ) ) ? true : false;
475
+ }
476
+
477
+ if ( $is_google ) {
478
+
479
+ // set style
480
+ $font_weight = ( ! empty( $value['font-weight'] ) ) ? $value['font-weight'] : '';
481
+ $font_style = ( ! empty( $value['font-style'] ) ) ? $value['font-style'] : '';
482
+
483
+ if ( $font_weight || $font_style ) {
484
+ $style = $font_weight . $font_style;
485
+ $families['style'][ $style ] = $style;
486
+ }
487
+
488
+ // set extra styles
489
+ if ( ! empty( $value['extra-styles'] ) ) {
490
+ foreach ( $value['extra-styles'] as $extra_style ) {
491
+ $families['style'][ $extra_style ] = $extra_style;
492
+ }
493
+ }
494
+
495
+ // set subsets
496
+ if ( ! empty( $value['subset'] ) ) {
497
+ $value['subset'] = ( is_array( $value['subset'] ) ) ? $value['subset'] : array_filter( (array) $value['subset'] );
498
+ foreach ( $value['subset'] as $subset ) {
499
+ $families['subset'][ $subset ] = $subset;
500
+ }
501
+ }
502
+
503
+ $all_styles = ( ! empty( $families['style'] ) ) ? ':' . implode( ',', $families['style'] ) : '';
504
+ $all_subsets = ( ! empty( $families['subset'] ) ) ? ':' . implode( ',', $families['subset'] ) : '';
505
+
506
+ $families = $this->value['font-family'] . str_replace( array( 'normal', 'italic' ), array( 'n', 'i' ), $all_styles ) . $all_subsets;
507
+
508
+ $this->parent->typographies[] = $families;
509
+
510
+ return $families;
511
+
512
+ }
513
+
514
+ return false;
515
+
516
+ }
517
+
518
+ // public function output() {
519
+
520
+ // $output = '';
521
+ // $bg_image = array();
522
+ // $important = ( ! empty( $this->field['output_important'] ) ) ? '!important' : '';
523
+ // $element = ( is_array( $this->field['output'] ) ) ? join( ',', $this->field['output'] ) : $this->field['output'];
524
+
525
+ // $font_family = ( ! empty( $this->value['font-family'] ) ) ? $this->value['font-family'] : '';
526
+ // $backup_family = ( ! empty( $this->value['backup-font-family'] ) ) ? ', ' . $this->value['backup-font-family'] : '';
527
+
528
+ // if ( $font_family ) {
529
+ // $output .= 'font-family:"' . $font_family . '"' . $backup_family . $important . ';';
530
+ // }
531
+
532
+ // // Common font properties
533
+ // $properties = array(
534
+ // 'color',
535
+ // 'hover_color',
536
+ // 'font-weight',
537
+ // 'font-style',
538
+ // 'font-variant',
539
+ // 'text-align',
540
+ // 'text-transform',
541
+ // 'text-decoration',
542
+ // );
543
+
544
+ // foreach ( $properties as $property ) {
545
+ // if ( isset( $this->value[ $property ] ) && $this->value[ $property ] !== '' ) {
546
+ // $output .= $property . ':' . $this->value[ $property ] . $important . ';';
547
+ // }
548
+ // }
549
+
550
+ // $properties = array(
551
+ // 'font-size',
552
+ // 'line-height',
553
+ // 'letter-spacing',
554
+ // 'word-spacing',
555
+ // );
556
+
557
+ // $unit = ( ! empty( $this->value['unit'] ) ) ? $this->value['unit'] : '';
558
+
559
+ // foreach ( $properties as $property ) {
560
+ // if ( isset( $this->value[ $property ] ) && $this->value[ $property ] !== '' ) {
561
+ // $output .= $property . ':' . $this->value[ $property ] . $unit . $important . ';';
562
+ // }
563
+ // }
564
+
565
+ // $custom_style = ( ! empty( $this->value['custom-style'] ) ) ? $this->value['custom-style'] : '';
566
+
567
+ // if ( $output ) {
568
+ // $output = $element . '{' . $output . $custom_style . '}';
569
+ // }
570
+
571
+ // $this->parent->output_css .= $output;
572
+
573
+ // return $output;
574
+
575
+ // }
576
+
577
+ }
578
+ }
admin/views/wpcfree-metabox/functions/actions.php ADDED
@@ -0,0 +1,254 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+
4
+
5
+ if ( ! function_exists( 'wpcf_get_option' ) ) {
6
+ /**
7
+ * The wpcf_get_option function.
8
+ *
9
+ * @param string $option The option unique ID.
10
+ * @param mixed $default The default value for the option.
11
+ * @return statement
12
+ */
13
+ function wpcf_get_option( $option = '', $default = null ) {
14
+ $options = get_option( 'sp_wpcp_settings' );
15
+ return ( isset( $options[ $option ] ) ) ? $options[ $option ] : $default;
16
+ }
17
+ }
18
+
19
+
20
+ /**
21
+ * Populate the taxonomy name list to he select option.
22
+ *
23
+ * @return void
24
+ */
25
+ function wpcf_get_taxonomies() {
26
+ extract( $_REQUEST );
27
+ $taxonomy_names = get_object_taxonomies( array( 'post_type' => $wpcp_post_type ), 'names' );
28
+ foreach ( $taxonomy_names as $key => $label ) {
29
+ echo '<option value="' . $label . '">' . $label . '</option>';
30
+ }
31
+ die( 0 );
32
+ }
33
+ add_action( 'wp_ajax_wpcf_get_taxonomies', 'wpcf_get_taxonomies' );
34
+
35
+ /**
36
+ * Populate the taxonomy terms list to the select option.
37
+ *
38
+ * @return void
39
+ */
40
+ function wpcf_get_terms() {
41
+ extract( $_REQUEST );
42
+ $terms = get_terms( $wpcp_post_taxonomy );
43
+ foreach ( $terms as $key => $value ) {
44
+ echo '<option value="' . $value->term_id . '">' . $value->name . '</option>';
45
+ }
46
+ die( 0 );
47
+ }
48
+ add_action( 'wp_ajax_wpcf_get_terms', 'wpcf_get_terms' );
49
+
50
+ /**
51
+ * Get specific post to the select box.
52
+ *
53
+ * @return void
54
+ */
55
+ function wpcf_get_posts() {
56
+ extract( $_REQUEST );
57
+ $all_posts = get_posts(
58
+ array(
59
+ 'post_type' => $wpcp_post_type,
60
+ 'posts_per_page' => -1,
61
+ )
62
+ );
63
+ foreach ( $all_posts as $key => $post_obj ) {
64
+ echo '<option value="' . $post_obj->ID . '">' . $post_obj->post_title . '</option>';
65
+ }
66
+ die( 0 );
67
+ }
68
+ add_action( 'wp_ajax_wpcf_get_posts', 'wpcf_get_posts' );
69
+
70
+ /**
71
+ *
72
+ * Get icons from admin ajax
73
+ *
74
+ * @since 1.0.0
75
+ * @version 1.0.0
76
+ */
77
+ if ( ! function_exists( 'spf_get_icons' ) ) {
78
+ function spf_get_icons() {
79
+
80
+ if ( ! empty( $_POST['nonce'] ) && wp_verify_nonce( $_POST['nonce'], 'spf_icon_nonce' ) ) {
81
+
82
+ ob_start();
83
+
84
+ SP_WPCF::include_plugin_file( 'fields/icon/default-icons.php' );
85
+
86
+ $icon_lists = apply_filters( 'spf_field_icon_add_icons', spf_get_default_icons() );
87
+
88
+ if ( ! empty( $icon_lists ) ) {
89
+
90
+ foreach ( $icon_lists as $list ) {
91
+
92
+ echo ( count( $icon_lists ) >= 2 ) ? '<div class="spf-icon-title">' . $list['title'] . '</div>' : '';
93
+
94
+ foreach ( $list['icons'] as $icon ) {
95
+ echo '<a class="spf-icon-tooltip" data-spf-icon="' . $icon . '" title="' . $icon . '"><span class="spf-icon spf-selector"><i class="' . $icon . '"></i></span></a>';
96
+ }
97
+ }
98
+ } else {
99
+
100
+ echo '<div class="spf-text-error">' . esc_html__( 'No data provided by developer', 'wp-carousel-free' ) . '</div>';
101
+
102
+ }
103
+
104
+ wp_send_json_success(
105
+ array(
106
+ 'success' => true,
107
+ 'content' => ob_get_clean(),
108
+ )
109
+ );
110
+
111
+ } else {
112
+
113
+ wp_send_json_error(
114
+ array(
115
+ 'success' => false,
116
+ 'error' => esc_html__( 'Error while saving.', 'wp-carousel-free' ),
117
+ 'debug' => $_REQUEST,
118
+ )
119
+ );
120
+
121
+ }
122
+
123
+ }
124
+ add_action( 'wp_ajax_spf-get-icons', 'spf_get_icons' );
125
+ }
126
+
127
+ /**
128
+ *
129
+ * Export
130
+ *
131
+ * @since 1.0.0
132
+ * @version 1.0.0
133
+ */
134
+ if ( ! function_exists( 'spf_export' ) ) {
135
+ function spf_export() {
136
+
137
+ if ( ! empty( $_GET['export'] ) && ! empty( $_GET['nonce'] ) && wp_verify_nonce( $_GET['nonce'], 'spf_backup_nonce' ) ) {
138
+
139
+ header( 'Content-Type: application/json' );
140
+ header( 'Content-disposition: attachment; filename=backup-' . gmdate( 'd-m-Y' ) . '.json' );
141
+ header( 'Content-Transfer-Encoding: binary' );
142
+ header( 'Pragma: no-cache' );
143
+ header( 'Expires: 0' );
144
+
145
+ echo json_encode( get_option( wp_unslash( $_GET['export'] ) ) );
146
+
147
+ }
148
+
149
+ die();
150
+ }
151
+ add_action( 'wp_ajax_spf-export', 'spf_export' );
152
+ }
153
+
154
+
155
+ /**
156
+ *
157
+ * Import Ajax
158
+ *
159
+ * @since 1.0.0
160
+ * @version 1.0.0
161
+ */
162
+ if ( ! function_exists( 'spf_import_ajax' ) ) {
163
+ function spf_import_ajax() {
164
+
165
+ if ( ! empty( $_POST['import_data'] ) && ! empty( $_POST['unique'] ) && ! empty( $_POST['nonce'] ) && wp_verify_nonce( $_POST['nonce'], 'spf_backup_nonce' ) ) {
166
+
167
+ // $import_data = unserialize( stripslashes( trim( $_POST['import_data'] ) ) );
168
+ $import_data = json_decode( wp_unslash( trim( $_POST['import_data'] ) ), true );
169
+
170
+ if ( is_array( $import_data ) ) {
171
+
172
+ update_option( wp_unslash( $_POST['unique'] ), wp_unslash( $import_data ) );
173
+ wp_send_json_success( array( 'success' => true ) );
174
+
175
+ }
176
+ }
177
+
178
+ wp_send_json_error(
179
+ array(
180
+ 'success' => false,
181
+ 'error' => esc_html__( 'Error while saving.', 'wp-carousel-free' ),
182
+ 'debug' => $_REQUEST,
183
+ )
184
+ );
185
+
186
+ }
187
+ add_action( 'wp_ajax_spf-import', 'spf_import_ajax' );
188
+ }
189
+
190
+ /**
191
+ *
192
+ * Reset Ajax
193
+ *
194
+ * @since 1.0.0
195
+ * @version 1.0.0
196
+ */
197
+ if ( ! function_exists( 'spf_reset_ajax' ) ) {
198
+ function spf_reset_ajax() {
199
+
200
+ if ( ! empty( $_POST['unique'] ) && ! empty( $_POST['nonce'] ) && wp_verify_nonce( $_POST['nonce'], 'spf_backup_nonce' ) ) {
201
+ delete_option( wp_unslash( $_POST['unique'] ) );
202
+ wp_send_json_success( array( 'success' => true ) );
203
+ }
204
+
205
+ wp_send_json_error(
206
+ array(
207
+ 'success' => false,
208
+ 'error' => esc_html__( 'Error while saving.', 'wp-carousel-free' ),
209
+ 'debug' => $_REQUEST,
210
+ )
211
+ );
212
+ }
213
+ add_action( 'wp_ajax_spf-reset', 'spf_reset_ajax' );
214
+ }
215
+
216
+ /**
217
+ *
218
+ * Set icons for wp dialog
219
+ *
220
+ * @since 1.0.0
221
+ * @version 1.0.0
222
+ */
223
+ if ( ! function_exists( 'spf_set_icons' ) ) {
224
+ function spf_set_icons() {
225
+ global $post_type;
226
+ if ( 'sp_wp_carousel' === $post_type ) {
227
+ ?>
228
+ <div id="spf-modal-icon" class="spf-modal spf-modal-icon">
229
+ <div class="spf-modal-table">
230
+ <div class="spf-modal-table-cell">
231
+ <div class="spf-modal-overlay"></div>
232
+ <div class="spf-modal-inner">
233
+ <div class="spf-modal-title">
234
+ <?php esc_html_e( 'Add Icon', 'wp-carousel-free' ); ?>
235
+ <div class="spf-modal-close spf-icon-close"></div>
236
+ </div>
237
+ <div class="spf-modal-header spf-text-center">
238
+ <input type="text" placeholder="<?php esc_html_e( 'Search a Icon...', 'wp-carousel-free' ); ?>" class="spf-icon-search" />
239
+ </div>
240
+ <div class="spf-modal-content">
241
+ <div class="spf-modal-loading"><div class="spf-loading"></div></div>
242
+ <div class="spf-modal-load"></div>
243
+ </div>
244
+ </div>
245
+ </div>
246
+ </div>
247
+ </div>
248
+ <?php
249
+ }
250
+
251
+ }
252
+ add_action( 'admin_footer', 'spf_set_icons' );
253
+ add_action( 'customize_controls_print_footer_scripts', 'spf_set_icons' );
254
+ }
admin/views/wpcfree-metabox/functions/customize.php ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
+ /**
3
+ *
4
+ * WP Customize custom panel
5
+ *
6
+ * @since 1.0.0
7
+ * @version 1.0.0
8
+ *
9
+ */
10
+ if( ! class_exists( 'WP_Customize_Panel_SP_WPCF' ) && class_exists( 'WP_Customize_Panel' ) ) {
11
+ class WP_Customize_Panel_SP_WPCF extends WP_Customize_Panel {
12
+ public $type = 'spf';
13
+ }
14
+ }
15
+
16
+ /**
17
+ *
18
+ * WP Customize custom section
19
+ *
20
+ * @since 1.0.0
21
+ * @version 1.0.0
22
+ *
23
+ */
24
+ if( ! class_exists( 'WP_Customize_Section_SP_WPCF' ) && class_exists( 'WP_Customize_Section' ) ) {
25
+ class WP_Customize_Section_SP_WPCF extends WP_Customize_Section {
26
+ public $type = 'spf';
27
+ }
28
+ }
29
+
30
+ /**
31
+ *
32
+ * WP Customize custom control
33
+ *
34
+ * @since 1.0.0
35
+ * @version 1.0.0
36
+ *
37
+ */
38
+ if( ! class_exists( 'WP_Customize_Control_SP_WPCF' ) && class_exists( 'WP_Customize_Control' ) ) {
39
+ class WP_Customize_Control_SP_WPCF extends WP_Customize_Control {
40
+
41
+ public $type = 'spf';
42
+ public $field = '';
43
+ public $unique = '';
44
+
45
+ protected function render() {
46
+
47
+ $depend = '';
48
+ $hidden = '';
49
+
50
+ if ( ! empty( $this->field['dependency'] ) ) {
51
+ $hidden = ' spf-dependency-control hidden';
52
+ $depend .= ' data-controller="'. $this->field['dependency'][0] .'"';
53
+ $depend .= ' data-condition="'. $this->field['dependency'][1] .'"';
54
+ $depend .= ' data-value="'. $this->field['dependency'][2] .'"';
55
+ }
56
+
57
+ $id = 'customize-control-' . str_replace( array( '[', ']' ), array( '-', '' ), $this->id );
58
+ $class = 'customize-control customize-control-' . $this->type . $hidden;
59
+
60
+ echo '<li id="'. $id .'" class="'. $class .'"'. $depend .'>';
61
+ $this->render_content();
62
+ echo '</li>';
63
+
64
+ }
65
+
66
+ public function render_content() {
67
+
68
+ $complex = array(
69
+ 'accordion',
70
+ 'background',
71
+ 'backup',
72
+ 'border',
73
+ 'button_set',
74
+ 'checkbox',
75
+ 'color_group',
76
+ 'date',
77
+ 'dimensions',
78
+ 'fieldset',
79
+ 'group',
80
+ 'image_select',
81
+ 'link_color',
82
+ 'media',
83
+ 'palette',
84
+ 'repeater',
85
+ 'sortable',
86
+ 'sorter',
87
+ 'switcher',
88
+ 'tabbed',
89
+ 'typography'
90
+ );
91
+
92
+ $field_id = ( ! empty( $this->field['id'] ) ) ? $this->field['id'] : '';
93
+ $custom = ( ! empty( $this->field['customizer'] ) ) ? true : false;
94
+ $is_complex = ( in_array( $this->field['type'], $complex ) ) ? true : false;
95
+ $class = ( $is_complex || $custom ) ? ' spf-customize-complex' : '';
96
+ $atts = ( $is_complex || $custom ) ? ' data-unique-id="'. $this->unique .'" data-option-id="'. $field_id .'"' : '';
97
+
98
+ if( ! $is_complex && ! $custom ) {
99
+ $this->field['attributes']['data-customize-setting-link'] = $this->settings['default']->id;
100
+ }
101
+
102
+ $this->field['name'] = $this->settings['default']->id;
103
+
104
+ $this->field['dependency'] = array();
105
+
106
+ echo '<div class="spf-customize-field'. $class .'"'. $atts .'>';
107
+
108
+ SP_WPCF::field( $this->field, $this->value(), $this->unique, 'customize' );
109
+
110
+ echo '</div>';
111
+
112
+ }
113
+
114
+ }
115
+ }
admin/views/wpcfree-metabox/functions/deprecated.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access directly.
2
+ /**
3
+ *
4
+ * Deprecated framework functions from past framework versions. You shouldn't use these
5
+ * functions and look for the alternatives instead. The functions will be removed in a later version.
6
+ *
7
+ */
admin/views/wpcfree-metabox/functions/helpers.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Array search key & value
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! function_exists( 'spf_array_search' ) ) {
11
+ function spf_array_search( $array, $key, $value ) {
12
+
13
+ $results = array();
14
+
15
+ if ( is_array( $array ) ) {
16
+ if ( isset( $array[ $key ] ) && $array[ $key ] == $value ) {
17
+ $results[] = $array;
18
+ }
19
+
20
+ foreach ( $array as $sub_array ) {
21
+ $results = array_merge( $results, spf_array_search( $sub_array, $key, $value ) );
22
+ }
23
+ }
24
+
25
+ return $results;
26
+
27
+ }
28
+ }
29
+
30
+ /**
31
+ *
32
+ * Getting POST Var
33
+ *
34
+ * @since 1.0.0
35
+ * @version 1.0.0
36
+ */
37
+ if ( ! function_exists( 'spf_get_var' ) ) {
38
+ function spf_get_var( $var, $default = '' ) {
39
+
40
+ if ( isset( $_POST[ $var ] ) ) {
41
+ return $_POST[ $var ];
42
+ }
43
+
44
+ if ( isset( $_GET[ $var ] ) ) {
45
+ return $_GET[ $var ];
46
+ }
47
+
48
+ return $default;
49
+
50
+ }
51
+ }
52
+
53
+ /**
54
+ *
55
+ * Getting POST Vars
56
+ *
57
+ * @since 1.0.0
58
+ * @version 1.0.0
59
+ */
60
+ if ( ! function_exists( 'spf_get_vars' ) ) {
61
+ function spf_get_vars( $var, $depth, $default = '' ) {
62
+
63
+ if ( isset( $_POST[ $var ][ $depth ] ) ) {
64
+ return $_POST[ $var ][ $depth ];
65
+ }
66
+
67
+ if ( isset( $_GET[ $var ][ $depth ] ) ) {
68
+ return $_GET[ $var ][ $depth ];
69
+ }
70
+
71
+ return $default;
72
+
73
+ }
74
+ }
75
+
76
+ /**
77
+ *
78
+ * Between Microtime
79
+ *
80
+ * @since 1.0.0
81
+ * @version 1.0.0
82
+ */
83
+ if ( ! function_exists( 'spf_microtime' ) ) {
84
+ function spf_timeout( $timenow, $starttime, $timeout = 30 ) {
85
+
86
+ return ( ( $timenow - $starttime ) < $timeout ) ? true : false;
87
+
88
+ }
89
+ }
90
+
91
+ /**
92
+ *
93
+ * Check for wp editor api
94
+ *
95
+ * @since 1.0.0
96
+ * @version 1.0.0
97
+ */
98
+ if ( ! function_exists( 'spf_wp_editor_api' ) ) {
99
+ function spf_wp_editor_api() {
100
+
101
+ global $wp_version;
102
+
103
+ return version_compare( $wp_version, '4.8', '>=' );
104
+
105
+ }
106
+ }
admin/views/wpcfree-metabox/functions/sanitize.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Sanitize
6
+ * Replace letter a to letter b
7
+ *
8
+ * @since 1.0.0
9
+ * @version 1.0.0
10
+ */
11
+ if ( ! function_exists( 'spf_sanitize_replace_a_to_b' ) ) {
12
+ function spf_sanitize_replace_a_to_b( $value ) {
13
+ return str_replace( 'a', 'b', $value );
14
+ }
15
+ }
16
+
17
+ /**
18
+ *
19
+ * Sanitize title
20
+ *
21
+ * @since 1.0.0
22
+ * @version 1.0.0
23
+ */
24
+ if ( ! function_exists( 'spf_sanitize_title' ) ) {
25
+ function spf_sanitize_title( $value ) {
26
+ return sanitize_title( $value );
27
+ }
28
+ }
admin/views/wpcfree-metabox/functions/validate.php ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! defined( 'ABSPATH' ) ) {
2
+ die; } // Cannot access directly.
3
+ /**
4
+ *
5
+ * Email validate
6
+ *
7
+ * @since 1.0.0
8
+ * @version 1.0.0
9
+ */
10
+ if ( ! function_exists( 'spf_validate_email' ) ) {
11
+ function spf_validate_email( $value ) {
12
+
13
+ if ( ! filter_var( $value, FILTER_VALIDATE_EMAIL ) ) {
14
+ return esc_html__( 'Please write a valid email address!', 'wp-carousel-free' );
15
+ }
16
+
17
+ }
18
+ }
19
+
20
+ /**
21
+ *
22
+ * Numeric validate
23
+ *
24
+ * @since 1.0.0
25
+ * @version 1.0.0
26
+ */
27
+ if ( ! function_exists( 'spf_validate_numeric' ) ) {
28
+ function spf_validate_numeric( $value ) {
29
+
30
+ if ( ! is_numeric( $value ) ) {
31
+ return esc_html__( 'Please write a numeric data!', 'wp-carousel-free' );
32
+ }
33
+
34
+ }
35
+ }
36
+
37
+ /**
38
+ *
39
+ * Required validate
40
+ *
41
+ * @since 1.0.0
42
+ * @version 1.0.0
43
+ */
44
+ if ( ! function_exists( 'spf_validate_required' ) ) {
45
+ function spf_validate_required( $value ) {
46
+
47
+ if ( empty( $value ) ) {
48
+ return esc_html__( 'Error! This field is required!', 'wp-carousel-free' );
49
+ }
50
+
51
+ }
52
+ }
53
+
54
+ /**
55
+ *
56
+ * URL validate
57
+ *
58
+ * @since 1.0.0
59
+ * @version 1.0.0
60
+ */
61
+ if ( ! function_exists( 'spf_validate_url' ) ) {
62
+ function spf_validate_url( $value ) {
63
+
64
+ if ( ! filter_var( $value, FILTER_VALIDATE_URL ) ) {
65
+ return esc_html__( 'Please write a valid url!', 'wp-carousel-free' );
66
+ }
67
+
68
+ }
69
+ }
70
+
71
+ /**
72
+ *
73
+ * Email validate for Customizer
74
+ *
75
+ * @since 1.0.0
76
+ * @version 1.0.0
77
+ */
78
+ if ( ! function_exists( 'spf_customize_validate_email' ) ) {
79
+ function spf_customize_validate_email( $validity, $value, $wp_customize ) {
80
+
81
+ if ( ! sanitize_email( $value ) ) {
82
+ $validity->add( 'required', esc_html__( 'Please write a valid email address!', 'wp-carousel-free' ) );
83
+ }
84
+
85
+ return $validity;
86
+
87
+ }
88
+ }
89
+
90
+ /**
91
+ *
92
+ * Numeric validate for Customizer
93
+ *
94
+ * @since 1.0.0
95
+ * @version 1.0.0
96
+ */
97
+ if ( ! function_exists( 'spf_customize_validate_numeric' ) ) {
98
+ function spf_customize_validate_numeric( $validity, $value, $wp_customize ) {
99
+
100
+ if ( ! is_numeric( $value ) ) {
101
+ $validity->add( 'required', esc_html__( 'Please write a numeric data!', 'wp-carousel-free' ) );
102
+ }
103
+
104
+ return $validity;
105
+
106
+ }
107
+ }
108
+
109
+ /**
110
+ *
111
+ * Required validate for Customizer
112
+ *
113
+ * @since 1.0.0
114
+ * @version 1.0.0
115
+ */
116
+ if ( ! function_exists( 'spf_customize_validate_required' ) ) {
117
+ function spf_customize_validate_required( $validity, $value, $wp_customize ) {
118
+
119
+ if ( empty( $value ) ) {
120
+ $validity->add( 'required', esc_html__( 'Error! This field is required!', 'wp-carousel-free' ) );
121
+ }
122
+
123
+ return $validity;
124
+
125
+ }
126
+ }
127
+
128
+ /**
129
+ *
130
+ * URL validate for Customizer
131
+ *
132
+ * @since 1.0.0
133
+ * @version 1.0.0
134
+ */
135
+ if ( ! function_exists( 'spf_customize_validate_url' ) ) {
136
+ function spf_customize_validate_url( $validity, $value, $wp_customize ) {
137
+
138
+ if ( ! filter_var( $value, FILTER_VALIDATE_URL ) ) {
139
+ $validity->add( 'required', esc_html__( 'Please write a valid url!', 'wp-carousel-free' ) );
140
+ }
141
+
142
+ return $validity;
143
+
144
+ }
145
+ }
admin/views/wpcfree-metabox/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden.
includes/class-wp-carousel-free-shortcode.php CHANGED
@@ -74,9 +74,7 @@ class WP_Carousel_Free_Shortcode {
74
  }
75
  $carousel_type = isset( $upload_data['wpcp_carousel_type'] ) ? $upload_data['wpcp_carousel_type'] : '';
76
 
77
- $shortcode_data = get_post_meta( $post_id, 'sp_wpcp_shortcode_options', true );
78
- $section_title = isset( $shortcode_data['section_title'] ) ? $shortcode_data['section_title'] : '';
79
- $section_title_margin = isset( $shortcode_data['section_title_margin_bottom'] ) ? $shortcode_data['section_title_margin_bottom'] : '';
80
 
81
  // Image Carousel.
82
  $image_orderby = isset( $shortcode_data['wpcp_image_order_by'] ) ? $shortcode_data['wpcp_image_order_by'] : '';
@@ -87,23 +85,31 @@ class WP_Carousel_Free_Shortcode {
87
  $show_image_title_attr = ( true == $_image_title_att ) ? 'true' : 'false';
88
  $image_sizes = isset( $shortcode_data['wpcp_image_sizes'] ) ? $shortcode_data['wpcp_image_sizes'] : '';
89
 
90
- $column_number = isset( $shortcode_data['wpcp_number_of_columns'] ) ? $shortcode_data['wpcp_number_of_columns'] : '';
91
- $column_lg_desktop = isset( $column_number['column1'] ) ? $column_number['column1'] : '';
92
- $column_desktop = isset( $column_number['column2'] ) ? $column_number['column2'] : '';
93
- $column_sm_desktop = isset( $column_number['column3'] ) ? $column_number['column3'] : '';
94
- $column_tablet = isset( $column_number['column4'] ) ? $column_number['column4'] : '';
95
- $column_mobile = isset( $column_number['column5'] ) ? $column_number['column5'] : '';
 
 
 
 
 
 
96
 
97
  // Carousel Settings.
98
- $accessibility = ( true === $shortcode_data['wpcp_accessibility'] ) ? 'true' : 'false';
99
- $auto_play = ( true === $shortcode_data['wpcp_carousel_auto_play'] ) ? 'true' : 'false';
100
- $autoplay_speed = $shortcode_data['carousel_auto_play_speed'];
101
- $speed = $shortcode_data['standard_carousel_scroll_speed'];
102
- $infinite = ( true === $shortcode_data['carousel_infinite'] ) ? 'true' : 'false';
103
- $pause_on_hover = ( true === $shortcode_data['carousel_pause_on_hover'] ) ? 'true' : 'false';
104
- $draggable = ( true === $shortcode_data['slider_draggable'] ) ? 'true' : 'false';
105
- $swipe = ( true === $shortcode_data['slider_swipe'] ) ? 'true' : 'false';
106
- $rtl = ( true === $shortcode_data['rtl_mode'] ) ? 'true' : 'false';
 
 
107
 
108
  $post_order_by = ( isset( $shortcode_data['wpcp_post_order_by'] ) ? $shortcode_data['wpcp_post_order_by'] : '' );
109
  $post_order = ( isset( $shortcode_data['wpcp_post_order'] ) ? $shortcode_data['wpcp_post_order'] : '' );
@@ -123,7 +129,7 @@ class WP_Carousel_Free_Shortcode {
123
  $dots_mobile = 'false';
124
  break;
125
  }
126
- $wpcp_arrows = isset( $shortcode_data['wpcp_navigation'] ) ? $shortcode_data['wpcp_navigation'] : '';
127
  switch ( $wpcp_arrows ) {
128
  case 'show':
129
  $arrows = 'true';
@@ -153,10 +159,19 @@ class WP_Carousel_Free_Shortcode {
153
  }
154
 
155
  // Carousel Configurations.
156
- wp_enqueue_script( 'wpcf-slick' );
 
 
157
  wp_enqueue_script( 'wpcf-slick-config' );
 
 
 
 
 
 
 
158
  $carousel_classes .= ' wpcp-standard';
159
- $wpcp_slick_options = 'data-slick=\'{ "accessibility":' . $accessibility . ', "arrows":' . $arrows . ', "autoplay":' . $auto_play . ', "autoplaySpeed":' . $autoplay_speed . ', "dots":' . $dots . ', "infinite":' . $infinite . ', "speed":' . $speed . ', "pauseOnHover":' . $pause_on_hover . ', "slidesToShow":' . $column_lg_desktop . ', "responsive":[ { "breakpoint":1200, "settings": { "slidesToShow":' . $column_desktop . ' } }, { "breakpoint":980, "settings":{ "slidesToShow":' . $column_sm_desktop . ' } }, { "breakpoint":736, "settings": { "slidesToShow":' . $column_tablet . ' } }, {"breakpoint":480, "settings":{ "slidesToShow":' . $column_mobile . ', "arrows": ' . $arrows_mobile . ', "dots": ' . $dots_mobile . ' } } ], "rtl":' . $rtl . ', "swipe": ' . $swipe . ', "draggable": ' . $draggable . ' }\' ';
160
 
161
  if ( 'image-carousel' === $carousel_type ) {
162
  ob_start();
74
  }
75
  $carousel_type = isset( $upload_data['wpcp_carousel_type'] ) ? $upload_data['wpcp_carousel_type'] : '';
76
 
77
+ $shortcode_data = get_post_meta( $post_id, 'sp_wpcp_shortcode_options', true );
 
 
78
 
79
  // Image Carousel.
80
  $image_orderby = isset( $shortcode_data['wpcp_image_order_by'] ) ? $shortcode_data['wpcp_image_order_by'] : '';
85
  $show_image_title_attr = ( true == $_image_title_att ) ? 'true' : 'false';
86
  $image_sizes = isset( $shortcode_data['wpcp_image_sizes'] ) ? $shortcode_data['wpcp_image_sizes'] : '';
87
 
88
+ // Carousel Column.
89
+ $column_number = isset( $shortcode_data['wpcp_number_of_columns'] ) ? $shortcode_data['wpcp_number_of_columns'] : '';
90
+ $old_column_lg_desktop = isset( $column_number['column1'] ) ? $column_number['column1'] : '5';
91
+ $column_lg_desktop = isset( $column_number['lg_desktop'] ) ? $column_number['lg_desktop'] : $old_column_lg_desktop;
92
+ $old_column_desktop = isset( $column_number['column2'] ) ? $column_number['column2'] : '4';
93
+ $column_desktop = isset( $column_number['desktop'] ) ? $column_number['desktop'] : $old_column_desktop;
94
+ $old_column_sm_desktop = isset( $column_number['column3'] ) ? $column_number['column3'] : '3';
95
+ $column_sm_desktop = isset( $column_number['laptop'] ) ? $column_number['laptop'] : $old_column_sm_desktop;
96
+ $old_column_tablet = isset( $column_number['column4'] ) ? $column_number['column4'] : '2';
97
+ $column_tablet = isset( $column_number['tablet'] ) ? $column_number['tablet'] : $old_column_tablet;
98
+ $old_column_mobile = isset( $column_number['column5'] ) ? $column_number['column5'] : '1';
99
+ $column_mobile = isset( $column_number['mobile'] ) ? $column_number['mobile'] : $old_column_mobile;
100
 
101
  // Carousel Settings.
102
+ $preloader = isset( $shortcode_data['wpcp_preloader'] ) ? $shortcode_data['wpcp_preloader'] : true;
103
+ $accessibility = $shortcode_data['wpcp_accessibility'] ? 'true' : 'false';
104
+ $auto_play = $shortcode_data['wpcp_carousel_auto_play'] ? 'true' : 'false';
105
+ $old_autoplay_speed = isset( $shortcode_data['carousel_auto_play_speed'] ) ? $shortcode_data['carousel_auto_play_speed'] : '3000';
106
+ $autoplay_speed = isset( $shortcode_data['carousel_auto_play_speed']['all'] ) ? $shortcode_data['carousel_auto_play_speed']['all'] : $old_autoplay_speed;
107
+ $old_speed = isset( $shortcode_data['standard_carousel_scroll_speed'] ) ? $shortcode_data['standard_carousel_scroll_speed'] : '600';
108
+ $speed = isset( $shortcode_data['standard_carousel_scroll_speed']['all'] ) ? $shortcode_data['standard_carousel_scroll_speed']['all'] : $old_speed;
109
+ $infinite = $shortcode_data['carousel_infinite'] ? 'true' : 'false';
110
+ $pause_on_hover = $shortcode_data['carousel_pause_on_hover'] ? 'true' : 'false';
111
+ $draggable = $shortcode_data['slider_draggable'] ? 'true' : 'false';
112
+ $swipe = $shortcode_data['slider_swipe'] ? 'true' : 'false';
113
 
114
  $post_order_by = ( isset( $shortcode_data['wpcp_post_order_by'] ) ? $shortcode_data['wpcp_post_order_by'] : '' );
115
  $post_order = ( isset( $shortcode_data['wpcp_post_order'] ) ? $shortcode_data['wpcp_post_order'] : '' );
129
  $dots_mobile = 'false';
130
  break;
131
  }
132
+ $wpcp_arrows = isset( $shortcode_data['wpcp_navigation'] ) ? $shortcode_data['wpcp_navigation'] : 'show';
133
  switch ( $wpcp_arrows ) {
134
  case 'show':
135
  $arrows = 'true';
159
  }
160
 
161
  // Carousel Configurations.
162
+ if ( wpcf_get_option( 'wpcp_slick_js', true ) ) {
163
+ wp_enqueue_script( 'wpcf-slick' );
164
+ }
165
  wp_enqueue_script( 'wpcf-slick-config' );
166
+
167
+ // Preloader classes.
168
+ if ( $preloader && wpcf_get_option( 'wpcp_preloader_js', true ) ) {
169
+ wp_enqueue_script( 'wpcp-preloader' );
170
+ $carousel_classes .= ' wpcp-preloader';
171
+ }
172
+
173
  $carousel_classes .= ' wpcp-standard';
174
+ $wpcp_slick_options = 'data-slick=\'{ "accessibility":' . $accessibility . ', "arrows":' . $arrows . ', "autoplay":' . $auto_play . ', "autoplaySpeed":' . $autoplay_speed . ', "dots":' . $dots . ', "infinite":' . $infinite . ', "speed":' . $speed . ', "pauseOnHover":' . $pause_on_hover . ', "slidesToShow":' . $column_lg_desktop . ', "responsive":[ { "breakpoint":1200, "settings": { "slidesToShow":' . $column_desktop . ' } }, { "breakpoint":980, "settings":{ "slidesToShow":' . $column_sm_desktop . ' } }, { "breakpoint":736, "settings": { "slidesToShow":' . $column_tablet . ' } }, {"breakpoint":480, "settings":{ "slidesToShow":' . $column_mobile . ', "arrows": ' . $arrows_mobile . ', "dots": ' . $dots_mobile . ' } } ], "swipe": ' . $swipe . ', "swipeToSlide": "true", "draggable": ' . $draggable . ' }\' ';
175
 
176
  if ( 'image-carousel' === $carousel_type ) {
177
  ob_start();
languages/wp-carousel-free.pot CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WP Carousel Free\n"
4
- "POT-Creation-Date: 2018-12-24 12:01+0600\n"
5
- "PO-Revision-Date: 2018-12-24 12:01+0600\n"
6
  "Last-Translator: \n"
7
  "Language-Team: ShapedPlugin\n"
8
  "Language: en\n"
@@ -12,9 +12,8 @@ msgstr ""
12
  "X-Generator: Poedit 2.2\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
- "X-Poedit-KeywordsList: __;_e;_x;_ex;_n;_nx;_n_noop;_nx_noop;esc_html__;"
16
- "esc_html_e;esc_html_x;esc_attr__;esc_attr_e;esc_attr_x;number_format_i18n;"
17
- "date_i18n\n"
18
  "X-Poedit-SearchPath-0: .\n"
19
 
20
  #: admin/class-wp-carousel-free-admin.php:100
@@ -60,13 +59,12 @@ msgstr ""
60
  msgid "Shortcode"
61
  msgstr ""
62
 
63
- #: admin/class-wp-carousel-free-admin.php:123
64
- #: admin/views/meta-box/config/metabox.config.php:32
65
  msgid "Carousel Type"
66
  msgstr ""
67
 
68
  #: admin/class-wp-carousel-free-admin.php:124
69
- #: admin/views/meta-box/config/metabox.config.php:253
70
  msgid "Date"
71
  msgstr ""
72
 
@@ -149,832 +147,1125 @@ msgstr ""
149
  msgid "Rate The Plugin"
150
  msgstr ""
151
 
152
- #: admin/views/meta-box/classes/framework.class.php:190
153
- msgid "Success. Imported backup options."
154
- msgstr ""
155
-
156
- #: admin/views/meta-box/classes/framework.class.php:195
157
- msgid "Default options restored."
158
- msgstr ""
159
-
160
- #: admin/views/meta-box/classes/framework.class.php:214
161
- msgid "Default options restored for only this section."
162
- msgstr ""
163
-
164
- #: admin/views/meta-box/classes/framework.class.php:381
165
- msgid "Settings saved."
166
- msgstr ""
167
-
168
- #: admin/views/meta-box/classes/framework.class.php:383
169
- msgid "Save Changes"
170
- msgstr ""
171
-
172
- #: admin/views/meta-box/classes/framework.class.php:383
173
- msgid "Saving..."
174
- msgstr ""
175
-
176
- #: admin/views/meta-box/classes/framework.class.php:384
177
- msgid "Restore"
178
- msgstr ""
179
-
180
- #: admin/views/meta-box/classes/framework.class.php:387
181
- msgid "Reset All Options"
182
- msgstr ""
183
-
184
- #: admin/views/meta-box/classes/metabox.class.php:176
185
- msgid "Shortcode:"
186
- msgstr ""
187
-
188
- #: admin/views/meta-box/classes/metabox.class.php:184
189
- msgid "Template Include:"
190
- msgstr ""
191
-
192
- #: admin/views/meta-box/classes/options.class.php:187
193
- msgid "CONFIG"
194
- msgstr ""
195
-
196
- #: admin/views/meta-box/classes/options.class.php:193
197
- #: admin/views/meta-box/classes/options.class.php:213
198
- msgid "USAGE"
199
- msgstr ""
200
-
201
- #: admin/views/meta-box/classes/options.class.php:199
202
- msgid "VALUE"
203
- msgstr ""
204
-
205
- #: admin/views/meta-box/classes/options.class.php:217
206
- #: admin/views/meta-box/config/metabox.config.php:250
207
- msgid "ID"
208
- msgstr ""
209
-
210
- #: admin/views/meta-box/classes/options.class.php:304
211
- #, php-format
212
- msgid "You are editing language: ( <strong>%s</strong> )"
213
- msgstr ""
214
-
215
- #: admin/views/meta-box/config/framework.config.php:10
216
- msgid "Settings"
217
- msgstr ""
218
-
219
- #: admin/views/meta-box/config/framework.config.php:16
220
- msgid "WordPress Carousel"
221
- msgstr ""
222
-
223
- #: admin/views/meta-box/config/framework.config.php:31
224
- msgid "Advanced Settings"
225
- msgstr ""
226
-
227
- #: admin/views/meta-box/config/framework.config.php:38
228
- msgid "Enqueue or Dequeue CSS"
229
- msgstr ""
230
-
231
- #: admin/views/meta-box/config/framework.config.php:43
232
- msgid "Slick CSS"
233
  msgstr ""
234
 
235
- #: admin/views/meta-box/config/framework.config.php:44
236
- msgid "On/off the switch to enqueue/dequeue slick CSS."
237
- msgstr ""
238
-
239
- #: admin/views/meta-box/config/framework.config.php:50
240
- msgid "Font Awesome CSS"
241
- msgstr ""
242
-
243
- #: admin/views/meta-box/config/framework.config.php:51
244
- msgid "On/off the switch to enqueue/dequeue font awesome CSS."
245
- msgstr ""
246
-
247
- #: admin/views/meta-box/config/framework.config.php:62
248
- #: admin/views/meta-box/config/framework.config.php:69
249
- msgid "Custom CSS"
250
- msgstr ""
251
-
252
- #: admin/views/meta-box/config/framework.config.php:70
253
- msgid "Type your css."
254
- msgstr ""
255
-
256
- #: admin/views/meta-box/config/metabox.config.php:17
257
- msgid "Upload Options"
258
- msgstr ""
259
-
260
- #: admin/views/meta-box/config/metabox.config.php:37
261
- #: admin/views/meta-box/config/metabox.config.php:605
262
  msgid "Image"
263
  msgstr ""
264
 
265
- #: admin/views/meta-box/config/metabox.config.php:42
266
  msgid "Post"
267
  msgstr ""
268
 
269
- #: admin/views/meta-box/config/metabox.config.php:47
270
  msgid "Product"
271
  msgstr ""
272
 
273
- #: admin/views/meta-box/config/metabox.config.php:52
274
  msgid "Content"
275
  msgstr ""
276
 
277
- #: admin/views/meta-box/config/metabox.config.php:57
278
  msgid "Video"
279
  msgstr ""
280
 
281
- #: admin/views/meta-box/config/metabox.config.php:72
282
  msgid "ADD IMAGE"
283
  msgstr ""
284
 
285
- #: admin/views/meta-box/config/metabox.config.php:73
286
  msgid "EDIT IMAGE"
287
  msgstr ""
288
 
289
- #: admin/views/meta-box/config/metabox.config.php:74
290
  msgid "REMOVE ALL"
291
  msgstr ""
292
 
293
- #: admin/views/meta-box/config/metabox.config.php:80
294
  msgid "Display Posts From"
295
  msgstr ""
296
 
297
- #: admin/views/meta-box/config/metabox.config.php:81
298
  msgid "Select an option to display the posts."
299
  msgstr ""
300
 
301
- #: admin/views/meta-box/config/metabox.config.php:84
302
- #: admin/views/meta-box/config/metabox.config.php:118
303
  msgid "Latest"
304
  msgstr ""
305
 
306
- #: admin/views/meta-box/config/metabox.config.php:87
307
- #: admin/views/meta-box/config/metabox.config.php:121
308
  msgid "Taxonomy (Pro)"
309
  msgstr ""
310
 
311
- #: admin/views/meta-box/config/metabox.config.php:91
312
  msgid "Specific Posts (Pro)"
313
  msgstr ""
314
 
315
- #: admin/views/meta-box/config/metabox.config.php:102
316
  msgid "Total Posts"
317
  msgstr ""
318
 
319
- #: admin/views/meta-box/config/metabox.config.php:103
320
- msgid "Number of total posts to show. Default value is 50."
321
  msgstr ""
322
 
323
- #: admin/views/meta-box/config/metabox.config.php:114
324
  msgid "Display Product From"
325
  msgstr ""
326
 
327
- #: admin/views/meta-box/config/metabox.config.php:115
328
  msgid "Select an option to display the products."
329
  msgstr ""
330
 
331
- #: admin/views/meta-box/config/metabox.config.php:125
332
- msgid "Specific Products (Pro)"
333
- msgstr ""
334
-
335
- #: admin/views/meta-box/config/metabox.config.php:136
336
- msgid "Total Products"
337
- msgstr ""
338
-
339
- #: admin/views/meta-box/config/metabox.config.php:137
340
- msgid "Number of total products to display. Default value is 50."
341
- msgstr ""
342
-
343
- #: admin/views/meta-box/config/metabox.config.php:153
344
- msgid "Shortcode Options"
345
  msgstr ""
346
 
347
- #: admin/views/meta-box/config/metabox.config.php:161
348
- msgid "General Settings"
349
  msgstr ""
350
 
351
- #: admin/views/meta-box/config/metabox.config.php:168
352
- msgid "Carousel Section Title"
353
  msgstr ""
354
 
355
- #: admin/views/meta-box/config/metabox.config.php:169
356
- msgid "Show/Hide the carousel section title."
357
- msgstr ""
358
-
359
- #: admin/views/meta-box/config/metabox.config.php:175
360
- msgid "Carousel Title Margin Bottom"
361
- msgstr ""
362
-
363
- #: admin/views/meta-box/config/metabox.config.php:176
364
- msgid ""
365
- "Set margin bottom for the carousel section title. Default value is 30px."
366
- msgstr ""
367
-
368
- #: admin/views/meta-box/config/metabox.config.php:177
369
- msgid "(px)"
370
- msgstr ""
371
-
372
- #: admin/views/meta-box/config/metabox.config.php:191
373
- msgid "Carousel Column(s)"
374
  msgstr ""
375
 
376
- #: admin/views/meta-box/config/metabox.config.php:192
377
- msgid "Set number of column on devices."
378
  msgstr ""
379
 
380
- #: admin/views/meta-box/config/metabox.config.php:195
381
- msgid "Large Desktop"
382
  msgstr ""
383
 
384
- #: admin/views/meta-box/config/metabox.config.php:196
385
- msgid ""
386
- "Set number of column(s) for the screen larger than 1200px. Default value is "
387
- "5."
388
  msgstr ""
389
 
390
- #: admin/views/meta-box/config/metabox.config.php:198
391
- msgid "Desktop"
392
  msgstr ""
393
 
394
- #: admin/views/meta-box/config/metabox.config.php:199
395
- msgid ""
396
- "Set number of column on desktop for the screen smaller than 1200px. Default "
397
- "value is 4."
398
  msgstr ""
399
 
400
- #: admin/views/meta-box/config/metabox.config.php:201
401
- msgid "Small Desktop"
 
 
 
 
 
402
  msgstr ""
403
 
404
- #: admin/views/meta-box/config/metabox.config.php:202
405
- msgid ""
406
- "Set number of column on small desktop for the screen smaller than 980px. "
407
- "Default value is 3."
 
 
 
408
  msgstr ""
409
 
410
- #: admin/views/meta-box/config/metabox.config.php:204
411
- msgid "Tablet"
412
  msgstr ""
413
 
414
- #: admin/views/meta-box/config/metabox.config.php:205
415
  msgid ""
416
- "Set number of column on tablet for the screen smaller than 736px. Default "
417
- "value is 2."
418
  msgstr ""
419
 
420
- #: admin/views/meta-box/config/metabox.config.php:207
421
- msgid "Mobile"
422
  msgstr ""
423
 
424
- #: admin/views/meta-box/config/metabox.config.php:208
425
- msgid ""
426
- "Set number of column on mobile for the screen smaller than 480px. Default "
427
- "value is 1."
428
  msgstr ""
429
 
430
- #: admin/views/meta-box/config/metabox.config.php:230
431
- #: admin/views/meta-box/config/metabox.config.php:246
432
  msgid "Order by"
433
  msgstr ""
434
 
435
- #: admin/views/meta-box/config/metabox.config.php:231
436
  msgid "Set an order by option."
437
  msgstr ""
438
 
439
- #: admin/views/meta-box/config/metabox.config.php:234
440
  msgid "Drag & Drop"
441
  msgstr ""
442
 
443
- #: admin/views/meta-box/config/metabox.config.php:237
444
- #: admin/views/meta-box/config/metabox.config.php:256
445
  msgid "Random"
446
  msgstr ""
447
 
448
- #: admin/views/meta-box/config/metabox.config.php:247
449
  msgid "Select an order by option."
450
  msgstr ""
451
 
452
- #: admin/views/meta-box/config/metabox.config.php:259
 
 
 
 
453
  msgid "Title"
454
  msgstr ""
455
 
456
- #: admin/views/meta-box/config/metabox.config.php:262
457
  msgid "Modified"
458
  msgstr ""
459
 
460
- #: admin/views/meta-box/config/metabox.config.php:265
461
  msgid "Menu Order"
462
  msgstr ""
463
 
464
- #: admin/views/meta-box/config/metabox.config.php:274
465
  msgid "Order"
466
  msgstr ""
467
 
468
- #: admin/views/meta-box/config/metabox.config.php:275
469
  msgid "Select an order option."
470
  msgstr ""
471
 
472
- #: admin/views/meta-box/config/metabox.config.php:278
473
  msgid "Ascending"
474
  msgstr ""
475
 
476
- #: admin/views/meta-box/config/metabox.config.php:281
477
  msgid "Descending"
478
  msgstr ""
479
 
480
- #: admin/views/meta-box/config/metabox.config.php:293
 
 
 
 
 
 
 
 
481
  msgid "Carousel Settings"
482
  msgstr ""
483
 
484
- #: admin/views/meta-box/config/metabox.config.php:299
485
  msgid "AutoPlay"
486
  msgstr ""
487
 
488
- #: admin/views/meta-box/config/metabox.config.php:300
489
  msgid "On/Off auto play."
490
  msgstr ""
491
 
492
- #: admin/views/meta-box/config/metabox.config.php:307
493
  msgid "AutoPlay Speed"
494
  msgstr ""
495
 
496
- #: admin/views/meta-box/config/metabox.config.php:308
497
- msgid "Set auto play speed. Default value is 3000 ms."
498
- msgstr ""
499
-
500
- #: admin/views/meta-box/config/metabox.config.php:309
501
- #: admin/views/meta-box/config/metabox.config.php:321
502
- msgid "(millisecond)"
503
  msgstr ""
504
 
505
- #: admin/views/meta-box/config/metabox.config.php:319
506
  msgid "Pagination Speed"
507
  msgstr ""
508
 
509
- #: admin/views/meta-box/config/metabox.config.php:320
510
- msgid "Set pagination/slide scroll speed. Default value is 600 ms."
511
  msgstr ""
512
 
513
- #: admin/views/meta-box/config/metabox.config.php:330
514
  msgid "Pause on Hover"
515
  msgstr ""
516
 
517
- #: admin/views/meta-box/config/metabox.config.php:331
518
  msgid "On/Off carousel pause on hover."
519
  msgstr ""
520
 
521
- #: admin/views/meta-box/config/metabox.config.php:337
522
  msgid "Infinite Loop"
523
  msgstr ""
524
 
525
- #: admin/views/meta-box/config/metabox.config.php:338
526
  msgid "On/Off infinite loop mode."
527
  msgstr ""
528
 
529
- #: admin/views/meta-box/config/metabox.config.php:343
530
  msgid "Navigation Settings"
531
  msgstr ""
532
 
533
- #: admin/views/meta-box/config/metabox.config.php:349
534
  msgid "Navigation"
535
  msgstr ""
536
 
537
- #: admin/views/meta-box/config/metabox.config.php:350
538
  msgid "Show/Hide carousel navigation."
539
  msgstr ""
540
 
541
- #: admin/views/meta-box/config/metabox.config.php:352
542
- #: admin/views/meta-box/config/metabox.config.php:388
543
- msgid "Show"
544
- msgstr ""
545
-
546
- #: admin/views/meta-box/config/metabox.config.php:353
547
- #: admin/views/meta-box/config/metabox.config.php:389
548
- msgid "Hide"
549
- msgstr ""
550
-
551
- #: admin/views/meta-box/config/metabox.config.php:354
552
- #: admin/views/meta-box/config/metabox.config.php:390
553
  msgid "Hide on Mobile"
554
  msgstr ""
555
 
556
- #: admin/views/meta-box/config/metabox.config.php:365
557
  msgid "Navigation Color"
558
  msgstr ""
559
 
560
- #: admin/views/meta-box/config/metabox.config.php:366
561
  msgid "Set color for the carousel navigation."
562
  msgstr ""
563
 
564
- #: admin/views/meta-box/config/metabox.config.php:370
565
- #: admin/views/meta-box/config/metabox.config.php:406
566
- #: admin/views/meta-box/fields/typography_advanced/typography_advanced.php:160
567
  msgid "Color"
568
  msgstr ""
569
 
570
- #: admin/views/meta-box/config/metabox.config.php:372
571
  msgid "Hover Color"
572
  msgstr ""
573
 
574
- #: admin/views/meta-box/config/metabox.config.php:380
575
  msgid "Pagination Settings"
576
  msgstr ""
577
 
578
- #: admin/views/meta-box/config/metabox.config.php:385
579
  msgid "Pagination"
580
  msgstr ""
581
 
582
- #: admin/views/meta-box/config/metabox.config.php:386
583
  msgid "Show/Hide carousel pagination."
584
  msgstr ""
585
 
586
- #: admin/views/meta-box/config/metabox.config.php:401
587
  msgid "Pagination Color"
588
  msgstr ""
589
 
590
- #: admin/views/meta-box/config/metabox.config.php:402
591
  msgid "Set color for the carousel pagination dots."
592
  msgstr ""
593
 
594
- #: admin/views/meta-box/config/metabox.config.php:408
595
  msgid "Active Color"
596
  msgstr ""
597
 
598
- #: admin/views/meta-box/config/metabox.config.php:417
599
  msgid "Misc. Settings"
600
  msgstr ""
601
 
602
- #: admin/views/meta-box/config/metabox.config.php:422
603
  msgid "Tab and Key Navigation"
604
  msgstr ""
605
 
606
- #: admin/views/meta-box/config/metabox.config.php:423
607
  msgid "Enable/Disable carousel scroll with tab and keyboard."
608
  msgstr ""
609
 
610
- #: admin/views/meta-box/config/metabox.config.php:429
611
- msgid "Swipe"
612
  msgstr ""
613
 
614
- #: admin/views/meta-box/config/metabox.config.php:430
615
- msgid "On/Off swipe mode."
616
  msgstr ""
617
 
618
- #: admin/views/meta-box/config/metabox.config.php:436
619
  msgid "Mouse Draggable"
620
  msgstr ""
621
 
622
- #: admin/views/meta-box/config/metabox.config.php:437
623
  msgid "On/Off mouse draggable mode."
624
  msgstr ""
625
 
626
- #: admin/views/meta-box/config/metabox.config.php:444
627
- msgid "RTL"
628
- msgstr ""
629
-
630
- #: admin/views/meta-box/config/metabox.config.php:445
631
- msgid "On/Off right to left mode."
632
- msgstr ""
633
-
634
- #: admin/views/meta-box/config/metabox.config.php:451
635
- msgid ""
636
- "To make the RTL Mode work, please select an rtl language in the dashboard e."
637
- "g. Arabic, Hebrew."
638
- msgstr ""
639
-
640
- #: admin/views/meta-box/config/metabox.config.php:460
641
  msgid "Style Settings"
642
  msgstr ""
643
 
644
- #: admin/views/meta-box/config/metabox.config.php:466
645
  msgid "Content Position"
646
  msgstr ""
647
 
648
- #: admin/views/meta-box/config/metabox.config.php:467
649
  msgid "Select a position for the title, content, meta etc."
650
  msgstr ""
651
 
652
- #: admin/views/meta-box/config/metabox.config.php:470
653
  msgid "Bottom"
654
  msgstr ""
655
 
656
- #: admin/views/meta-box/config/metabox.config.php:473
657
  msgid "Right (Pro)"
658
  msgstr ""
659
 
660
- #: admin/views/meta-box/config/metabox.config.php:477
 
 
 
 
661
  msgid "Overlay (Pro)"
662
  msgstr ""
663
 
664
- #: admin/views/meta-box/config/metabox.config.php:487
665
  msgid "Slide Border"
666
  msgstr ""
667
 
668
- #: admin/views/meta-box/config/metabox.config.php:488
669
  msgid "Set border for the slide."
670
  msgstr ""
671
 
672
- #: admin/views/meta-box/config/metabox.config.php:501
 
 
 
 
 
 
 
 
673
  msgid "Post Title"
674
  msgstr ""
675
 
676
- #: admin/views/meta-box/config/metabox.config.php:502
677
  msgid "Show/Hide post title."
678
  msgstr ""
679
 
680
- #: admin/views/meta-box/config/metabox.config.php:509
681
  msgid "Post Content"
682
  msgstr ""
683
 
684
- #: admin/views/meta-box/config/metabox.config.php:510
685
  msgid "Show/Hide post content."
686
  msgstr ""
687
 
688
- #: admin/views/meta-box/config/metabox.config.php:517
689
  msgid "Content Display Type"
690
  msgstr ""
691
 
692
- #: admin/views/meta-box/config/metabox.config.php:518
693
  msgid "Select a content display type."
694
  msgstr ""
695
 
696
- #: admin/views/meta-box/config/metabox.config.php:521
697
  msgid "Excerpt"
698
  msgstr ""
699
 
700
- #: admin/views/meta-box/config/metabox.config.php:524
701
  msgid "Full Content (Pro)"
702
  msgstr ""
703
 
704
- #: admin/views/meta-box/config/metabox.config.php:528
705
  msgid "Content with Limit (Pro)"
706
  msgstr ""
707
 
708
- #: admin/views/meta-box/config/metabox.config.php:538
709
  msgid "Post Meta"
710
  msgstr ""
711
 
712
- #: admin/views/meta-box/config/metabox.config.php:544
713
- msgid "Post Author"
714
  msgstr ""
715
 
716
- #: admin/views/meta-box/config/metabox.config.php:545
717
- msgid "Show/Hide post author name."
718
  msgstr ""
719
 
720
- #: admin/views/meta-box/config/metabox.config.php:552
721
- msgid "Post Date"
722
  msgstr ""
723
 
724
- #: admin/views/meta-box/config/metabox.config.php:553
725
- msgid "Show/Hide post date."
726
  msgstr ""
727
 
728
- #: admin/views/meta-box/config/metabox.config.php:561
729
  msgid "Product Settings"
730
  msgstr ""
731
 
732
- #: admin/views/meta-box/config/metabox.config.php:567
733
  msgid "Product Name"
734
  msgstr ""
735
 
736
- #: admin/views/meta-box/config/metabox.config.php:568
737
  msgid "Show/Hide product name."
738
  msgstr ""
739
 
740
- #: admin/views/meta-box/config/metabox.config.php:575
741
  msgid "Product Price"
742
  msgstr ""
743
 
744
- #: admin/views/meta-box/config/metabox.config.php:576
745
  msgid "Show/Hide product price."
746
  msgstr ""
747
 
748
- #: admin/views/meta-box/config/metabox.config.php:583
749
  msgid "Product Rating"
750
  msgstr ""
751
 
752
- #: admin/views/meta-box/config/metabox.config.php:584
753
  msgid "Show/Hide product rating."
754
  msgstr ""
755
 
756
- #: admin/views/meta-box/config/metabox.config.php:591
757
  msgid "Add to Cart Button"
758
  msgstr ""
759
 
760
- #: admin/views/meta-box/config/metabox.config.php:592
761
  msgid "Show/Hide add to cart button."
762
  msgstr ""
763
 
764
- #: admin/views/meta-box/config/metabox.config.php:599
765
  msgid "Image Settings"
766
  msgstr ""
767
 
768
- #: admin/views/meta-box/config/metabox.config.php:606
769
  msgid "Show/Hide slide image."
770
  msgstr ""
771
 
772
- #: admin/views/meta-box/config/metabox.config.php:614
773
  msgid "Image Sizes"
774
  msgstr ""
775
 
776
- #: admin/views/meta-box/config/metabox.config.php:616
777
  msgid "Select a image size."
778
  msgstr ""
779
 
780
- #: admin/views/meta-box/config/metabox.config.php:622
 
 
 
 
 
 
 
 
781
  msgid "Image Title Attribute"
782
  msgstr ""
783
 
784
- #: admin/views/meta-box/config/metabox.config.php:623
785
  msgid "Check to add image title attribute."
786
  msgstr ""
787
 
788
- #: admin/views/meta-box/config/metabox.config.php:633
789
  msgid "Typography"
790
  msgstr ""
791
 
792
- #: admin/views/meta-box/config/metabox.config.php:639
793
  msgid ""
794
- "These Typography (840+ Google Fonts) options are available in the <a href="
795
- "\"https://shapedplugin.com/plugin/wordpress-carousel-pro/\" target=\"_blank"
796
- "\">Pro Version</a> only."
797
  msgstr ""
798
 
799
- #: admin/views/meta-box/config/metabox.config.php:644
800
  msgid "Load Carousel Section Title Font"
801
  msgstr ""
802
 
803
- #: admin/views/meta-box/config/metabox.config.php:645
804
  msgid "On/Off google font for the carousel section title."
805
  msgstr ""
806
 
807
- #: admin/views/meta-box/config/metabox.config.php:651
808
  msgid "Carousel Section Title Font"
809
  msgstr ""
810
 
811
- #: admin/views/meta-box/config/metabox.config.php:652
812
  msgid "Set Carousel section title font properties."
813
  msgstr ""
814
 
815
- #: admin/views/meta-box/config/metabox.config.php:671
816
  msgid "Load Caption Font"
817
  msgstr ""
818
 
819
- #: admin/views/meta-box/config/metabox.config.php:672
820
  msgid "On/Off google font for the image caption."
821
  msgstr ""
822
 
823
- #: admin/views/meta-box/config/metabox.config.php:678
824
  msgid "Caption Font"
825
  msgstr ""
826
 
827
- #: admin/views/meta-box/config/metabox.config.php:679
828
  msgid "Set caption font properties."
829
  msgstr ""
830
 
831
- #: admin/views/meta-box/config/metabox.config.php:698
832
  msgid "Load Description Font"
833
  msgstr ""
834
 
835
- #: admin/views/meta-box/config/metabox.config.php:699
836
  msgid "On/Off google font for the image description."
837
  msgstr ""
838
 
839
- #: admin/views/meta-box/config/metabox.config.php:705
840
  msgid "Description Font"
841
  msgstr ""
842
 
843
- #: admin/views/meta-box/config/metabox.config.php:706
844
  msgid "Set description font properties."
845
  msgstr ""
846
 
847
- #: admin/views/meta-box/fields/border/border.php:46
848
- msgid "Border Width"
849
  msgstr ""
850
 
851
- #: admin/views/meta-box/fields/border/border.php:61
852
- msgid "Border Style"
853
  msgstr ""
854
 
855
- #: admin/views/meta-box/fields/border/border.php:64
856
- #: admin/views/meta-box/fields/typography_advanced/typography_advanced.php:141
857
- msgid "None"
858
  msgstr ""
859
 
860
- #: admin/views/meta-box/fields/border/border.php:65
861
- msgid "Solid"
862
  msgstr ""
863
 
864
- #: admin/views/meta-box/fields/border/border.php:66
865
- msgid "Dotted"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
866
  msgstr ""
867
 
868
- #: admin/views/meta-box/fields/border/border.php:67
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
869
  msgid "Dashed"
870
  msgstr ""
871
 
872
- #: admin/views/meta-box/fields/border/border.php:68
 
 
 
 
 
 
873
  msgid "Double"
874
  msgstr ""
875
 
876
- #: admin/views/meta-box/fields/border/border.php:69
 
 
 
 
 
 
 
 
877
  msgid "Groove"
878
  msgstr ""
879
 
880
- #: admin/views/meta-box/fields/border/border.php:70
881
- msgid "Ridge"
882
  msgstr ""
883
 
884
- #: admin/views/meta-box/fields/border/border.php:71
885
- msgid "Inset"
 
886
  msgstr ""
887
 
888
- #: admin/views/meta-box/fields/border/border.php:72
889
- msgid "Outset"
890
  msgstr ""
891
 
892
- #: admin/views/meta-box/fields/border/border.php:86
893
- msgid "Border Color"
 
 
 
894
  msgstr ""
895
 
896
- #: admin/views/meta-box/fields/border/border.php:101
897
- msgid "Border Hover Color"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
898
  msgstr ""
899
 
900
- #: admin/views/meta-box/fields/gallery/gallery.php:33
901
  msgid "Add Gallery"
902
  msgstr ""
903
 
904
- #: admin/views/meta-box/fields/gallery/gallery.php:34
905
  msgid "Edit Gallery"
906
  msgstr ""
907
 
908
- #: admin/views/meta-box/fields/gallery/gallery.php:35
909
  msgid "Clear"
910
  msgstr ""
911
 
912
- #: admin/views/meta-box/fields/image_sizes/image_sizes.php:54
913
- msgid "original uploaded image"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
914
  msgstr ""
915
 
916
- #: admin/views/meta-box/fields/switcher/switcher.php:20
917
- msgid "on"
918
  msgstr ""
919
 
920
- #: admin/views/meta-box/fields/switcher/switcher.php:20
921
- msgid "off"
 
922
  msgstr ""
923
 
924
- #: admin/views/meta-box/fields/typography_advanced/typography_advanced.php:60
925
- msgid "Web Safe Fonts"
926
  msgstr ""
927
 
928
- #: admin/views/meta-box/fields/typography_advanced/typography_advanced.php:66
929
- msgid "Google Fonts"
930
  msgstr ""
931
 
932
- #: admin/views/meta-box/fields/typography_advanced/typography_advanced.php:99
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
933
  msgid "Font Size"
934
  msgstr ""
935
 
936
- #: admin/views/meta-box/fields/typography_advanced/typography_advanced.php:113
937
  msgid "Line Height"
938
  msgstr ""
939
 
940
- #: admin/views/meta-box/fields/typography_advanced/typography_advanced.php:127
941
- msgid "Inherit"
942
  msgstr ""
943
 
944
- #: admin/views/meta-box/fields/typography_advanced/typography_advanced.php:154
945
- msgid "Normal"
946
  msgstr ""
947
 
948
- #: admin/views/meta-box/fields/typography_advanced/typography_advanced.php:186
949
- msgid "Error! Can not load json file."
950
  msgstr ""
951
 
952
- #: admin/views/meta-box/functions/helpers.php:61
953
- msgid "This field class is not available!"
954
  msgstr ""
955
 
956
- #: admin/views/meta-box/functions/validate.php:22
957
- msgid "Please write a valid email address!"
958
  msgstr ""
959
 
960
- #: admin/views/meta-box/functions/validate.php:47
961
- msgid "Please write a numeric data!"
962
  msgstr ""
963
 
964
- #: admin/views/meta-box/functions/validate.php:70
965
- msgid "Fatal Error! This field is required!"
966
  msgstr ""
967
 
968
- #: admin/views/premium.php:50
969
- msgid "Premium"
970
  msgstr ""
971
 
972
- #: admin/views/premium.php:65
973
- msgid "Upgrade to <span>WordPress Carousel Pro</span>"
974
  msgstr ""
975
 
976
- #: admin/views/premium.php:69
977
- msgid "Get more Advanced Functionality & Flexibility with the Premium version."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
978
  msgstr ""
979
 
980
  #: includes/class-wp-carousel-free-post-types.php:75
@@ -1026,26 +1317,26 @@ msgstr ""
1026
  msgid "All Carousels"
1027
  msgstr ""
1028
 
1029
- #: public/templates/post-carousel.php:58
1030
  msgid " By "
1031
  msgstr ""
1032
 
1033
- #: public/templates/post-carousel.php:63
1034
  msgid "On "
1035
  msgstr ""
1036
 
1037
- #: public/templates/post-carousel.php:88
1038
  msgid "No posts found"
1039
  msgstr ""
1040
 
1041
- #: public/templates/product-carousel.php:79
1042
  msgid "Rated "
1043
  msgstr ""
1044
 
1045
- #: public/templates/product-carousel.php:79
1046
  msgid " out of 5"
1047
  msgstr ""
1048
 
1049
- #: public/templates/product-carousel.php:95
1050
  msgid "No products found"
1051
  msgstr ""
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WP Carousel Free\n"
4
+ "POT-Creation-Date: 2019-05-22 16:32+0600\n"
5
+ "PO-Revision-Date: 2019-05-22 16:33+0600\n"
6
  "Last-Translator: \n"
7
  "Language-Team: ShapedPlugin\n"
8
  "Language: en\n"
12
  "X-Generator: Poedit 2.2\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
+ "X-Poedit-KeywordsList: __;_e;_x;_ex;_n;_nx;_n_noop;esc_html__;esc_html_e;"
16
+ "esc_html_x;esc_attr__;esc_attr_e;esc_attr_x;number_format_i18n;date_i18n\n"
 
17
  "X-Poedit-SearchPath-0: .\n"
18
 
19
  #: admin/class-wp-carousel-free-admin.php:100
59
  msgid "Shortcode"
60
  msgstr ""
61
 
62
+ #: admin/class-wp-carousel-free-admin.php:123 admin/views/metabox-config.php:40
 
63
  msgid "Carousel Type"
64
  msgstr ""
65
 
66
  #: admin/class-wp-carousel-free-admin.php:124
67
+ #: admin/views/metabox-config.php:240
68
  msgid "Date"
69
  msgstr ""
70
 
147
  msgid "Rate The Plugin"
148
  msgstr ""
149
 
150
+ #: admin/views/metabox-config.php:16 admin/views/metabox-config.php:971
151
+ #: admin/views/option-config.php:22
152
+ msgid "WordPress Carousel Pro"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  msgstr ""
154
 
155
+ #: admin/views/metabox-config.php:44 admin/views/metabox-config.php:650
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  msgid "Image"
157
  msgstr ""
158
 
159
+ #: admin/views/metabox-config.php:48
160
  msgid "Post"
161
  msgstr ""
162
 
163
+ #: admin/views/metabox-config.php:52
164
  msgid "Product"
165
  msgstr ""
166
 
167
+ #: admin/views/metabox-config.php:56
168
  msgid "Content"
169
  msgstr ""
170
 
171
+ #: admin/views/metabox-config.php:61
172
  msgid "Video"
173
  msgstr ""
174
 
175
+ #: admin/views/metabox-config.php:72
176
  msgid "ADD IMAGE"
177
  msgstr ""
178
 
179
+ #: admin/views/metabox-config.php:73
180
  msgid "EDIT IMAGE"
181
  msgstr ""
182
 
183
+ #: admin/views/metabox-config.php:74
184
  msgid "REMOVE ALL"
185
  msgstr ""
186
 
187
+ #: admin/views/metabox-config.php:80
188
  msgid "Display Posts From"
189
  msgstr ""
190
 
191
+ #: admin/views/metabox-config.php:81
192
  msgid "Select an option to display the posts."
193
  msgstr ""
194
 
195
+ #: admin/views/metabox-config.php:84
 
196
  msgid "Latest"
197
  msgstr ""
198
 
199
+ #: admin/views/metabox-config.php:87
 
200
  msgid "Taxonomy (Pro)"
201
  msgstr ""
202
 
203
+ #: admin/views/metabox-config.php:91
204
  msgid "Specific Posts (Pro)"
205
  msgstr ""
206
 
207
+ #: admin/views/metabox-config.php:103
208
  msgid "Total Posts"
209
  msgstr ""
210
 
211
+ #: admin/views/metabox-config.php:104
212
+ msgid "Number of total posts to show. Default value is 10."
213
  msgstr ""
214
 
215
+ #: admin/views/metabox-config.php:114
216
  msgid "Display Product From"
217
  msgstr ""
218
 
219
+ #: admin/views/metabox-config.php:115
220
  msgid "Select an option to display the products."
221
  msgstr ""
222
 
223
+ #: admin/views/metabox-config.php:118
224
+ msgid "Latest Product"
 
 
 
 
 
 
 
 
 
 
 
 
225
  msgstr ""
226
 
227
+ #: admin/views/metabox-config.php:121
228
+ msgid "Product Category (Pro)"
229
  msgstr ""
230
 
231
+ #: admin/views/metabox-config.php:125
232
+ msgid "Specific Product (Pro)"
233
  msgstr ""
234
 
235
+ #: admin/views/metabox-config.php:137
236
+ msgid "Total Products"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
237
  msgstr ""
238
 
239
+ #: admin/views/metabox-config.php:138
240
+ msgid "Number of total products to display. Default value is 10."
241
  msgstr ""
242
 
243
+ #: admin/views/metabox-config.php:160
244
+ msgid "Shortcode Section"
245
  msgstr ""
246
 
247
+ #: admin/views/metabox-config.php:173
248
+ msgid "General Settings"
 
 
249
  msgstr ""
250
 
251
+ #: admin/views/metabox-config.php:179
252
+ msgid "Carousel Section Title"
253
  msgstr ""
254
 
255
+ #: admin/views/metabox-config.php:180
256
+ msgid "Show/Hide the carousel section title."
 
 
257
  msgstr ""
258
 
259
+ #: admin/views/metabox-config.php:182 admin/views/metabox-config.php:355
260
+ #: admin/views/metabox-config.php:396 admin/views/metabox-config.php:523
261
+ #: admin/views/metabox-config.php:535 admin/views/metabox-config.php:574
262
+ #: admin/views/metabox-config.php:585 admin/views/metabox-config.php:603
263
+ #: admin/views/metabox-config.php:614 admin/views/metabox-config.php:625
264
+ #: admin/views/metabox-config.php:636 admin/views/metabox-config.php:652
265
+ msgid "Show"
266
  msgstr ""
267
 
268
+ #: admin/views/metabox-config.php:183 admin/views/metabox-config.php:356
269
+ #: admin/views/metabox-config.php:397 admin/views/metabox-config.php:524
270
+ #: admin/views/metabox-config.php:536 admin/views/metabox-config.php:575
271
+ #: admin/views/metabox-config.php:586 admin/views/metabox-config.php:604
272
+ #: admin/views/metabox-config.php:615 admin/views/metabox-config.php:626
273
+ #: admin/views/metabox-config.php:637 admin/views/metabox-config.php:653
274
+ msgid "Hide"
275
  msgstr ""
276
 
277
+ #: admin/views/metabox-config.php:189
278
+ msgid "Carousel Title Margin Bottom"
279
  msgstr ""
280
 
281
+ #: admin/views/metabox-config.php:190
282
  msgid ""
283
+ "Set margin bottom for the carousel section title. Default value is 30px."
 
284
  msgstr ""
285
 
286
+ #: admin/views/metabox-config.php:210
287
+ msgid "Carousel Column(s)"
288
  msgstr ""
289
 
290
+ #: admin/views/metabox-config.php:211
291
+ msgid "Set number of column on devices."
 
 
292
  msgstr ""
293
 
294
+ #: admin/views/metabox-config.php:224 admin/views/metabox-config.php:236
 
295
  msgid "Order by"
296
  msgstr ""
297
 
298
+ #: admin/views/metabox-config.php:225
299
  msgid "Set an order by option."
300
  msgstr ""
301
 
302
+ #: admin/views/metabox-config.php:227
303
  msgid "Drag & Drop"
304
  msgstr ""
305
 
306
+ #: admin/views/metabox-config.php:228 admin/views/metabox-config.php:241
 
307
  msgid "Random"
308
  msgstr ""
309
 
310
+ #: admin/views/metabox-config.php:237
311
  msgid "Select an order by option."
312
  msgstr ""
313
 
314
+ #: admin/views/metabox-config.php:239
315
+ msgid "ID"
316
+ msgstr ""
317
+
318
+ #: admin/views/metabox-config.php:242
319
  msgid "Title"
320
  msgstr ""
321
 
322
+ #: admin/views/metabox-config.php:243
323
  msgid "Modified"
324
  msgstr ""
325
 
326
+ #: admin/views/metabox-config.php:244
327
  msgid "Menu Order"
328
  msgstr ""
329
 
330
+ #: admin/views/metabox-config.php:252
331
  msgid "Order"
332
  msgstr ""
333
 
334
+ #: admin/views/metabox-config.php:253
335
  msgid "Select an order option."
336
  msgstr ""
337
 
338
+ #: admin/views/metabox-config.php:255
339
  msgid "Ascending"
340
  msgstr ""
341
 
342
+ #: admin/views/metabox-config.php:256
343
  msgid "Descending"
344
  msgstr ""
345
 
346
+ #: admin/views/metabox-config.php:264
347
+ msgid "Preloader"
348
+ msgstr ""
349
+
350
+ #: admin/views/metabox-config.php:265
351
+ msgid "Carousel will be hidden until page load completed."
352
+ msgstr ""
353
+
354
+ #: admin/views/metabox-config.php:278
355
  msgid "Carousel Settings"
356
  msgstr ""
357
 
358
+ #: admin/views/metabox-config.php:284
359
  msgid "AutoPlay"
360
  msgstr ""
361
 
362
+ #: admin/views/metabox-config.php:285
363
  msgid "On/Off auto play."
364
  msgstr ""
365
 
366
+ #: admin/views/metabox-config.php:291
367
  msgid "AutoPlay Speed"
368
  msgstr ""
369
 
370
+ #: admin/views/metabox-config.php:292
371
+ msgid "Set auto play speed. Default value is 3000 milliseconds."
 
 
 
 
 
372
  msgstr ""
373
 
374
+ #: admin/views/metabox-config.php:314
375
  msgid "Pagination Speed"
376
  msgstr ""
377
 
378
+ #: admin/views/metabox-config.php:315
379
+ msgid "Set pagination/slide scroll speed. Default value is 600 milliseconds."
380
  msgstr ""
381
 
382
+ #: admin/views/metabox-config.php:333
383
  msgid "Pause on Hover"
384
  msgstr ""
385
 
386
+ #: admin/views/metabox-config.php:334
387
  msgid "On/Off carousel pause on hover."
388
  msgstr ""
389
 
390
+ #: admin/views/metabox-config.php:340
391
  msgid "Infinite Loop"
392
  msgstr ""
393
 
394
+ #: admin/views/metabox-config.php:341
395
  msgid "On/Off infinite loop mode."
396
  msgstr ""
397
 
398
+ #: admin/views/metabox-config.php:346
399
  msgid "Navigation Settings"
400
  msgstr ""
401
 
402
+ #: admin/views/metabox-config.php:352
403
  msgid "Navigation"
404
  msgstr ""
405
 
406
+ #: admin/views/metabox-config.php:353
407
  msgid "Show/Hide carousel navigation."
408
  msgstr ""
409
 
410
+ #: admin/views/metabox-config.php:357 admin/views/metabox-config.php:398
 
 
 
 
 
 
 
 
 
 
 
411
  msgid "Hide on Mobile"
412
  msgstr ""
413
 
414
+ #: admin/views/metabox-config.php:369
415
  msgid "Navigation Color"
416
  msgstr ""
417
 
418
+ #: admin/views/metabox-config.php:370
419
  msgid "Set color for the carousel navigation."
420
  msgstr ""
421
 
422
+ #: admin/views/metabox-config.php:372 admin/views/metabox-config.php:412
 
 
423
  msgid "Color"
424
  msgstr ""
425
 
426
+ #: admin/views/metabox-config.php:373
427
  msgid "Hover Color"
428
  msgstr ""
429
 
430
+ #: admin/views/metabox-config.php:388
431
  msgid "Pagination Settings"
432
  msgstr ""
433
 
434
+ #: admin/views/metabox-config.php:393
435
  msgid "Pagination"
436
  msgstr ""
437
 
438
+ #: admin/views/metabox-config.php:394
439
  msgid "Show/Hide carousel pagination."
440
  msgstr ""
441
 
442
+ #: admin/views/metabox-config.php:409
443
  msgid "Pagination Color"
444
  msgstr ""
445
 
446
+ #: admin/views/metabox-config.php:410
447
  msgid "Set color for the carousel pagination dots."
448
  msgstr ""
449
 
450
+ #: admin/views/metabox-config.php:413
451
  msgid "Active Color"
452
  msgstr ""
453
 
454
+ #: admin/views/metabox-config.php:425
455
  msgid "Misc. Settings"
456
  msgstr ""
457
 
458
+ #: admin/views/metabox-config.php:431
459
  msgid "Tab and Key Navigation"
460
  msgstr ""
461
 
462
+ #: admin/views/metabox-config.php:432
463
  msgid "Enable/Disable carousel scroll with tab and keyboard."
464
  msgstr ""
465
 
466
+ #: admin/views/metabox-config.php:438
467
+ msgid "Touch Swipe"
468
  msgstr ""
469
 
470
+ #: admin/views/metabox-config.php:439
471
+ msgid "On/Off touch swipe mode."
472
  msgstr ""
473
 
474
+ #: admin/views/metabox-config.php:445
475
  msgid "Mouse Draggable"
476
  msgstr ""
477
 
478
+ #: admin/views/metabox-config.php:446
479
  msgid "On/Off mouse draggable mode."
480
  msgstr ""
481
 
482
+ #: admin/views/metabox-config.php:464
 
 
 
 
 
 
 
 
 
 
 
 
 
 
483
  msgid "Style Settings"
484
  msgstr ""
485
 
486
+ #: admin/views/metabox-config.php:471
487
  msgid "Content Position"
488
  msgstr ""
489
 
490
+ #: admin/views/metabox-config.php:472
491
  msgid "Select a position for the title, content, meta etc."
492
  msgstr ""
493
 
494
+ #: admin/views/metabox-config.php:475
495
  msgid "Bottom"
496
  msgstr ""
497
 
498
+ #: admin/views/metabox-config.php:478
499
  msgid "Right (Pro)"
500
  msgstr ""
501
 
502
+ #: admin/views/metabox-config.php:482
503
+ msgid "Left (Pro)"
504
+ msgstr ""
505
+
506
+ #: admin/views/metabox-config.php:486
507
  msgid "Overlay (Pro)"
508
  msgstr ""
509
 
510
+ #: admin/views/metabox-config.php:497
511
  msgid "Slide Border"
512
  msgstr ""
513
 
514
+ #: admin/views/metabox-config.php:498
515
  msgid "Set border for the slide."
516
  msgstr ""
517
 
518
+ #: admin/views/metabox-config.php:511
519
+ msgid "Slide Background"
520
+ msgstr ""
521
+
522
+ #: admin/views/metabox-config.php:512
523
+ msgid "Set background color for the slide."
524
+ msgstr ""
525
+
526
+ #: admin/views/metabox-config.php:521
527
  msgid "Post Title"
528
  msgstr ""
529
 
530
+ #: admin/views/metabox-config.php:522
531
  msgid "Show/Hide post title."
532
  msgstr ""
533
 
534
+ #: admin/views/metabox-config.php:533
535
  msgid "Post Content"
536
  msgstr ""
537
 
538
+ #: admin/views/metabox-config.php:534
539
  msgid "Show/Hide post content."
540
  msgstr ""
541
 
542
+ #: admin/views/metabox-config.php:544
543
  msgid "Content Display Type"
544
  msgstr ""
545
 
546
+ #: admin/views/metabox-config.php:545
547
  msgid "Select a content display type."
548
  msgstr ""
549
 
550
+ #: admin/views/metabox-config.php:548
551
  msgid "Excerpt"
552
  msgstr ""
553
 
554
+ #: admin/views/metabox-config.php:551
555
  msgid "Full Content (Pro)"
556
  msgstr ""
557
 
558
+ #: admin/views/metabox-config.php:555
559
  msgid "Content with Limit (Pro)"
560
  msgstr ""
561
 
562
+ #: admin/views/metabox-config.php:565
563
  msgid "Post Meta"
564
  msgstr ""
565
 
566
+ #: admin/views/metabox-config.php:572
567
+ msgid "Post Date"
568
  msgstr ""
569
 
570
+ #: admin/views/metabox-config.php:573
571
+ msgid "Show/Hide post date."
572
  msgstr ""
573
 
574
+ #: admin/views/metabox-config.php:583
575
+ msgid "Post Author"
576
  msgstr ""
577
 
578
+ #: admin/views/metabox-config.php:584
579
+ msgid "Show/Hide post author name."
580
  msgstr ""
581
 
582
+ #: admin/views/metabox-config.php:595
583
  msgid "Product Settings"
584
  msgstr ""
585
 
586
+ #: admin/views/metabox-config.php:601
587
  msgid "Product Name"
588
  msgstr ""
589
 
590
+ #: admin/views/metabox-config.php:602
591
  msgid "Show/Hide product name."
592
  msgstr ""
593
 
594
+ #: admin/views/metabox-config.php:612
595
  msgid "Product Price"
596
  msgstr ""
597
 
598
+ #: admin/views/metabox-config.php:613
599
  msgid "Show/Hide product price."
600
  msgstr ""
601
 
602
+ #: admin/views/metabox-config.php:623
603
  msgid "Product Rating"
604
  msgstr ""
605
 
606
+ #: admin/views/metabox-config.php:624
607
  msgid "Show/Hide product rating."
608
  msgstr ""
609
 
610
+ #: admin/views/metabox-config.php:634
611
  msgid "Add to Cart Button"
612
  msgstr ""
613
 
614
+ #: admin/views/metabox-config.php:635
615
  msgid "Show/Hide add to cart button."
616
  msgstr ""
617
 
618
+ #: admin/views/metabox-config.php:645
619
  msgid "Image Settings"
620
  msgstr ""
621
 
622
+ #: admin/views/metabox-config.php:651
623
  msgid "Show/Hide slide image."
624
  msgstr ""
625
 
626
+ #: admin/views/metabox-config.php:662
627
  msgid "Image Sizes"
628
  msgstr ""
629
 
630
+ #: admin/views/metabox-config.php:664
631
  msgid "Select a image size."
632
  msgstr ""
633
 
634
+ #: admin/views/metabox-config.php:670
635
+ msgid "Image Border"
636
+ msgstr ""
637
+
638
+ #: admin/views/metabox-config.php:671
639
+ msgid "Set border for the product image."
640
+ msgstr ""
641
+
642
+ #: admin/views/metabox-config.php:683
643
  msgid "Image Title Attribute"
644
  msgstr ""
645
 
646
+ #: admin/views/metabox-config.php:684
647
  msgid "Check to add image title attribute."
648
  msgstr ""
649
 
650
+ #: admin/views/metabox-config.php:699
651
  msgid "Typography"
652
  msgstr ""
653
 
654
+ #: admin/views/metabox-config.php:706
655
  msgid ""
656
+ "The Following Typography (840+ Google Fonts) options are available in the <a "
657
+ "href=\"https://shapedplugin.com/plugin/wordpress-carousel-pro/\" target="
658
+ "\"_blank\">Pro Version</a> only."
659
  msgstr ""
660
 
661
+ #: admin/views/metabox-config.php:711
662
  msgid "Load Carousel Section Title Font"
663
  msgstr ""
664
 
665
+ #: admin/views/metabox-config.php:712
666
  msgid "On/Off google font for the carousel section title."
667
  msgstr ""
668
 
669
+ #: admin/views/metabox-config.php:718
670
  msgid "Carousel Section Title Font"
671
  msgstr ""
672
 
673
+ #: admin/views/metabox-config.php:719
674
  msgid "Set Carousel section title font properties."
675
  msgstr ""
676
 
677
+ #: admin/views/metabox-config.php:738
678
  msgid "Load Caption Font"
679
  msgstr ""
680
 
681
+ #: admin/views/metabox-config.php:739
682
  msgid "On/Off google font for the image caption."
683
  msgstr ""
684
 
685
+ #: admin/views/metabox-config.php:746
686
  msgid "Caption Font"
687
  msgstr ""
688
 
689
+ #: admin/views/metabox-config.php:747
690
  msgid "Set caption font properties."
691
  msgstr ""
692
 
693
+ #: admin/views/metabox-config.php:765
694
  msgid "Load Description Font"
695
  msgstr ""
696
 
697
+ #: admin/views/metabox-config.php:766
698
  msgid "On/Off google font for the image description."
699
  msgstr ""
700
 
701
+ #: admin/views/metabox-config.php:773
702
  msgid "Description Font"
703
  msgstr ""
704
 
705
+ #: admin/views/metabox-config.php:774
706
  msgid "Set description font properties."
707
  msgstr ""
708
 
709
+ #: admin/views/metabox-config.php:792
710
+ msgid "Load Title Font"
711
  msgstr ""
712
 
713
+ #: admin/views/metabox-config.php:793
714
+ msgid "On/Off google font for the slide title."
715
  msgstr ""
716
 
717
+ #: admin/views/metabox-config.php:800
718
+ msgid "Post Title Font"
 
719
  msgstr ""
720
 
721
+ #: admin/views/metabox-config.php:801
722
+ msgid "Set title font properties."
723
  msgstr ""
724
 
725
+ #: admin/views/metabox-config.php:822
726
+ msgid "Post Content Font Load"
727
+ msgstr ""
728
+
729
+ #: admin/views/metabox-config.php:823
730
+ msgid "On/Off google font for post the content."
731
+ msgstr ""
732
+
733
+ #: admin/views/metabox-config.php:834
734
+ msgid "Post Content Font"
735
+ msgstr ""
736
+
737
+ #: admin/views/metabox-config.php:835
738
+ msgid "Set post content font properties."
739
+ msgstr ""
740
+
741
+ #: admin/views/metabox-config.php:851
742
+ msgid "Post Meta Font Load"
743
+ msgstr ""
744
+
745
+ #: admin/views/metabox-config.php:852
746
+ msgid "On/Off google font for the post meta."
747
+ msgstr ""
748
+
749
+ #: admin/views/metabox-config.php:863
750
+ msgid "Post Meta Font"
751
+ msgstr ""
752
+
753
+ #: admin/views/metabox-config.php:864
754
+ msgid "Set post meta font properties."
755
+ msgstr ""
756
+
757
+ #: admin/views/metabox-config.php:887
758
+ msgid "Product Name Font Load"
759
+ msgstr ""
760
+
761
+ #: admin/views/metabox-config.php:888
762
+ msgid "On/Off google font for the product name."
763
+ msgstr ""
764
+
765
+ #: admin/views/metabox-config.php:899
766
+ msgid "Product Name Font"
767
+ msgstr ""
768
+
769
+ #: admin/views/metabox-config.php:900
770
+ msgid "Set product name font properties."
771
+ msgstr ""
772
+
773
+ #: admin/views/metabox-config.php:923
774
+ msgid "Product Price Font Load"
775
+ msgstr ""
776
+
777
+ #: admin/views/metabox-config.php:924
778
+ msgid "On/Off google font for the product price."
779
+ msgstr ""
780
+
781
+ #: admin/views/metabox-config.php:935
782
+ msgid "Product Price Font"
783
+ msgstr ""
784
+
785
+ #: admin/views/metabox-config.php:936
786
+ msgid "Set product price font properties."
787
+ msgstr ""
788
+
789
+ #: admin/views/option-config.php:15
790
+ msgid "Settings"
791
+ msgstr ""
792
+
793
+ #: admin/views/option-config.php:49
794
+ msgid "Remove Data when Uninstall"
795
+ msgstr ""
796
+
797
+ #: admin/views/option-config.php:50
798
+ msgid "Check to remove plugin's data when plugin is uninstalled or deleted."
799
+ msgstr ""
800
+
801
+ #: admin/views/option-config.php:55
802
+ msgid "Enqueue or Dequeue CSS"
803
+ msgstr ""
804
+
805
+ #: admin/views/option-config.php:60
806
+ msgid "Slick CSS"
807
+ msgstr ""
808
+
809
+ #: admin/views/option-config.php:61
810
+ msgid "Enqueue/Dequeue slick CSS."
811
+ msgstr ""
812
+
813
+ #: admin/views/option-config.php:62 admin/views/option-config.php:72
814
+ #: admin/views/option-config.php:86 admin/views/option-config.php:96
815
+ msgid "Enqueue"
816
+ msgstr ""
817
+
818
+ #: admin/views/option-config.php:63 admin/views/option-config.php:73
819
+ #: admin/views/option-config.php:87 admin/views/option-config.php:97
820
+ msgid "Dequeue"
821
+ msgstr ""
822
+
823
+ #: admin/views/option-config.php:70
824
+ msgid "Font Awesome CSS"
825
+ msgstr ""
826
+
827
+ #: admin/views/option-config.php:71
828
+ msgid "Enqueue/Dequeue font awesome CSS."
829
+ msgstr ""
830
+
831
+ #: admin/views/option-config.php:79
832
+ msgid "Enqueue or Dequeue JS"
833
+ msgstr ""
834
+
835
+ #: admin/views/option-config.php:84
836
+ msgid "Preloader JS"
837
+ msgstr ""
838
+
839
+ #: admin/views/option-config.php:85
840
+ msgid "Enqueue/Dequeue carousel preloader JS."
841
+ msgstr ""
842
+
843
+ #: admin/views/option-config.php:94
844
+ msgid "Slick JS"
845
+ msgstr ""
846
+
847
+ #: admin/views/option-config.php:95
848
+ msgid "Enqueue/Dequeue slick JS."
849
+ msgstr ""
850
+
851
+ #: admin/views/option-config.php:112 admin/views/option-config.php:118
852
+ msgid "Custom CSS"
853
+ msgstr ""
854
+
855
+ #: admin/views/option-config.php:119
856
+ msgid "Type your css."
857
+ msgstr ""
858
+
859
+ #: admin/views/premium.php:50
860
+ msgid "Premium"
861
+ msgstr ""
862
+
863
+ #: admin/views/premium.php:65
864
+ msgid "Upgrade to <span>WordPress Carousel Pro</span>"
865
+ msgstr ""
866
+
867
+ #: admin/views/premium.php:69
868
+ msgid "Get more Advanced Functionality & Flexibility with the Premium version."
869
+ msgstr ""
870
+
871
+ #: admin/views/wpcfree-metabox/classes/metabox.class.php:248
872
+ #: admin/views/wpcfree-metabox/classes/options.class.php:665
873
+ msgid "No option provided by developer."
874
+ msgstr ""
875
+
876
+ #: admin/views/wpcfree-metabox/classes/metabox.class.php:266
877
+ msgid "Restore"
878
+ msgstr ""
879
+
880
+ #: admin/views/wpcfree-metabox/classes/metabox.class.php:267
881
+ msgid "update post for restore "
882
+ msgstr ""
883
+
884
+ #: admin/views/wpcfree-metabox/classes/metabox.class.php:267
885
+ msgid "Cancel"
886
+ msgstr ""
887
+
888
+ #: admin/views/wpcfree-metabox/classes/options.class.php:252
889
+ #: admin/views/wpcfree-metabox/functions/actions.php:116
890
+ #: admin/views/wpcfree-metabox/functions/actions.php:181
891
+ #: admin/views/wpcfree-metabox/functions/actions.php:208
892
+ msgid "Error while saving."
893
+ msgstr ""
894
+
895
+ #: admin/views/wpcfree-metabox/classes/options.class.php:303
896
+ msgid "Success. Imported backup options."
897
+ msgstr ""
898
+
899
+ #: admin/views/wpcfree-metabox/classes/options.class.php:313
900
+ msgid "Default options restored."
901
+ msgstr ""
902
+
903
+ #: admin/views/wpcfree-metabox/classes/options.class.php:326
904
+ msgid "Default options restored for only this section."
905
+ msgstr ""
906
+
907
+ #: admin/views/wpcfree-metabox/classes/options.class.php:381
908
+ msgid "Settings saved."
909
+ msgstr ""
910
+
911
+ #: admin/views/wpcfree-metabox/classes/options.class.php:567
912
+ msgid "show all options"
913
+ msgstr ""
914
+
915
+ #: admin/views/wpcfree-metabox/classes/options.class.php:569
916
+ msgid "Search option(s)"
917
+ msgstr ""
918
+
919
+ #: admin/views/wpcfree-metabox/classes/options.class.php:572
920
+ #: admin/views/wpcfree-metabox/classes/options.class.php:689
921
+ msgid "Save"
922
+ msgstr ""
923
+
924
+ #: admin/views/wpcfree-metabox/classes/options.class.php:572
925
+ #: admin/views/wpcfree-metabox/classes/options.class.php:689
926
+ msgid "Saving..."
927
+ msgstr ""
928
+
929
+ #: admin/views/wpcfree-metabox/classes/options.class.php:573
930
+ #: admin/views/wpcfree-metabox/classes/options.class.php:690
931
+ msgid "Reset Section"
932
+ msgstr ""
933
+
934
+ #: admin/views/wpcfree-metabox/classes/options.class.php:573
935
+ #: admin/views/wpcfree-metabox/classes/options.class.php:690
936
+ msgid "Are you sure to reset this section options?"
937
+ msgstr ""
938
+
939
+ #: admin/views/wpcfree-metabox/classes/options.class.php:574
940
+ #: admin/views/wpcfree-metabox/classes/options.class.php:691
941
+ #: admin/views/wpcfree-metabox/fields/backup/backup.php:34
942
+ msgid "Reset All"
943
+ msgstr ""
944
+
945
+ #: admin/views/wpcfree-metabox/classes/options.class.php:574
946
+ #: admin/views/wpcfree-metabox/classes/options.class.php:691
947
+ msgid "Are you sure to reset all options?"
948
+ msgstr ""
949
+
950
+ #: admin/views/wpcfree-metabox/classes/setup.class.php:283
951
+ msgid "Are you sure?"
952
+ msgstr ""
953
+
954
+ #: admin/views/wpcfree-metabox/classes/setup.class.php:284
955
+ msgid "Restoring options."
956
+ msgstr ""
957
+
958
+ #: admin/views/wpcfree-metabox/classes/setup.class.php:285
959
+ msgid "Importing options."
960
+ msgstr ""
961
+
962
+ #: admin/views/wpcfree-metabox/classes/setup.class.php:324
963
+ #, php-format
964
+ msgid "Ooops! This field type (%s) can not be used here, yet."
965
+ msgstr ""
966
+
967
+ #: admin/views/wpcfree-metabox/classes/setup.class.php:367
968
+ msgid "This field class is not available!"
969
+ msgstr ""
970
+
971
+ #: admin/views/wpcfree-metabox/classes/setup.class.php:370
972
+ msgid "This type is not found!"
973
+ msgstr ""
974
+
975
+ #: admin/views/wpcfree-metabox/fields/backup/backup.php:26
976
+ msgid "Import"
977
+ msgstr ""
978
+
979
+ #: admin/views/wpcfree-metabox/fields/backup/backup.php:27
980
+ msgid "copy-paste your backup string here"
981
+ msgstr ""
982
+
983
+ #: admin/views/wpcfree-metabox/fields/backup/backup.php:32
984
+ msgid "Export and Download Backup"
985
+ msgstr ""
986
+
987
+ #: admin/views/wpcfree-metabox/fields/backup/backup.php:35
988
+ msgid "Please be sure for reset all of options."
989
  msgstr ""
990
 
991
+ #: admin/views/wpcfree-metabox/fields/border/border.php:27
992
+ #: admin/views/wpcfree-metabox/fields/spacing/spacing.php:41
993
+ msgid "top"
994
+ msgstr ""
995
+
996
+ #: admin/views/wpcfree-metabox/fields/border/border.php:28
997
+ #: admin/views/wpcfree-metabox/fields/spacing/spacing.php:42
998
+ msgid "right"
999
+ msgstr ""
1000
+
1001
+ #: admin/views/wpcfree-metabox/fields/border/border.php:29
1002
+ #: admin/views/wpcfree-metabox/fields/spacing/spacing.php:43
1003
+ msgid "bottom"
1004
+ msgstr ""
1005
+
1006
+ #: admin/views/wpcfree-metabox/fields/border/border.php:30
1007
+ #: admin/views/wpcfree-metabox/fields/spacing/spacing.php:44
1008
+ msgid "left"
1009
+ msgstr ""
1010
+
1011
+ #: admin/views/wpcfree-metabox/fields/border/border.php:31
1012
+ #: admin/views/wpcfree-metabox/fields/column/column.php:51
1013
+ #: admin/views/wpcfree-metabox/fields/spacing/spacing.php:45
1014
+ msgid "all"
1015
+ msgstr ""
1016
+
1017
+ #: admin/views/wpcfree-metabox/fields/border/border.php:56
1018
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:226
1019
+ msgid "Solid"
1020
+ msgstr ""
1021
+
1022
+ #: admin/views/wpcfree-metabox/fields/border/border.php:57
1023
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:229
1024
  msgid "Dashed"
1025
  msgstr ""
1026
 
1027
+ #: admin/views/wpcfree-metabox/fields/border/border.php:58
1028
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:228
1029
+ msgid "Dotted"
1030
+ msgstr ""
1031
+
1032
+ #: admin/views/wpcfree-metabox/fields/border/border.php:59
1033
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:227
1034
  msgid "Double"
1035
  msgstr ""
1036
 
1037
+ #: admin/views/wpcfree-metabox/fields/border/border.php:60
1038
+ msgid "Inset"
1039
+ msgstr ""
1040
+
1041
+ #: admin/views/wpcfree-metabox/fields/border/border.php:61
1042
+ msgid "Outset"
1043
+ msgstr ""
1044
+
1045
+ #: admin/views/wpcfree-metabox/fields/border/border.php:62
1046
  msgid "Groove"
1047
  msgstr ""
1048
 
1049
+ #: admin/views/wpcfree-metabox/fields/border/border.php:63
1050
+ msgid "ridge"
1051
  msgstr ""
1052
 
1053
+ #: admin/views/wpcfree-metabox/fields/border/border.php:64
1054
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:225
1055
+ msgid "None"
1056
  msgstr ""
1057
 
1058
+ #: admin/views/wpcfree-metabox/fields/carousel_type/carousel_type.php:44
1059
+ msgid "PRO"
1060
  msgstr ""
1061
 
1062
+ #: admin/views/wpcfree-metabox/fields/checkbox/checkbox.php:44
1063
+ #: admin/views/wpcfree-metabox/fields/radio/radio.php:46
1064
+ #: admin/views/wpcfree-metabox/fields/select/select.php:76
1065
+ #: admin/views/wpcfree-metabox/fields/selectf/selectf.php:72
1066
+ msgid "No data provided for this option type."
1067
  msgstr ""
1068
 
1069
+ #: admin/views/wpcfree-metabox/fields/column/column.php:46
1070
+ msgid "Large Desktop"
1071
+ msgstr ""
1072
+
1073
+ #: admin/views/wpcfree-metabox/fields/column/column.php:47
1074
+ msgid "Desktop"
1075
+ msgstr ""
1076
+
1077
+ #: admin/views/wpcfree-metabox/fields/column/column.php:48
1078
+ msgid "Small Desktop"
1079
+ msgstr ""
1080
+
1081
+ #: admin/views/wpcfree-metabox/fields/column/column.php:49
1082
+ msgid "Tablet"
1083
+ msgstr ""
1084
+
1085
+ #: admin/views/wpcfree-metabox/fields/column/column.php:50
1086
+ msgid "Mobile"
1087
  msgstr ""
1088
 
1089
+ #: admin/views/wpcfree-metabox/fields/gallery/gallery.php:22
1090
  msgid "Add Gallery"
1091
  msgstr ""
1092
 
1093
+ #: admin/views/wpcfree-metabox/fields/gallery/gallery.php:23
1094
  msgid "Edit Gallery"
1095
  msgstr ""
1096
 
1097
+ #: admin/views/wpcfree-metabox/fields/gallery/gallery.php:24
1098
  msgid "Clear"
1099
  msgstr ""
1100
 
1101
+ #: admin/views/wpcfree-metabox/fields/image_sizes/image_sizes.php:57
1102
+ msgid "Original uploaded image"
1103
+ msgstr ""
1104
+
1105
+ #: admin/views/wpcfree-metabox/fields/image_sizes/image_sizes.php:103
1106
+ msgid "No image sizes found."
1107
+ msgstr ""
1108
+
1109
+ #: admin/views/wpcfree-metabox/fields/media/media.php:23
1110
+ msgid "Upload"
1111
+ msgstr ""
1112
+
1113
+ #: admin/views/wpcfree-metabox/fields/media/media.php:24
1114
+ msgid "Remove"
1115
+ msgstr ""
1116
+
1117
+ #: admin/views/wpcfree-metabox/fields/media/media.php:54
1118
+ msgid "No media selected"
1119
  msgstr ""
1120
 
1121
+ #: admin/views/wpcfree-metabox/fields/switcher/switcher.php:20
1122
+ msgid "On"
1123
  msgstr ""
1124
 
1125
+ #: admin/views/wpcfree-metabox/fields/switcher/switcher.php:21
1126
+ #: admin/views/wpcfree-metabox/fields/switcherf/switcherf.php:19
1127
+ msgid "Off"
1128
  msgstr ""
1129
 
1130
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:88
1131
+ msgid "Font Family"
1132
  msgstr ""
1133
 
1134
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:105
1135
+ msgid "Backup Font Family"
1136
  msgstr ""
1137
 
1138
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:125
1139
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:139
1140
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:152
1141
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:204
1142
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:235
1143
+ msgid "Default"
1144
+ msgstr ""
1145
+
1146
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:137
1147
+ msgid "Font Style"
1148
+ msgstr ""
1149
+
1150
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:151
1151
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:152
1152
+ msgid "Load Extra Styles"
1153
+ msgstr ""
1154
+
1155
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:165
1156
+ msgid "Subset"
1157
+ msgstr ""
1158
+
1159
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:175
1160
+ msgid "Text Align"
1161
+ msgstr ""
1162
+
1163
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:196
1164
+ msgid "Font Variant"
1165
+ msgstr ""
1166
+
1167
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:199
1168
+ msgid "Normal"
1169
+ msgstr ""
1170
+
1171
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:200
1172
+ msgid "Small Caps"
1173
+ msgstr ""
1174
+
1175
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:201
1176
+ msgid "All Small Caps"
1177
+ msgstr ""
1178
+
1179
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:213
1180
+ msgid "Text Transform"
1181
+ msgstr ""
1182
+
1183
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:222
1184
+ msgid "Text Decoration"
1185
+ msgstr ""
1186
+
1187
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:230
1188
+ msgid "Wavy"
1189
+ msgstr ""
1190
+
1191
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:231
1192
+ msgid "Overline"
1193
+ msgstr ""
1194
+
1195
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:232
1196
+ msgid "Line-through"
1197
+ msgstr ""
1198
+
1199
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:248
1200
  msgid "Font Size"
1201
  msgstr ""
1202
 
1203
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:260
1204
  msgid "Line Height"
1205
  msgstr ""
1206
 
1207
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:272
1208
+ msgid "Letter Spacing"
1209
  msgstr ""
1210
 
1211
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:284
1212
+ msgid "Word Spacing"
1213
  msgstr ""
1214
 
1215
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:300
1216
+ msgid "Font Color"
1217
  msgstr ""
1218
 
1219
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:311
1220
+ msgid "Font Hover Color"
1221
  msgstr ""
1222
 
1223
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:324
1224
+ msgid "Custom Style"
1225
  msgstr ""
1226
 
1227
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:389
1228
+ msgid "Custom Web Fonts"
1229
  msgstr ""
1230
 
1231
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:395
1232
+ msgid "Safe Web Fonts"
1233
  msgstr ""
1234
 
1235
+ #: admin/views/wpcfree-metabox/fields/typography/typography.php:418
1236
+ msgid "Google Web Fonts"
1237
  msgstr ""
1238
 
1239
+ #: admin/views/wpcfree-metabox/functions/actions.php:100
1240
+ msgid "No data provided by developer"
1241
  msgstr ""
1242
 
1243
+ #: admin/views/wpcfree-metabox/functions/actions.php:234
1244
+ msgid "Add Icon"
1245
+ msgstr ""
1246
+
1247
+ #: admin/views/wpcfree-metabox/functions/actions.php:238
1248
+ msgid "Search a Icon..."
1249
+ msgstr ""
1250
+
1251
+ #: admin/views/wpcfree-metabox/functions/validate.php:14
1252
+ #: admin/views/wpcfree-metabox/functions/validate.php:82
1253
+ msgid "Please write a valid email address!"
1254
+ msgstr ""
1255
+
1256
+ #: admin/views/wpcfree-metabox/functions/validate.php:31
1257
+ #: admin/views/wpcfree-metabox/functions/validate.php:101
1258
+ msgid "Please write a numeric data!"
1259
+ msgstr ""
1260
+
1261
+ #: admin/views/wpcfree-metabox/functions/validate.php:48
1262
+ #: admin/views/wpcfree-metabox/functions/validate.php:120
1263
+ msgid "Error! This field is required!"
1264
+ msgstr ""
1265
+
1266
+ #: admin/views/wpcfree-metabox/functions/validate.php:65
1267
+ #: admin/views/wpcfree-metabox/functions/validate.php:139
1268
+ msgid "Please write a valid url!"
1269
  msgstr ""
1270
 
1271
  #: includes/class-wp-carousel-free-post-types.php:75
1317
  msgid "All Carousels"
1318
  msgstr ""
1319
 
1320
+ #: public/templates/post-carousel.php:60
1321
  msgid " By "
1322
  msgstr ""
1323
 
1324
+ #: public/templates/post-carousel.php:65
1325
  msgid "On "
1326
  msgstr ""
1327
 
1328
+ #: public/templates/post-carousel.php:90
1329
  msgid "No posts found"
1330
  msgstr ""
1331
 
1332
+ #: public/templates/product-carousel.php:82
1333
  msgid "Rated "
1334
  msgstr ""
1335
 
1336
+ #: public/templates/product-carousel.php:82
1337
  msgid " out of 5"
1338
  msgstr ""
1339
 
1340
+ #: public/templates/product-carousel.php:98
1341
  msgid "No products found"
1342
  msgstr ""
public/class-wp-carousel-free-public.php CHANGED
@@ -39,7 +39,7 @@ class WP_Carousel_Free_Public {
39
  * @param string $version The version of the plugin.
40
  */
41
  public function __construct( $plugin_name, $version ) {
42
- $this->suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
43
  $this->plugin_name = $plugin_name;
44
  $this->version = $version;
45
  }
@@ -51,13 +51,13 @@ class WP_Carousel_Free_Public {
51
  * @return void
52
  */
53
  public function enqueue_styles() {
54
- if ( true == sp_get_option( 'wpcp_dequeue_slick_css' ) ) {
55
- wp_enqueue_style( 'wpcf-slick', WPCAROUSELF_URL . 'public/css/slick.css', array(), $this->version, 'all' );
56
  }
57
- if ( true == sp_get_option( 'wpcp_dequeue_fa_css' ) ) {
58
  wp_enqueue_style( $this->plugin_name . '-fontawesome', WPCAROUSELF_URL . 'public/css/font-awesome.min.css', array(), $this->version, 'all' );
59
  }
60
- wp_enqueue_style( $this->plugin_name, WPCAROUSELF_URL . 'public/css/wp-carousel-free-public.css', array(), $this->version, 'all' );
61
  }
62
 
63
  /**
@@ -67,7 +67,8 @@ class WP_Carousel_Free_Public {
67
  * @return void
68
  */
69
  public function enqueue_scripts() {
70
- wp_register_script( 'wpcf-slick', WPCAROUSELF_URL . 'public/js/slick.js', array( 'jquery' ), $this->version, true );
71
- wp_register_script( 'wpcf-slick-config', WPCAROUSELF_URL . 'public/js/wp-carousel-free-public.js', array( 'jquery', 'wpcf-slick' ), $this->version, true );
 
72
  }
73
  }
39
  * @param string $version The version of the plugin.
40
  */
41
  public function __construct( $plugin_name, $version ) {
42
+ $this->suffix = defined( 'WP_DEBUG' ) && WP_DEBUG ? '' : '.min';
43
  $this->plugin_name = $plugin_name;
44
  $this->version = $version;
45
  }
51
  * @return void
52
  */
53
  public function enqueue_styles() {
54
+ if ( wpcf_get_option( 'wpcp_enqueue_slick_css', true ) ) {
55
+ wp_enqueue_style( 'wpcf-slick', WPCAROUSELF_URL . 'public/css/slick' . $this->suffix . '.css', array(), $this->version, 'all' );
56
  }
57
+ if ( wpcf_get_option( 'wpcp_enqueue_fa_css', true ) ) {
58
  wp_enqueue_style( $this->plugin_name . '-fontawesome', WPCAROUSELF_URL . 'public/css/font-awesome.min.css', array(), $this->version, 'all' );
59
  }
60
+ wp_enqueue_style( $this->plugin_name, WPCAROUSELF_URL . 'public/css/wp-carousel-free-public' . $this->suffix . '.css', array(), $this->version, 'all' );
61
  }
62
 
63
  /**
67
  * @return void
68
  */
69
  public function enqueue_scripts() {
70
+ wp_register_script( 'wpcp-preloader', WPCAROUSELF_URL . 'public/js/preloader' . $this->suffix . '.js', array( 'jquery' ), $this->version, true );
71
+ wp_register_script( 'wpcf-slick', WPCAROUSELF_URL . 'public/js/slick' . $this->suffix . '.js', array( 'jquery' ), $this->version, true );
72
+ wp_register_script( 'wpcf-slick-config', WPCAROUSELF_URL . 'public/js/wp-carousel-free-public' . $this->suffix . '.js', array( 'jquery' ), $this->version, true );
73
  }
74
  }
public/css/bx_loader.gif ADDED
Binary file
public/css/slick.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .slick-slider{position:relative;display:block;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-touch-callout:none;-khtml-user-select:none;-ms-touch-action:pan-y;touch-action:pan-y;-webkit-tap-highlight-color:transparent}.slick-list{position:relative;display:block;overflow:hidden;margin:0;padding:0}.slick-list:focus{outline:0}.slick-list.dragging{cursor:pointer;cursor:hand}.slick-slider .slick-list,.slick-slider .slick-track{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.slick-track{position:relative;top:0;left:0;display:block;margin-left:auto;margin-right:auto}.slick-track:after,.slick-track:before{display:table;content:''}.slick-track:after{clear:both}.slick-loading .slick-track{visibility:hidden}.slick-slide{display:none;float:left;height:100%;min-height:1px}[dir=rtl] .slick-slide{float:right}.slick-slide img{display:block}.slick-slide.slick-loading img{display:none}.slick-slide.dragging img{pointer-events:none}.slick-initialized .slick-slide{display:block}.slick-loading .slick-slide{visibility:hidden}.slick-vertical .slick-slide{display:block;height:auto;border:1px solid transparent}.slick-arrow.slick-hidden{display:none}.slick-loading .slick-list{background:#fff url(./ajax-loader.gif) center center no-repeat}
public/css/wp-carousel-free-public.css CHANGED
@@ -4,13 +4,15 @@
4
  .sp-wpcp-wrapper {
5
  margin-bottom: 0;
6
  }
 
 
 
 
7
  .wpcp-carousel-section.wpcp-standard {
8
  overflow: hidden;
9
  padding-right: 2px;
10
- display: none;
11
  }
12
  .wpcp-carousel-section.wpcp-standard.slick-initialized {
13
- display: block;
14
  position: relative;
15
  }
16
  .wpcp-carousel-section .wpcp-single-item {
@@ -70,11 +72,6 @@
70
  /*--------------------------------------------------------------
71
  ## WP post Carousel
72
  --------------------------------------------------------------*/
73
- .wpcp-carousel-section:not(.wpcp-product-carousel) .wpcp-single-item {
74
- border: 1px solid #e5e5e5;
75
- background: #f9f9f9;
76
- }
77
-
78
  .wpcp-post-carousel .wpcp-single-item .wpcp-all-captions {
79
  padding: 15px 20px 0;
80
  overflow: hidden;
@@ -178,9 +175,6 @@
178
  /*--------------------------------------------------------------
179
  ## Product Carousel
180
  --------------------------------------------------------------*/
181
- .wpcp-carousel-section.wpcp-product-carousel .wpcp-slide-image{
182
- border: 1px solid #efefef;
183
- }
184
  .wpcp-product-carousel .wpcp-single-item .wpcp-all-captions {
185
  padding: 15px 20px 0;
186
  overflow: hidden;
4
  .sp-wpcp-wrapper {
5
  margin-bottom: 0;
6
  }
7
+ .wpcp-carousel-section.wpcp-standard .slick-list,
8
+ .wpcp-carousel-section.wpcp-standard {
9
+ overflow: hidden;
10
+ }
11
  .wpcp-carousel-section.wpcp-standard {
12
  overflow: hidden;
13
  padding-right: 2px;
 
14
  }
15
  .wpcp-carousel-section.wpcp-standard.slick-initialized {
 
16
  position: relative;
17
  }
18
  .wpcp-carousel-section .wpcp-single-item {
72
  /*--------------------------------------------------------------
73
  ## WP post Carousel
74
  --------------------------------------------------------------*/
 
 
 
 
 
75
  .wpcp-post-carousel .wpcp-single-item .wpcp-all-captions {
76
  padding: 15px 20px 0;
77
  overflow: hidden;
175
  /*--------------------------------------------------------------
176
  ## Product Carousel
177
  --------------------------------------------------------------*/
 
 
 
178
  .wpcp-product-carousel .wpcp-single-item .wpcp-all-captions {
179
  padding: 15px 20px 0;
180
  overflow: hidden;
public/css/wp-carousel-free-public.min.css CHANGED
@@ -1 +1 @@
1
- .sp-wpcp-wrapper{margin-bottom:0}.wpcp-carousel-section.wpcp-standard{overflow:hidden;padding-right:2px;display:none}.wpcp-carousel-section.wpcp-standard.slick-initialized{display:block;position:relative}.wpcp-carousel-section .wpcp-single-item{overflow:hidden;display:inline-block;vertical-align:middle;float:none}.wpcp-all-captions li{list-style:none;margin:0}.wpcp-carousel-section p,.wpcp-carousel-section ul,.wpcp-image-carousel .wpcp-single-item .wpcp-all-captions h2{margin:0}.wpcp-carousel-section.wpcp-video-carousel .wpcp-single-item .wpcp-slide-image{position:relative}.wpcp-carousel-section.wpcp-content-carousel .wpcp-single-item{padding-left:15px;padding-right:15px}.wpcp-carousel-section .wpcp-single-item img{margin:0 auto;max-width:100%;box-shadow:none}.wpcp-carousel-section.wpcp-image-carousel .wpcp-single-item .wpcp-all-captions{padding:10px 20px 15px}.wpcp-carousel-section .wpcp-single-item .wpcp-all-captions .wpcp-image-description{margin:6px 0 0}.wpcp-carousel-section .wpcp-single-item .wpcp-slide-image a:focus{outline:0}.wpcp-carousel-section .slick-slide:focus{outline:0}.wpcp-carousel-section.slick-initialized .slick-slide{margin-right:20px;float:none;display:inline-block;vertical-align:middle}.wpcp-carousel-section .slick-list{margin-right:-20px}.wpcp-carousel-section .wpcp-all-captions a,.wpcp-carousel-section a,.wpcp-carousel-section a:hover{text-decoration:none}.wpcp-carousel-section:not(.wpcp-product-carousel) .wpcp-single-item{border:1px solid #e5e5e5;background:#f9f9f9}.wpcp-post-carousel .wpcp-single-item .wpcp-all-captions{padding:15px 20px 0;overflow:hidden}.wpcp-post-carousel .wpcp-single-item .wpcp-all-captions h2{font-size:16px;font-weight:600;margin:0 0 10px}.wpcp-single-item h2 a{color:#444;text-decoration:none}.wpcp-post-carousel .wpcp-single-item .wpcp-all-captions .post-categories{margin:0 0 7px;padding:0;display:block}.wpcp-post-carousel .wpcp-all-captions p{margin-bottom:15px}.wpcp_readmore{border:1px solid;display:inline-block;background:#22afba;margin:0 0 14px;line-height:32px;padding:5px 14px;font-weight:600}.wpcp_readmore,.wpcp_readmore:focus,.wpcp_readmore:hover{color:#fff}.wpcp-single-item .wpcp-all-captions .wpcp-post-meta{margin:0 0 20px;padding:0}.wpcp-post-carousel .wpcp-post-meta li{display:inline-block;margin-right:5px}.wpcp-post-carousel .wpcp-post-meta li:last-child{margin-right:0}.wpcp-post-meta li,.wpcp-post-meta li a{color:#999}.wpcp-carousel-section.detail-on-right .wpcp-single-item .wpcp-all-captions,.wpcp-carousel-section.detail-on-right .wpcp-single-item .wpcp-slide-image{float:left;width:50%;box-sizing:border-box}.wpcp-carousel-section.detail-with-overlay .wpcp-all-captions{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;justify-content:center;height:100%}.wpcp-carousel-section.detail-with-overlay.overlay-lower .wpcp-all-captions{top:auto;display:block;height:auto}.wpcp-carousel-section.detail-with-overlay.overlay-on-hover .wpcp-all-captions{visibility:hidden;opacity:0;transition:visibility .3s linear,opacity .3s linear}.wpcp-carousel-section.detail-with-overlay.overlay-on-hover .wpcp-single-item:hover .wpcp-all-captions{visibility:visible;opacity:1}.wpcp-carousel-section.detail-with-overlay .wpcp-single-item{position:relative}.wpcp-carousel-section .wpcp-single-item:focus{outline:0}.wpcp-carousel-section.wpcp-product-carousel .wpcp-slide-image{border:1px solid #efefef}.wpcp-product-carousel .wpcp-single-item .wpcp-all-captions{padding:15px 20px 0;overflow:hidden;text-align:center}.wpcp-product-carousel .wpcp-single-item .wpcp-product-title{margin:0;font-size:16px;line-height:23px;font-weight:600}.wpcp-product-price{margin-top:5px}.wpcp-carousel-section.wpcp-product-carousel .wpcp-cart-button{margin-top:12px}.wpcp-carousel-section.wpcp-product-carousel .wpcp-cart-button a.button{background:#ebebeb;color:#545454;border:1px solid #d1d1d1;font-weight:500;padding:0 20px;line-height:38px;display:inline-block;font-size:14px}.wpcp-carousel-section.wpcp-product-carousel .wpcp-all-captions .wpcp-cart-button a.add_to_cart_button.added{display:none}.wpcp-carousel-section.wpcp-product-carousel .wpcp-all-captions .wpcp-cart-button .added_to_cart{font-size:100%;margin:0;line-height:38px;cursor:pointer;position:relative;text-decoration:none;overflow:visible;padding:0 20px;font-weight:600;border-radius:3px;left:auto;color:#515151;background-color:#ebe9eb;border:0;display:inline-block;background-image:none;box-shadow:none;text-shadow:none;border:1px solid}.wpcp-carousel-section.wpcp-product-carousel .wpcp-all-captions .wpcp-cart-button a.button:hover{background:#3f3f3f;border-color:#d1d1d1;color:#fff}.wpcp-carousel-section.wpcp-product-carousel .wpcp-all-captions .wpcp-cart-button .wc-forward::after{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-style:normal;font-variant:normal;font-weight:400;line-height:1;vertical-align:-.125em;font:normal normal normal 14px/1 FontAwesome;font-weight:900;line-height:inherit;vertical-align:baseline;content:"\f178";margin-left:.5407911001em}.wpcp-carousel-section .woocommerce-product-rating .star-rating{margin:4px auto;float:none}.wpcp-product-price span{font-weight:700;font-size:14px}.wpcp-carousel-section .slick-next:after,.wpcp-carousel-section .slick-next:before,.wpcp-carousel-section .slick-prev:after,.wpcp-carousel-section .slick-prev:before{display:none}.wpcp-carousel-section .slick-prev{left:0}.wpcp-carousel-section .slick-next{right:0}.wpcp-carousel-section .slick-next,.wpcp-carousel-section .slick-prev{width:30px;height:30px;line-height:30px;position:absolute;z-index:22;left:auto;top:auto;font-size:30px;-webkit-transition:ease all .3s;-moz-transition:ease all .3s;-ms-transition:ease all .3s;-o-transition:ease all .3s;transition:ease all .3s;margin-top:-15px;cursor:pointer}.wpcp-carousel-section.nav-vertical-center{padding:0 25px}.wpcp-carousel-section .slick-next,.wpcp-carousel-section .slick-next i,.wpcp-carousel-section .slick-prev,.wpcp-carousel-section .slick-prev i{line-height:28px;font-family:fontawesome;color:#000}.wpcp-carousel-section.nav-vertical-center .slick-next,.wpcp-carousel-section.nav-vertical-center .slick-prev{top:50%}.wpcp-carousel-section.nav-vertical-center .slick-prev{left:0}.wpcp-carousel-section.nav-vertical-center .slick-next,.wpcp-carousel-section.nav-vertical-center .slick-prev{margin-top:-15px}.wpcp-carousel-section.nav-vertical-center.slick-dotted .slick-next,.wpcp-carousel-section.nav-vertical-center.slick-dotted .slick-prev{margin-top:-35px}.wpcp-carousel-section.nav-vertical-center .slick-next{right:0;text-align:right}.wpcp-carousel-section ul.slick-dots{list-style:none;padding:0!important;margin:0;text-align:center;margin-top:18px;position:relative}.wpcp-carousel-section ul.slick-dots li{display:inline;margin:0}.wpcp-carousel-section ul.slick-dots li button{background-color:#ccc;border:0 solid;border-radius:50%;font-size:0;margin:3px;overflow:hidden;padding:0;text-indent:-999px;width:12px;height:12px;cursor:pointer}.wpcp-carousel-section ul.slick-dots,.wpcp-carousel-section ul.slick-dots li,.wpcp-carousel-section ul.slick-dots li button{line-height:1!important}.wpcp-carousel-section ul.slick-dots li button:focus{outline:0}.wpcp-carousel-section ul.slick-dots li.slick-active button{background-color:#666}
1
+ .sp-wpcp-wrapper{margin-bottom:0}.wpcp-carousel-section.wpcp-standard,.wpcp-carousel-section.wpcp-standard .slick-list{overflow:hidden}.wpcp-carousel-section.wpcp-standard{overflow:hidden;padding-right:2px}.wpcp-carousel-section.wpcp-standard.slick-initialized{position:relative}.wpcp-carousel-section .wpcp-single-item{overflow:hidden;display:inline-block;vertical-align:middle;float:none}.wpcp-all-captions li{list-style:none;margin:0}.wpcp-carousel-section p,.wpcp-carousel-section ul,.wpcp-image-carousel .wpcp-single-item .wpcp-all-captions h2{margin:0}.wpcp-carousel-section.wpcp-video-carousel .wpcp-single-item .wpcp-slide-image{position:relative}.wpcp-carousel-section.wpcp-content-carousel .wpcp-single-item{padding-left:15px;padding-right:15px}.wpcp-carousel-section .wpcp-single-item img{margin:0 auto;max-width:100%;box-shadow:none}.wpcp-carousel-section.wpcp-image-carousel .wpcp-single-item .wpcp-all-captions{padding:10px 20px 15px}.wpcp-carousel-section .wpcp-single-item .wpcp-all-captions .wpcp-image-description{margin:6px 0 0}.wpcp-carousel-section .wpcp-single-item .wpcp-slide-image a:focus{outline:0}.wpcp-carousel-section .slick-slide:focus{outline:0}.wpcp-carousel-section.slick-initialized .slick-slide{margin-right:20px;float:none;display:inline-block;vertical-align:middle}.wpcp-carousel-section .slick-list{margin-right:-20px}.wpcp-carousel-section .wpcp-all-captions a,.wpcp-carousel-section a,.wpcp-carousel-section a:hover{text-decoration:none}.wpcp-post-carousel .wpcp-single-item .wpcp-all-captions{padding:15px 20px 0;overflow:hidden}.wpcp-post-carousel .wpcp-single-item .wpcp-all-captions h2{font-size:16px;font-weight:600;margin:0 0 10px}.wpcp-single-item h2 a{color:#444;text-decoration:none}.wpcp-post-carousel .wpcp-single-item .wpcp-all-captions .post-categories{margin:0 0 7px;padding:0;display:block}.wpcp-post-carousel .wpcp-all-captions p{margin-bottom:15px}.wpcp_readmore{border:1px solid;display:inline-block;background:#22afba;margin:0 0 14px;line-height:32px;padding:5px 14px;font-weight:600}.wpcp_readmore,.wpcp_readmore:focus,.wpcp_readmore:hover{color:#fff}.wpcp-single-item .wpcp-all-captions .wpcp-post-meta{margin:0 0 20px;padding:0}.wpcp-post-carousel .wpcp-post-meta li{display:inline-block;margin-right:5px}.wpcp-post-carousel .wpcp-post-meta li:last-child{margin-right:0}.wpcp-post-meta li,.wpcp-post-meta li a{color:#999}.wpcp-carousel-section.detail-on-right .wpcp-single-item .wpcp-all-captions,.wpcp-carousel-section.detail-on-right .wpcp-single-item .wpcp-slide-image{float:left;width:50%;box-sizing:border-box}.wpcp-carousel-section.detail-with-overlay .wpcp-all-captions{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;justify-content:center;height:100%}.wpcp-carousel-section.detail-with-overlay.overlay-lower .wpcp-all-captions{top:auto;display:block;height:auto}.wpcp-carousel-section.detail-with-overlay.overlay-on-hover .wpcp-all-captions{visibility:hidden;opacity:0;transition:visibility .3s linear,opacity .3s linear}.wpcp-carousel-section.detail-with-overlay.overlay-on-hover .wpcp-single-item:hover .wpcp-all-captions{visibility:visible;opacity:1}.wpcp-carousel-section.detail-with-overlay .wpcp-single-item{position:relative}.wpcp-carousel-section .wpcp-single-item:focus{outline:0}.wpcp-product-carousel .wpcp-single-item .wpcp-all-captions{padding:15px 20px 0;overflow:hidden;text-align:center}.wpcp-product-carousel .wpcp-single-item .wpcp-product-title{margin:0;font-size:16px;line-height:23px;font-weight:600}.wpcp-product-price{margin-top:5px}.wpcp-carousel-section.wpcp-product-carousel .wpcp-cart-button{margin-top:12px}.wpcp-carousel-section.wpcp-product-carousel .wpcp-cart-button a.button{back