Version Description
- Fix: WordPress 5.1 compatible issue.
Download this release
Release Info
Developer | shapedplugin |
Plugin | Carousel, Slider, Gallery by WP Carousel – Image Carousel & Photo Gallery, Post Carousel & Post Grid, Product Carousel & Product Grid for WooCommerce |
Version | 2.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.4.9 to 2.0.1
- admin/class-wp-carousel-free-admin.php +232 -0
- admin/css/wp-carousel-free-admin.css +234 -0
- admin/img/premium-logo.png +0 -0
- admin/img/wpcp-icon-256.png +0 -0
- admin/img/wpcp-logo.png +0 -0
- admin/index.php +1 -0
- admin/js/icon32.png +0 -0
- admin/js/mce-button.js +28 -0
- admin/views/help.php +109 -0
- admin/views/meta-box/assets/css/sp-custom.css +800 -0
- admin/views/meta-box/assets/css/sp-framework-rtl.css +220 -0
- admin/views/meta-box/assets/css/sp-framework.css +1850 -0
- admin/views/meta-box/assets/css/sp-style.css +113 -0
- admin/views/meta-box/assets/images/chosen-sprite.png +0 -0
- admin/views/meta-box/assets/js/dependency.js +98 -0
- admin/views/meta-box/assets/js/sp-framework.js +645 -0
- admin/views/meta-box/assets/js/sp-plugins.js +2405 -0
- admin/views/meta-box/assets/js/sp-plugins.min.js +3 -0
- admin/views/meta-box/classes/abstract.class.php +23 -0
- admin/views/meta-box/classes/framework.class.php +484 -0
- admin/views/meta-box/classes/metabox.class.php +296 -0
- admin/views/meta-box/classes/options.class.php +522 -0
- admin/views/meta-box/config/framework.config.php +76 -0
- admin/views/meta-box/config/metabox.config.php +727 -0
- admin/views/meta-box/fields/border/border.php +114 -0
- admin/views/meta-box/fields/button_set/button_set.php +47 -0
- admin/views/meta-box/fields/carousel_type/carousel_type.php +48 -0
- admin/views/meta-box/fields/checkbox/checkbox.php +42 -0
- admin/views/meta-box/fields/color_picker/color_picker.php +44 -0
- admin/views/meta-box/fields/color_set/color_set.php +136 -0
- admin/views/meta-box/fields/column/column.php +161 -0
- admin/views/meta-box/fields/gallery/gallery.php +58 -0
- admin/views/meta-box/fields/image_sizes/image_sizes.php +81 -0
- admin/views/meta-box/fields/notice/notice.php +24 -0
- admin/views/meta-box/fields/number/number.php +37 -0
- admin/views/meta-box/fields/pronotice/pronotice.php +24 -0
- admin/views/meta-box/fields/select/select.php +59 -0
- admin/views/meta-box/fields/select_typo/select_typo.php +48 -0
- admin/views/meta-box/fields/subheading/subheading.php +24 -0
- admin/views/meta-box/fields/switcher/switcher.php +25 -0
- admin/views/meta-box/fields/textarea/textarea.php +23 -0
- admin/views/meta-box/fields/typography_advanced/google-fonts.json +6 -0
- admin/views/meta-box/fields/typography_advanced/typography_advanced.php +197 -0
- admin/views/meta-box/functions/actions.php +6 -0
- admin/views/meta-box/functions/enqueue.php +49 -0
- admin/views/meta-box/functions/fallback.php +83 -0
- admin/views/meta-box/functions/helpers.php +259 -0
- admin/views/meta-box/functions/sanitize.php +132 -0
- admin/views/meta-box/functions/validate.php +74 -0
- admin/views/meta-box/index.php +1 -0
- admin/views/meta-box/sp-framework-path.php +381 -0
- admin/views/meta-box/sp-framework.php +50 -0
- admin/views/premium.php +274 -0
- admin/views/tmce-button.php +181 -0
- assets/css/admin.css +0 -115
- assets/css/style.css +0 -90
- assets/js/admin.js +0 -16
- assets/js/slick.min.js +0 -18
- inc/functions.php +0 -7
- inc/scripts.php +0 -57
- inc/shortcodes.php +0 -199
- includes/class-wp-carousel-free-i18n.php +41 -0
- includes/class-wp-carousel-free-loader.php +157 -0
- includes/class-wp-carousel-free-post-types.php +113 -0
- includes/class-wp-carousel-free-shortcode.php +191 -0
- includes/index.php +1 -0
- index.php +1 -0
- languages/wp-carousel-free.pot +1051 -0
- public/class-wp-carousel-free-public.php +73 -0
- public/css/ajax-loader.gif +0 -0
- {assets → public}/css/font-awesome.min.css +1 -1
- {assets → public}/css/slick.css +7 -0
- public/css/wp-carousel-free-public.css +368 -0
- public/dynamic-style.php +74 -0
- {assets → public}/fonts/FontAwesome.otf +0 -0
- {assets → public}/fonts/fontawesome-webfont.eot +0 -0
- {assets → public}/fonts/fontawesome-webfont.svg +0 -0
- {assets → public}/fonts/fontawesome-webfont.ttf +0 -0
- {assets → public}/fonts/fontawesome-webfont.woff +0 -0
- {assets → public}/fonts/fontawesome-webfont.woff2 +0 -0
- public/index.php +1 -0
- public/js/slick.js +3037 -0
- public/js/slick.min.js +18 -0
- public/js/wp-carousel-free-public.js +17 -0
- public/shortcode-deprecated.php +173 -0
- public/templates/image-carousel.php +45 -0
- public/templates/post-carousel.php +91 -0
- public/templates/product-carousel.php +98 -0
- readme.txt +394 -303
- wp-carousel-free.php +334 -293
admin/class-wp-carousel-free-admin.php
ADDED
@@ -0,0 +1,232 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The admin-specific of the plugin.
|
4 |
+
*
|
5 |
+
* @link https://shapedplugin.com
|
6 |
+
* @since 2.0.0
|
7 |
+
*
|
8 |
+
* @package WordPress_Carousel_Pro
|
9 |
+
* @subpackage WordPress_Carousel_Pro/admin
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* The class for the admin-specific functionality of the plugin.
|
14 |
+
*/
|
15 |
+
class WP_Carousel_Free_Admin {
|
16 |
+
/**
|
17 |
+
* Script and style suffix
|
18 |
+
*
|
19 |
+
* @since 2.0.0
|
20 |
+
* @access protected
|
21 |
+
* @var string
|
22 |
+
*/
|
23 |
+
protected $suffix;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* The ID of the plugin.
|
27 |
+
*
|
28 |
+
* @since 2.0.0
|
29 |
+
* @access protected
|
30 |
+
* @var string $plugin_name The ID of this plugin
|
31 |
+
*/
|
32 |
+
protected $plugin_name;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* The version of the plugin
|
36 |
+
*
|
37 |
+
* @since 2.0.0
|
38 |
+
* @access protected
|
39 |
+
* @var string $version The current version fo the plugin.
|
40 |
+
*/
|
41 |
+
protected $version;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* The single instance of the class.
|
45 |
+
*
|
46 |
+
* @var self
|
47 |
+
* @since 2.0.0
|
48 |
+
*/
|
49 |
+
private static $_instance = null;
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Allows for accessing single instance of class. Class should only be constructed once per call.
|
53 |
+
*
|
54 |
+
* @since 2.0.0
|
55 |
+
* @static
|
56 |
+
* @return self Main instance.
|
57 |
+
*/
|
58 |
+
public static function instance() {
|
59 |
+
if ( is_null( self::$_instance ) ) {
|
60 |
+
self::$_instance = new self();
|
61 |
+
}
|
62 |
+
return self::$_instance;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Initialize the class sets its properties.
|
67 |
+
*
|
68 |
+
* @since 2.0.0
|
69 |
+
* @param string $plugin_name The name of the plugin.
|
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 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Register the stylesheets for the admin area of the plugin.
|
80 |
+
*
|
81 |
+
* @since 3.0.0
|
82 |
+
* @return void
|
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 |
+
/**
|
90 |
+
* Change Carousel updated messages.
|
91 |
+
*
|
92 |
+
* @since 2.0.0
|
93 |
+
* @param string $messages The Update messages.
|
94 |
+
* @return statement
|
95 |
+
*/
|
96 |
+
public function wpcp_carousel_updated_messages( $messages ) {
|
97 |
+
global $post, $post_ID;
|
98 |
+
$messages['sp_wp_carousel'] = array(
|
99 |
+
0 => '', // Unused. Messages start at index 1.
|
100 |
+
1 => sprintf( __( 'Carousel updated.', 'wp-carousel-free' ) ),
|
101 |
+
2 => '',
|
102 |
+
3 => '',
|
103 |
+
4 => __( 'Carousel updated.', 'wp-carousel-free' ),
|
104 |
+
5 => isset( $_GET['revision'] ) ? sprintf( __( 'Carousel restored to revision from %s', 'wp-carousel-free' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
|
105 |
+
6 => sprintf( __( 'Carousel published.', 'wp-carousel-free' ) ),
|
106 |
+
7 => __( 'Carousel saved.', 'wp-carousel-free' ),
|
107 |
+
8 => sprintf( __( 'Carousel submitted.', 'wp-carousel-free' ) ),
|
108 |
+
9 => sprintf( __( 'Carousel scheduled for: <strong>%1$s</strong>.', 'wp-carousel-free' ), date_i18n( __( 'M j, Y @ G:i', 'wp-carousel-free' ), strtotime( $post->post_date ) ) ),
|
109 |
+
10 => sprintf( __( 'Carousel draft updated.', 'wp-carousel-free' ) ),
|
110 |
+
);
|
111 |
+
return $messages;
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Add carousel admin columns.
|
116 |
+
*
|
117 |
+
* @return statement
|
118 |
+
*/
|
119 |
+
public function filter_carousel_admin_column() {
|
120 |
+
$admin_columns['cb'] = '<input type="checkbox" />';
|
121 |
+
$admin_columns['title'] = __( 'Carousel Title', 'wp-carousel-free' );
|
122 |
+
$admin_columns['shortcode'] = __( 'Shortcode', 'wp-carousel-free' );
|
123 |
+
$admin_columns['carousel_type'] = __( 'Carousel Type', 'wp-carousel-free' );
|
124 |
+
$admin_columns['date'] = __( 'Date', 'wp-carousel-free' );
|
125 |
+
|
126 |
+
return $admin_columns;
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Display admin columns for the carousels.
|
131 |
+
*
|
132 |
+
* @since 2.0.0
|
133 |
+
* @param mix $column The columns.
|
134 |
+
* @param string $post_id The post ID.
|
135 |
+
* @return void
|
136 |
+
*/
|
137 |
+
public function display_carousel_admin_fields( $column, $post_id ) {
|
138 |
+
$upload_data = get_post_meta( $post_id, 'sp_wpcp_upload_options', true );
|
139 |
+
$carousels_types = isset( $upload_data['wpcp_carousel_type'] ) ? $upload_data['wpcp_carousel_type'] : '';
|
140 |
+
switch ( $column ) {
|
141 |
+
case 'shortcode':
|
142 |
+
$column_field = '<input style="width: 270px; padding: 6px;" type="text" onClick="this.select();" readonly="readonly" value="[sp_wpcarousel id="' . $post_id . '"]"/>';
|
143 |
+
echo $column_field;
|
144 |
+
break;
|
145 |
+
case 'carousel_type':
|
146 |
+
echo ucwords( str_replace( '-', ' ', $carousels_types ) );
|
147 |
+
|
148 |
+
} // end switch.
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Add plugin action menu
|
153 |
+
*
|
154 |
+
* Fired by `plugin_action_links` filter.
|
155 |
+
*
|
156 |
+
* @param array $links The action link.
|
157 |
+
* @param string $plugin_file The file.
|
158 |
+
* @since 2.0.0
|
159 |
+
* @return array
|
160 |
+
*/
|
161 |
+
public function add_plugin_action_links( $links, $plugin_file ) {
|
162 |
+
|
163 |
+
if ( WPCAROUSELF_BASENAME === $plugin_file ) {
|
164 |
+
$ui_links = sprintf( '<a href="%s">%s</a>', admin_url( 'post-new.php?post_type=sp_wp_carousel' ), __( 'Create Carousel', 'wp-carousel-free' ) );
|
165 |
+
|
166 |
+
array_unshift( $links, $ui_links );
|
167 |
+
|
168 |
+
$links['go_pro'] = sprintf( '<a target="_blank" href="%1$s" style="color: #35b747; font-weight: 700;">Go Premium!</a>', 'https://shapedplugin.com/plugin/wordpress-carousel-pro' );
|
169 |
+
}
|
170 |
+
|
171 |
+
return $links;
|
172 |
+
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* Plugin row meta.
|
176 |
+
*
|
177 |
+
* Adds row meta links to the plugin list table
|
178 |
+
*
|
179 |
+
* Fired by `plugin_row_meta` filter.
|
180 |
+
*
|
181 |
+
* @since 2.0.0
|
182 |
+
* @access public
|
183 |
+
*
|
184 |
+
* @param array $plugin_meta An array of the plugin's metadata, including
|
185 |
+
* the version, author, author URI, and plugin URI.
|
186 |
+
* @param string $plugin_file Path to the plugin file, relative to the plugins
|
187 |
+
* directory.
|
188 |
+
*
|
189 |
+
* @return array An array of plugin row meta links.
|
190 |
+
*/
|
191 |
+
public function plugin_row_meta( $plugin_meta, $plugin_file ) {
|
192 |
+
if ( WPCAROUSELF_BASENAME === $plugin_file ) {
|
193 |
+
$row_meta = [
|
194 |
+
'docs' => '<a href="https://wordpresscarousel.com" aria-label="' . esc_attr( __( 'Live Demo', 'wp-carousel-free' ) ) . '" target="_blank">' . __( 'Live Demo', 'wp-carousel-free' ) . '</a>',
|
195 |
+
'ideo' => '<a href="https://shapedplugin.com/docs/docs/wordpress-carousel" aria-label="' . esc_attr( __( 'View WP Carousel Video Tutorials', 'wp-carousel-free' ) ) . '" target="_blank">' . __( 'Docs & Video Tutorials', 'wp-carousel-free' ) . '</a>',
|
196 |
+
];
|
197 |
+
|
198 |
+
$plugin_meta = array_merge( $plugin_meta, $row_meta );
|
199 |
+
}
|
200 |
+
|
201 |
+
return $plugin_meta;
|
202 |
+
}
|
203 |
+
|
204 |
+
/**
|
205 |
+
* Bottom review notice.
|
206 |
+
*
|
207 |
+
* @since 2.0.0
|
208 |
+
* @param string $text The review notice.
|
209 |
+
* @return string
|
210 |
+
*/
|
211 |
+
public function sp_wpcp_review_text( $text ) {
|
212 |
+
$screen = get_current_screen();
|
213 |
+
if ( 'sp_wp_carousel' === get_post_type() || 'sp_wp_carousel_page_wpcp_settings' === $screen->id || 'sp_wp_carousel_page_wpcp_help' === $screen->id ) {
|
214 |
+
$url = 'https://wordpress.org/support/plugin/wp-carousel-free/reviews/?filter=5#new-post';
|
215 |
+
$text = sprintf( __( 'If you like <strong>WordPress Carousel</strong>, please leave us a <a href="%s" target="_blank">★★★★★</a> rating. Your Review is very important to us as it helps us to grow more. ', 'wp-carousel-free' ), $url );
|
216 |
+
}
|
217 |
+
|
218 |
+
return $text;
|
219 |
+
}
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Redirect after activation.
|
223 |
+
*
|
224 |
+
* @param string $plugin_file Path to the plugin file, relative to the plugin.
|
225 |
+
* @return void
|
226 |
+
*/
|
227 |
+
public function sp_wpcf_redirect_after_activation( $plugin_file ) {
|
228 |
+
if ( WPCAROUSELF_BASENAME === $plugin_file ) {
|
229 |
+
exit( esc_url( wp_safe_redirect( admin_url( 'edit.php?post_type=sp_wp_carousel&page=wpcf_help' ) ) ) );
|
230 |
+
}
|
231 |
+
}
|
232 |
+
}
|
admin/css/wp-carousel-free-admin.css
ADDED
@@ -0,0 +1,234 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#adminmenu .menu-icon-sp_wp_carousel .wp-menu-image img {
|
2 |
+
width: 22px;
|
3 |
+
padding: 7px 0;
|
4 |
+
height: 20px;
|
5 |
+
}
|
6 |
+
|
7 |
+
.spwpcp-gallery-list li{
|
8 |
+
display: inline;
|
9 |
+
margin: 5px;
|
10 |
+
}
|
11 |
+
.js .tmce-active .wp-editor-area{color:#000000}
|
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;
|
21 |
+
background-size: 100px 100px;
|
22 |
+
box-shadow: none;
|
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;
|
41 |
+
margin: 40px 0;
|
42 |
+
padding-bottom: 56.25%;
|
43 |
+
width: 100%;
|
44 |
+
max-width: 100%;
|
45 |
+
height: 0;
|
46 |
+
text-align: center;
|
47 |
+
}
|
48 |
+
.sp-wpcf-upgrade .headline-feature.feature-video iframe,
|
49 |
+
.sp-wpcp-help .headline-feature.feature-video iframe{
|
50 |
+
position: absolute;
|
51 |
+
top: 0;
|
52 |
+
left: 0;
|
53 |
+
width: 100%;
|
54 |
+
height: 100%;
|
55 |
+
}
|
56 |
+
.sp-wpcp-help .feature-section .sp-wpcp-feature{
|
57 |
+
background-color: #fff;
|
58 |
+
padding: 20px 20px;
|
59 |
+
border: 1px solid #ddd;
|
60 |
+
}
|
61 |
+
.sp-wpcp-help .feature-section .sp-wpcp-feature h3{
|
62 |
+
font-size: 16px;
|
63 |
+
margin-top: 18px;
|
64 |
+
}
|
65 |
+
|
66 |
+
.sp-wpcp-help .feature-section i.sp-wpcp-font-icon{
|
67 |
+
font-size: 30px;
|
68 |
+
display: block;
|
69 |
+
color: #18AFB9;
|
70 |
+
font-family: fontawesome;
|
71 |
+
font-style: normal;
|
72 |
+
}
|
73 |
+
@media (max-width: 500px) {
|
74 |
+
.sp-wpcp-help .wp-badge {
|
75 |
+
background-position-x: center;
|
76 |
+
top: 0;
|
77 |
+
}
|
78 |
+
}
|
79 |
+
/**
|
80 |
+
Upgrade Page CSS
|
81 |
+
**/
|
82 |
+
.sp-wpc-text-center{
|
83 |
+
text-align: center;
|
84 |
+
}
|
85 |
+
.sp-wpcf-upgrade > h1 {
|
86 |
+
font-size: 2.5em;
|
87 |
+
color: #444;
|
88 |
+
font-weight: 300;
|
89 |
+
}
|
90 |
+
.sp-wpcf-upgrade > h1 span {
|
91 |
+
font-weight: 400;
|
92 |
+
}
|
93 |
+
.sp-wpcf-upgrade .about-text {
|
94 |
+
margin-bottom: 0;
|
95 |
+
}
|
96 |
+
.sp-wpcf-upgrade ul {
|
97 |
+
margin-top: 0;
|
98 |
+
}
|
99 |
+
.sp-wpcf-upgrade .wp-badge{
|
100 |
+
border: none;
|
101 |
+
background: url(../img/premium-logo.png) no-repeat;
|
102 |
+
background-size: 150px 150px;
|
103 |
+
box-shadow: none;
|
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;
|
110 |
+
border: 1px solid #ddd;
|
111 |
+
}
|
112 |
+
.sp-wpcf-upgrade .feature-section .sp-wpc-feature h3{
|
113 |
+
font-size: 16px;
|
114 |
+
margin-top: 18px;
|
115 |
+
}
|
116 |
+
|
117 |
+
.sp-wpcf-upgrade .feature-section i.fa{
|
118 |
+
font-size: 30px;
|
119 |
+
display: block;
|
120 |
+
color: #22afba;
|
121 |
+
}
|
122 |
+
.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section span.dashicons{
|
123 |
+
font-size: 22px;
|
124 |
+
color: #fff;
|
125 |
+
background-color: #22afba;
|
126 |
+
width: 28px;
|
127 |
+
height: 28px;
|
128 |
+
line-height: 28px;
|
129 |
+
border-radius: 50%;
|
130 |
+
margin-right: 10px;
|
131 |
+
}
|
132 |
+
.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section{
|
133 |
+
margin-bottom: 40px;
|
134 |
+
display: flex;
|
135 |
+
flex-wrap: wrap;
|
136 |
+
}
|
137 |
+
.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section .sp-wpc-feature h3{
|
138 |
+
margin-top:0;
|
139 |
+
}
|
140 |
+
.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section .sp-wpc-feature p{
|
141 |
+
margin-bottom:0;
|
142 |
+
}
|
143 |
+
.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section .sp-wpc-feature{
|
144 |
+
box-shadow: 0 0 10px 0 #dddddd;
|
145 |
+
margin: 4px;
|
146 |
+
border: 0 solid;
|
147 |
+
}
|
148 |
+
.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section.three-col .col{
|
149 |
+
min-width: 32%;
|
150 |
+
max-width: 32%;
|
151 |
+
margin-top: 20px;
|
152 |
+
display: flex;
|
153 |
+
align-self: auto;
|
154 |
+
}
|
155 |
+
.sp-wpcf-upgrade .sp-wpc-pro-features .sp-wpc-pro-subtitle{
|
156 |
+
font-size: 1.2em;
|
157 |
+
margin-bottom: 26px;
|
158 |
+
}
|
159 |
+
|
160 |
+
.sp-wpcf-upgrade .sp-wpc-upgrade-sticky-footer{
|
161 |
+
position: fixed;
|
162 |
+
bottom: 0;
|
163 |
+
background: #fff;
|
164 |
+
width: calc(100% - 195px);
|
165 |
+
z-index: 9;
|
166 |
+
margin-left: -25px;
|
167 |
+
text-align: center;
|
168 |
+
border: 1px solid #dfdfdf;
|
169 |
+
padding: 15px 0;
|
170 |
+
border-bottom: none;
|
171 |
+
}
|
172 |
+
.sp-wpcf-upgrade .sp-wpcp-promo-video-title,
|
173 |
+
.sp-wpcf-upgrade .sp-wpc-pro-features h2{
|
174 |
+
font-size: 2.2em;
|
175 |
+
font-weight: 400;
|
176 |
+
}
|
177 |
+
|
178 |
+
.sp-wpcp-join-community h2 {
|
179 |
+
font-size: 2em;
|
180 |
+
}
|
181 |
+
.sp-wpcf-upgrade .sp-wpc-upgrade-sticky-footer h3{
|
182 |
+
margin-top: 17px;
|
183 |
+
margin-bottom: 20px;
|
184 |
+
}
|
185 |
+
|
186 |
+
.sp-wpcf-upgrade .sp-wpc-upgrade-sticky-footer a.button{
|
187 |
+
margin: 0 8px;
|
188 |
+
}
|
189 |
+
|
190 |
+
.sp-wpcf-upgrade .wpcf-upgrade-btn {
|
191 |
+
display: inline-block;
|
192 |
+
padding: 0 20px 0 0;
|
193 |
+
}
|
194 |
+
.sp-wpcf-upgrade a.wpcf-upgrade-btn,
|
195 |
+
.sp-wpcf-upgrade .wpcf-upgrade-btn a {
|
196 |
+
text-decoration: none;
|
197 |
+
text-align: center;
|
198 |
+
font-size: 16px;
|
199 |
+
}
|
200 |
+
.sp-wpcf-upgrade .wpcf-upgrade-btn a:focus {
|
201 |
+
outline: 0;
|
202 |
+
}
|
203 |
+
.sp-wpcf-upgrade a.wpcf-upgrade-btn,
|
204 |
+
.sp-wpcf-upgrade ul li.wpcf-upgrade-btn:first-child a{
|
205 |
+
background: #7cc048;
|
206 |
+
padding: 0 15px;
|
207 |
+
line-height: 46px;
|
208 |
+
display: block;
|
209 |
+
color: #fff;
|
210 |
+
border-radius: 3px;
|
211 |
+
}
|
212 |
+
.sp-wpcf-upgrade ul li.wpcf-upgrade-btn:last-child a{
|
213 |
+
text-decoration: underline;
|
214 |
+
}
|
215 |
+
.sp-wpcf-upgrade ul li.wpcf-upgrade-btn a i{
|
216 |
+
margin-left: 4px;
|
217 |
+
}
|
218 |
+
.sp-wpcf-upgrade ul li.wpcf-upgrade-btn:last-child a i{
|
219 |
+
font-size: 14px;
|
220 |
+
}
|
221 |
+
.sp-wpcf-upgrade a.wpcf-upgrade-btn{
|
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 |
+
}
|
234 |
+
}
|
admin/img/premium-logo.png
ADDED
Binary file
|
admin/img/wpcp-icon-256.png
ADDED
Binary file
|
admin/img/wpcp-logo.png
ADDED
Binary file
|
admin/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden.
|
admin/js/icon32.png
ADDED
Binary file
|
admin/js/mce-button.js
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function() {
|
2 |
+
tinymce.PluginManager.add('sp_wpcp_mce_button', function( editor, url ) {
|
3 |
+
editor.addButton('sp_wpcp_mce_button', {
|
4 |
+
text: false,
|
5 |
+
icon: false,
|
6 |
+
image: url + '/icon32.png',
|
7 |
+
tooltip: 'WP Carousel',
|
8 |
+
onclick: function () {
|
9 |
+
editor.windowManager.open({
|
10 |
+
title: 'Insert Shortcode',
|
11 |
+
width: 400,
|
12 |
+
height: 100,
|
13 |
+
body: [
|
14 |
+
{
|
15 |
+
type: 'listbox',
|
16 |
+
name: 'listboxName',
|
17 |
+
label: 'Select Carousel',
|
18 |
+
'values': editor.settings.spWPCPCarouselList
|
19 |
+
}
|
20 |
+
],
|
21 |
+
onsubmit: function( e ) {
|
22 |
+
editor.insertContent( '[sp_wpcarousel id="' + e.data.listboxName + '"]');
|
23 |
+
}
|
24 |
+
});
|
25 |
+
}
|
26 |
+
});
|
27 |
+
});
|
28 |
+
})();
|
admin/views/help.php
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The help page for the WP Carousel
|
4 |
+
*
|
5 |
+
* @package WP Carousel
|
6 |
+
* @subpackage wp-carousel-free/admin
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
} // if direct access.
|
12 |
+
|
13 |
+
/**
|
14 |
+
* The help class for the WP Carousel
|
15 |
+
*/
|
16 |
+
class WP_Carousel_Free_Help {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Wp Carousel Pro single instance of the class
|
20 |
+
*
|
21 |
+
* @var null
|
22 |
+
* @since 2.0.0
|
23 |
+
*/
|
24 |
+
protected static $_instance = null;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Main WP_Carousel_Free_Help Instance
|
28 |
+
*
|
29 |
+
* @since 2.0.0
|
30 |
+
* @static
|
31 |
+
* @see sp_wpcp_help()
|
32 |
+
* @return self Main instance
|
33 |
+
*/
|
34 |
+
public static function instance() {
|
35 |
+
if ( is_null( self::$_instance ) ) {
|
36 |
+
self::$_instance = new self();
|
37 |
+
}
|
38 |
+
|
39 |
+
return self::$_instance;
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Add admin menu.
|
44 |
+
*
|
45 |
+
* @since 2.0.0
|
46 |
+
* @return void
|
47 |
+
*/
|
48 |
+
public function help_admin_menu() {
|
49 |
+
add_submenu_page(
|
50 |
+
'edit.php?post_type=sp_wp_carousel', __( 'WP Carousel Help', 'wp-carousel-free' ), __( 'Help', 'wp-carousel-free' ), 'manage_options', 'wpcf_help', array(
|
51 |
+
$this,
|
52 |
+
'help_page_callback',
|
53 |
+
)
|
54 |
+
);
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* The WP Carousel Help Callback.
|
59 |
+
*
|
60 |
+
* @since 2.0.0
|
61 |
+
* @return void
|
62 |
+
*/
|
63 |
+
public function help_page_callback() {
|
64 |
+
echo '
|
65 |
+
<div class="wrap about-wrap sp-wpcp-help">
|
66 |
+
<h1>' . esc_html__( 'Welcome to WordPress Carousel! ', 'wp-carousel-free' ) . '</h1>
|
67 |
+
</div>
|
68 |
+
<div class="wrap about-wrap sp-wpcp-help">
|
69 |
+
<p class="about-text">' . esc_html__( 'Thank you for installing WordPress Carousel! You\'re now running the most popular WordPress Carousel plugin.
|
70 |
+
This video will help you get started with the plugin.', 'wp-carousel-free' ) . '</p>
|
71 |
+
<div class="wp-badge"></div>
|
72 |
+
|
73 |
+
<hr>
|
74 |
+
|
75 |
+
<div class="headline-feature feature-video">
|
76 |
+
<iframe width="560" height="315" src="https://www.youtube.com/embed/hCeKn8jmxn4" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
77 |
+
</div>
|
78 |
+
|
79 |
+
<hr>
|
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>
|
87 |
+
<a href="https://shapedplugin.com/support-forum/" target="_blank" class="button button-primary">' . esc_html__( 'Contact Support', 'wp-carousel-free' ) . '</a>
|
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>
|
95 |
+
<a href="https://shapedplugin.com/docs/docs/wordpress-carousel/" target="_blank" class="button button-primary">' . esc_html__( 'Documentation', 'wp-carousel-free' ) . '</a>
|
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>
|
103 |
+
<a href="https://wordpress.org/support/plugin/wp-carousel-free/reviews/?filter=5#new-post" target="_blank" class="button button-primary">' . esc_html__( 'Rate The Plugin', 'wp-carousel-free' ) . '</a>
|
104 |
+
</div>
|
105 |
+
</div>
|
106 |
+
</div>
|
107 |
+
</div>';
|
108 |
+
}
|
109 |
+
}
|
admin/views/meta-box/assets/css/sp-custom.css
ADDED
@@ -0,0 +1,800 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,220 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,1850 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
Binary file
|
admin/views/meta-box/assets/js/dependency.js
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,645 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,2405 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"<": "<",
|
94 |
+
">": ">",
|
95 |
+
'"': """,
|
96 |
+
"'": "'",
|
97 |
+
"`": "`"
|
98 |
+
};
|
99 |
+
unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
|
100 |
+
return text.replace(unsafe_chars, function(chr) {
|
101 |
+
return map[chr] || "&";
|
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
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
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={"<":"<",">":">",'"':""","'":"'","`":"`"},c=/&(?!\w+;)|[\<\>\"\'\`]/g,a.replace(c,function(a){return b[a]||"&"})):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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,484 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,296 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
<?php echo do_shortcode( '[sp_wpcarousel id="<?php echo $post->ID; ?>"]' );
|
189 |
+
?></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
ADDED
@@ -0,0 +1,522 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,727 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"kind": "webfonts#webfontList",
|
3 |
+
"items": [
|
4 |
+
|
5 |
+
]
|
6 |
+
}
|
admin/views/meta-box/fields/typography_advanced/typography_advanced.php
ADDED
@@ -0,0 +1,197 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The actions of the sp framework.
|
4 |
+
*
|
5 |
+
* @package SP Framework.
|
6 |
+
*/
|
admin/views/meta-box/functions/enqueue.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,259 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden.
|
admin/views/meta-box/sp-framework-path.php
ADDED
@@ -0,0 +1,381 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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/premium.php
ADDED
@@ -0,0 +1,274 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The help page for the WP Carousel
|
4 |
+
*
|
5 |
+
* @package WP Carousel
|
6 |
+
* @subpackage wp-carousel-free/admin
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
} // if direct access.
|
12 |
+
|
13 |
+
/**
|
14 |
+
* The help class for the WP Carousel
|
15 |
+
*/
|
16 |
+
class WP_Carousel_Free_Upgrade {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Wp Carousel Pro single instance of the class
|
20 |
+
*
|
21 |
+
* @var null
|
22 |
+
* @since 2.0.0
|
23 |
+
*/
|
24 |
+
protected static $_instance = null;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Main WP_Carousel_Free_Help Instance
|
28 |
+
*
|
29 |
+
* @since 2.0.0
|
30 |
+
* @static
|
31 |
+
* @see sp_wpcp_help()
|
32 |
+
* @return self Main instance
|
33 |
+
*/
|
34 |
+
public static function instance() {
|
35 |
+
if ( is_null( self::$_instance ) ) {
|
36 |
+
self::$_instance = new self();
|
37 |
+
}
|
38 |
+
|
39 |
+
return self::$_instance;
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Add admin menu.
|
44 |
+
*
|
45 |
+
* @since 2.0.0
|
46 |
+
* @return void
|
47 |
+
*/
|
48 |
+
public function upgrade_admin_menu() {
|
49 |
+
add_submenu_page(
|
50 |
+
'edit.php?post_type=sp_wp_carousel', __( 'Premium', 'wp-carousel-free' ), __( 'Premium', 'wp-carousel-free' ), 'manage_options', 'wpcf_upgrade', array(
|
51 |
+
$this,
|
52 |
+
'upgrade_page_callback',
|
53 |
+
)
|
54 |
+
);
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* The WP Carousel Upgrade Callback.
|
59 |
+
*
|
60 |
+
* @since 2.0.0
|
61 |
+
* @return void
|
62 |
+
*/
|
63 |
+
public function upgrade_page_callback() {
|
64 |
+
?> <div class="wrap about-wrap sp-wpcf-upgrade">
|
65 |
+
<h1><?php _e( 'Upgrade to <span>WordPress Carousel Pro</span>', 'wp-carousel-free' ); ?></h1>
|
66 |
+
<p class="about-text">
|
67 |
+
<?php
|
68 |
+
esc_html_e(
|
69 |
+
'Get more Advanced Functionality & Flexibility with the Premium version.', 'wp-carousel-free'
|
70 |
+
);
|
71 |
+
?>
|
72 |
+
</p>
|
73 |
+
<div class="wp-badge"></div>
|
74 |
+
<ul>
|
75 |
+
<li class="wpcf-upgrade-btn"><a href="https://shapedplugin.com/plugin/wordpress-carousel-pro/" target="_blank">Buy WP Carousel Pro <i class="fa fa-caret-right"></i></a></li>
|
76 |
+
<li class="wpcf-upgrade-btn"><a href="https://wordpresscarousel.com" target="_blank">Live Demo & All Features <i class="fa fa-angle-double-right"></i></a></li>
|
77 |
+
</ul>
|
78 |
+
|
79 |
+
<hr>
|
80 |
+
|
81 |
+
<div class="sp-wpc-pro-features">
|
82 |
+
<h2 class="sp-wpc-text-center">Premium Features Built for Future</h2>
|
83 |
+
<p class="sp-wpc-text-center sp-wpc-pro-subtitle">We've added 100+ extra features in our Premium Version of this plugin. Let’s see some amazing features.</p>
|
84 |
+
<div class="feature-section three-col">
|
85 |
+
<div class="col">
|
86 |
+
<div class="sp-wpc-feature">
|
87 |
+
<h3><span class="dashicons dashicons-yes"></span>Responsive & SEO Friendly</h3>
|
88 |
+
<p>Design carousels for desktop, tablet & mobile. Your carousels will adjust for any device. WordPress Carousel Pro follows the best SEO practices & performs speedily on all sites.</p>
|
89 |
+
</div>
|
90 |
+
</div>
|
91 |
+
<div class="col">
|
92 |
+
<div class="sp-wpc-feature">
|
93 |
+
<h3><span class="dashicons dashicons-yes"></span>Slide Anything</h3>
|
94 |
+
<p>WordPress Carousel Pro allows you to create a carousel slider where the content for each slide can be anything you want – image, post, product, content, video, text, HTML, Shortcodes etc.</p>
|
95 |
+
</div>
|
96 |
+
</div>
|
97 |
+
<div class="col">
|
98 |
+
<div class="sp-wpc-feature">
|
99 |
+
<h3><span class="dashicons dashicons-yes"></span>Compatible with any Theme</h3>
|
100 |
+
<p>Guaranteed to work with your any WordPress site including Genesis, Divi, WooThemes, ThemeForest or any theme, in any WordPress single site and multisite network.</p>
|
101 |
+
</div>
|
102 |
+
</div>
|
103 |
+
<div class="col">
|
104 |
+
<div class="sp-wpc-feature">
|
105 |
+
<h3><span class="dashicons dashicons-yes"></span>Advanced Shortcode Generator</h3>
|
106 |
+
<p>WordPress Carousel Pro comes with a built-in easy to use Shortcode Generator that helps you save, edit, copy and paste shortcode where you want!</p>
|
107 |
+
</div>
|
108 |
+
</div>
|
109 |
+
<div class="col">
|
110 |
+
<div class="sp-wpc-feature">
|
111 |
+
<h3><span class="dashicons dashicons-yes"></span>No Coding Required</h3>
|
112 |
+
<p>The plugin is built with unlimited stunning styling options like color, font family, size, alignment etc. to stylize your own way without any limitation. No Coding Skills Needed!</p>
|
113 |
+
</div>
|
114 |
+
</div>
|
115 |
+
<div class="col">
|
116 |
+
<div class="sp-wpc-feature">
|
117 |
+
<h3><span class="dashicons dashicons-yes"></span>840+ Google Fonts</h3>
|
118 |
+
<p>WordPress Carousel Pro supports the list of Google font family with a huge collection of 840+ fonts. Customize the font family, size, transform, spacing, color, line-height etc.</p>
|
119 |
+
</div>
|
120 |
+
</div>
|
121 |
+
<div class="col">
|
122 |
+
<div class="sp-wpc-feature">
|
123 |
+
<h3><span class="dashicons dashicons-yes"></span>Image Carousel</h3>
|
124 |
+
<p>WordPress Carousel Pro allows you to create beautiful image carousels for your site in minutes! Upload images via WordPress regular gallery, create a gallery to make carousel.</p>
|
125 |
+
</div>
|
126 |
+
</div>
|
127 |
+
<div class="col">
|
128 |
+
<div class="sp-wpc-feature">
|
129 |
+
<h3><span class="dashicons dashicons-yes"></span>Post Carousel</h3>
|
130 |
+
<p>Display posts from multiple Categories, Tags, Formats, or Types: Latest, Taxonomies, Specific etc. Show the post contents: title, image, excerpt, read more, category, date, author, tags, comments etc.</p>
|
131 |
+
</div>
|
132 |
+
</div>
|
133 |
+
<div class="col">
|
134 |
+
<div class="sp-wpc-feature">
|
135 |
+
<h3><span class="dashicons dashicons-yes"></span>WooCommerce Product Carousel</h3>
|
136 |
+
<p>Filter by different product types. (e.g. latest, categories, specific products etc.). Show/hide the product name, image, price, excerpt, read more, rating, add to cart button etc.</p>
|
137 |
+
</div>
|
138 |
+
</div>
|
139 |
+
<div class="col">
|
140 |
+
<div class="sp-wpc-feature">
|
141 |
+
<h3><span class="dashicons dashicons-yes"></span>Content Carousel</h3>
|
142 |
+
<p>Slide anything you want based on your WordPress site. (e.g. images, text, HTML, shortcodes, any custom contents etc.) You can sort slide content by drag and drop easily.</p>
|
143 |
+
</div>
|
144 |
+
</div>
|
145 |
+
<div class="col">
|
146 |
+
<div class="sp-wpc-feature">
|
147 |
+
<h3><span class="dashicons dashicons-yes"></span>Video Carousel</h3>
|
148 |
+
<p>Show videos from multiple sources: YouTube, Vimeo, Dailymotion, mp4, WebM, and even self-hosted video with Lightbox. A customizable video icon will place over the video thumb.</p>
|
149 |
+
</div>
|
150 |
+
</div>
|
151 |
+
<div class="col">
|
152 |
+
<div class="sp-wpc-feature">
|
153 |
+
<h3><span class="dashicons dashicons-yes"></span>Drag & Drop Builder</h3>
|
154 |
+
<p>Drag & Drop carousel content ordering is one of the amazing features of WordPress Carousel Pro. You can order your content easily from WordPress default gallery settings.</p>
|
155 |
+
</div>
|
156 |
+
</div>
|
157 |
+
<div class="col">
|
158 |
+
<div class="sp-wpc-feature">
|
159 |
+
<h3><span class="dashicons dashicons-yes"></span>Image Internal & External Links</h3>
|
160 |
+
<p>You can link to each carousel image easily. You can add a link to each carousel in WordPress gallery settings. You can set URLs to them, they can open in the same or new tab.</p>
|
161 |
+
</div>
|
162 |
+
</div>
|
163 |
+
<div class="col">
|
164 |
+
<div class="sp-wpc-feature">
|
165 |
+
<h3><span class="dashicons dashicons-yes"></span>Lightbox Functionality for Image</h3>
|
166 |
+
<p>Lightbox is one of the impressive premium features of WordPress Carousel Pro. You can also make lightbox image group. To have the images in lightbox, just turn on the lightbox.</p>
|
167 |
+
</div>
|
168 |
+
</div>
|
169 |
+
<div class="col">
|
170 |
+
<div class="sp-wpc-feature">
|
171 |
+
<h3><span class="dashicons dashicons-yes"></span>One Page Carousel Slider</h3>
|
172 |
+
<p>You are able to build one column carousel slider. You can add slider caption & description to the respective images. You can change slider colors with your desired color!</p>
|
173 |
+
</div>
|
174 |
+
</div>
|
175 |
+
<div class="col">
|
176 |
+
<div class="sp-wpc-feature">
|
177 |
+
<h3><span class="dashicons dashicons-yes"></span>Carousel Settings</h3>
|
178 |
+
<p>Carousel controls e.g. 6 Navigation arrows & 9 Positions, Pagination dots, AutoPlay & speed, Stop on hover, looping, Touch Swipe, scroll, key navigation, Mouse Draggable etc.</p>
|
179 |
+
</div>
|
180 |
+
</div>
|
181 |
+
<div class="col">
|
182 |
+
<div class="sp-wpc-feature">
|
183 |
+
<h3><span class="dashicons dashicons-yes"></span>Carousel Mode</h3>
|
184 |
+
<p>WordPress Carousel Pro has two carousel mode: Standard and Ticker (Smooth looping, with no pause). You can change the carousel mode based on your choice or demand.</p>
|
185 |
+
</div>
|
186 |
+
</div>
|
187 |
+
<div class="col">
|
188 |
+
<div class="sp-wpc-feature">
|
189 |
+
<h3><span class="dashicons dashicons-yes"></span>Sliding and Hover Effects</h3>
|
190 |
+
<p>You can set hover and sliding effects for images like, gray-scale, overlay opacity, fade in or out etc. that are both edgy and appealing. Try them all. Use the one you like best.</p>
|
191 |
+
</div>
|
192 |
+
</div>
|
193 |
+
<div class="col">
|
194 |
+
<div class="sp-wpc-feature">
|
195 |
+
<h3><span class="dashicons dashicons-yes"></span>Custom Image Re-sizing</h3>
|
196 |
+
<p>You’ll find in the image settings all cropping sizes available. You can change the default size of your images in the settings. The width is dynamic with fixed height through CSS.</p>
|
197 |
+
</div>
|
198 |
+
</div>
|
199 |
+
<div class="col">
|
200 |
+
<div class="sp-wpc-feature">
|
201 |
+
<h3><span class="dashicons dashicons-yes"></span>Fully Internationalized</h3>
|
202 |
+
<p>WordPress Carousel Pro is fully multilingual ready with WPML, Polylang, qTranslate-x, GTranslate, Google Language Translator, WPGlobus etc. popular translation plugins.</p>
|
203 |
+
</div>
|
204 |
+
</div>
|
205 |
+
<div class="col">
|
206 |
+
<div class="sp-wpc-feature">
|
207 |
+
<h3><span class="dashicons dashicons-yes"></span>Multi-site Supported</h3>
|
208 |
+
<p>One of the important features of WordPress Carousel Pro is Multi-site ready. The Premium version works great in the multi-site network. You’ll find details here.</p>
|
209 |
+
</div>
|
210 |
+
</div>
|
211 |
+
<div class="col">
|
212 |
+
<div class="sp-wpc-feature">
|
213 |
+
<h3><span class="dashicons dashicons-yes"></span>Widget Ready</h3>
|
214 |
+
<p>To include logo carousel or grid inside a widget area is as simple as including any other widget! The plugin is widget ready. Create a shortcode first and use it simply in the widget.</p>
|
215 |
+
</div>
|
216 |
+
</div>
|
217 |
+
<div class="col">
|
218 |
+
<div class="sp-wpc-feature">
|
219 |
+
<h3><span class="dashicons dashicons-yes"></span>Advanced Settings</h3>
|
220 |
+
<p>The plugin is completely customizable and also added a custom CSS field option to override styles. You can also enqueue or dequeue scripts/CSS to avoid conflicts and loading issue.</p>
|
221 |
+
</div>
|
222 |
+
</div>
|
223 |
+
<div class="col">
|
224 |
+
<div class="sp-wpc-feature">
|
225 |
+
<h3><span class="dashicons dashicons-yes"></span>Right to Left Support</h3>
|
226 |
+
<p>WordPress Carousel Pro is Right-to-Left supported. For Arabic, Hebrew, Persian, etc. languages, you can select the right-to-left option for carousel direction, without writing any CSS.</p>
|
227 |
+
</div>
|
228 |
+
</div>
|
229 |
+
<div class="col">
|
230 |
+
<div class="sp-wpc-feature">
|
231 |
+
<h3><span class="dashicons dashicons-yes"></span>Lifetime Auto Update & Support</h3>
|
232 |
+
<p>WordPress Carousel Pro is integrated with automatic updates which allows you to update the plugin through the WordPress dashboard without downloading them manually.</p>
|
233 |
+
</div>
|
234 |
+
</div>
|
235 |
+
<div class="col">
|
236 |
+
<div class="sp-wpc-feature">
|
237 |
+
<h3><span class="dashicons dashicons-yes"></span>Fast and Friendly Support</h3>
|
238 |
+
<p>If you need any assistance, we’re here to help you with the instant support forum. A professional support team is always ready whenever you face with any issues to use the plugin.</p>
|
239 |
+
</div>
|
240 |
+
</div>
|
241 |
+
<div class="col">
|
242 |
+
<div class="sp-wpc-feature">
|
243 |
+
<h3><span class="dashicons dashicons-yes"></span>Page Builders Compatibility</h3>
|
244 |
+
<p>WordPress Carousel Pro works nicely with the popular Page Builders plugins: Gutenberg, WPBakery, Elementor, Divi builder, BeaverBuilder, SiteOrgin, Themify Builder etc.</p>
|
245 |
+
</div>
|
246 |
+
</div>
|
247 |
+
|
248 |
+
</div>
|
249 |
+
</div>
|
250 |
+
<hr>
|
251 |
+
<h2 class="text-center sp-wpcp-promo-video-title">Watch How <b>WordPress Carousel Pro</b> Works</h2>
|
252 |
+
<div class="headline-feature feature-video">
|
253 |
+
|
254 |
+
<iframe width="1050" height="590" src="https://www.youtube.com/embed/XMYYgFD7ZIA" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
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>
|
262 |
+
<br>
|
263 |
+
<br>
|
264 |
+
|
265 |
+
<hr>
|
266 |
+
<div class="sp-wpc-upgrade-sticky-footer sp-wpc-text-center">
|
267 |
+
<p><a href="https://wordpresscarousel.com" target="_blank" class="button
|
268 |
+
button-primary">Live Demo</a> <a href="https://shapedplugin.com/plugin/wordpress-carousel-pro/" target="_blank" class="button button-primary">Upgrade Now</a></p>
|
269 |
+
</div>
|
270 |
+
|
271 |
+
</div>
|
272 |
+
<?php }
|
273 |
+
|
274 |
+
}
|
admin/views/tmce-button.php
ADDED
@@ -0,0 +1,181 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Make sure we don't expose any info if called directly
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
if ( ! class_exists( 'SP_WPCP_MCE_Carousel_List' ) ) {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* The Tiny MCE button class.
|
11 |
+
*/
|
12 |
+
class SP_WPCP_MCE_Carousel_List {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Instance of the class.
|
16 |
+
*
|
17 |
+
* @var $instance
|
18 |
+
*/
|
19 |
+
private static $instance;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Initiator
|
23 |
+
*
|
24 |
+
* @since 2.0.0
|
25 |
+
*/
|
26 |
+
public static function init() {
|
27 |
+
return self::$instance;
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Constructor
|
32 |
+
*
|
33 |
+
* @since 2.0.0
|
34 |
+
*/
|
35 |
+
public function __construct() {
|
36 |
+
add_action( 'wp_ajax_wpcp_cpt_list', array( $this, 'wpcp_carousel_list_ajax' ) );
|
37 |
+
add_action( 'admin_footer', array( $this, 'wpcp_cpt_list' ) );
|
38 |
+
add_action( 'admin_head', array( $this, 'wpcp_mce_button' ) );
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Hooks your functions into the correct filters
|
43 |
+
*
|
44 |
+
* @since 2.0.0
|
45 |
+
* @return void
|
46 |
+
*/
|
47 |
+
public function wpcp_mce_button() {
|
48 |
+
// check user permissions.
|
49 |
+
if ( ! current_user_can( 'edit_posts' ) && ! current_user_can( 'edit_pages' ) ) {
|
50 |
+
return;
|
51 |
+
}
|
52 |
+
// check if WYSIWYG is enabled.
|
53 |
+
if ( 'true' == get_user_option( 'rich_editing' ) ) {
|
54 |
+
add_filter( 'mce_external_plugins', array( $this, 'add_mce_plugin' ) );
|
55 |
+
add_filter( 'mce_buttons', array( $this, 'register_mce_button' ) );
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Script for our mce button.
|
61 |
+
*
|
62 |
+
* @since 2.0.0
|
63 |
+
* @param string $plugin_array The button.
|
64 |
+
* @return string
|
65 |
+
*/
|
66 |
+
public function add_mce_plugin( $plugin_array ) {
|
67 |
+
$plugin_array['sp_wpcp_mce_button'] = WPCAROUSELF_URL . 'admin/js/mce-button.js';
|
68 |
+
return $plugin_array;
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Register our button in the editor.
|
73 |
+
*
|
74 |
+
* @since 2.0.0
|
75 |
+
* @param string $buttons The Tiny mce button.
|
76 |
+
* @return statement
|
77 |
+
*/
|
78 |
+
public function register_mce_button( $buttons ) {
|
79 |
+
array_push( $buttons, 'sp_wpcp_mce_button' );
|
80 |
+
return $buttons;
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Function to fetch cpt posts list
|
85 |
+
*
|
86 |
+
* @since 2.0.0
|
87 |
+
* @param string $post_type List of the post type.
|
88 |
+
* @return void
|
89 |
+
*/
|
90 |
+
public function posts( $post_type ) {
|
91 |
+
|
92 |
+
global $wpdb;
|
93 |
+
$cpt_type = $post_type;
|
94 |
+
$cpt_post_status = 'publish';
|
95 |
+
$cpt = $wpdb->get_results(
|
96 |
+
$wpdb->prepare(
|
97 |
+
"SELECT ID, post_title
|
98 |
+
FROM $wpdb->posts
|
99 |
+
WHERE $wpdb->posts.post_type = %s
|
100 |
+
AND $wpdb->posts.post_status = %s
|
101 |
+
ORDER BY ID DESC",
|
102 |
+
$cpt_type,
|
103 |
+
$cpt_post_status
|
104 |
+
)
|
105 |
+
);
|
106 |
+
|
107 |
+
$list = array();
|
108 |
+
|
109 |
+
foreach ( $cpt as $post ) {
|
110 |
+
$selected = '';
|
111 |
+
$post_id = $post->ID;
|
112 |
+
$post_name = $post->post_title;
|
113 |
+
$list[] = array(
|
114 |
+
'text' => $post_name,
|
115 |
+
'value' => $post_id,
|
116 |
+
);
|
117 |
+
}
|
118 |
+
|
119 |
+
wp_send_json( $list );
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Function to fetch buttons
|
124 |
+
*
|
125 |
+
* @since 2.0.0
|
126 |
+
* @return string
|
127 |
+
*/
|
128 |
+
public function wpcp_carousel_list_ajax() {
|
129 |
+
// check for nonce.
|
130 |
+
check_ajax_referer( 'sp-wpcp-mce-nonce', 'security' );
|
131 |
+
$posts = $this->posts( 'sp_wp_carousel' ); // change 'post' if you need posts list.
|
132 |
+
return $posts;
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Function to output button list ajax script
|
137 |
+
*
|
138 |
+
* @since 2.0.0
|
139 |
+
* @return void
|
140 |
+
*/
|
141 |
+
public function wpcp_cpt_list() {
|
142 |
+
// create nonce.
|
143 |
+
global $current_screen;
|
144 |
+
$current_screen->post_type;
|
145 |
+
if ( 'post' || 'page' === $current_screen ) {
|
146 |
+
$nonce = wp_create_nonce( 'sp-wpcp-mce-nonce' );
|
147 |
+
?>
|
148 |
+
<script type="text/javascript">
|
149 |
+
jQuery( document ).ready( function( $ ) {
|
150 |
+
var data = {
|
151 |
+
'action' : 'wpcp_cpt_list', // wp ajax action.
|
152 |
+
'security' : '<?php echo $nonce; ?>' // nonce value created earlier.
|
153 |
+
};
|
154 |
+
// fire ajax.
|
155 |
+
jQuery.post( ajaxurl, data, function( response ) {
|
156 |
+
// if nonce fails then not authorized else settings saved.
|
157 |
+
if( response === '-1' ){
|
158 |
+
// do nothing.
|
159 |
+
console.log('error');
|
160 |
+
} else {
|
161 |
+
if (typeof(tinyMCE) != 'undefined') {
|
162 |
+
if (tinyMCE.activeEditor != null) {
|
163 |
+
tinyMCE.activeEditor.settings.spWPCPCarouselList = response;
|
164 |
+
}
|
165 |
+
}
|
166 |
+
}
|
167 |
+
});
|
168 |
+
});
|
169 |
+
</script>
|
170 |
+
<?php
|
171 |
+
}
|
172 |
+
}
|
173 |
+
|
174 |
+
} // Mce Class
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Kicking this off
|
179 |
+
*/
|
180 |
+
$sp_wpcp_mce_btn = new SP_WPCP_MCE_Carousel_List();
|
181 |
+
$sp_wpcp_mce_btn->init();
|
assets/css/admin.css
DELETED
@@ -1,115 +0,0 @@
|
|
1 |
-
/* Help Page */
|
2 |
-
.sp-wpc-text-center{
|
3 |
-
text-align: center;
|
4 |
-
}
|
5 |
-
|
6 |
-
div.sp-wpc-help .headline-feature.feature-video iframe{
|
7 |
-
position: absolute;
|
8 |
-
top: 0;
|
9 |
-
left: 0;
|
10 |
-
width: 100%;
|
11 |
-
height: 100%;
|
12 |
-
}
|
13 |
-
div.sp-wpc-help .feature-section .sp-wpc-feature{
|
14 |
-
background-color: #fff;
|
15 |
-
padding: 20px 20px;
|
16 |
-
border: 1px solid #ddd;
|
17 |
-
}
|
18 |
-
div.sp-wpc-help .feature-section .sp-wpc-feature h3{
|
19 |
-
font-size: 16px;
|
20 |
-
margin-top: 18px;
|
21 |
-
}
|
22 |
-
|
23 |
-
div.sp-wpc-help .feature-section i.fa{
|
24 |
-
font-size: 30px;
|
25 |
-
display: block;
|
26 |
-
color: #22afba;
|
27 |
-
}
|
28 |
-
div.sp-wpc-help .sp-wpc-pro-features .feature-section span.dashicons{
|
29 |
-
font-size: 22px;
|
30 |
-
color: #fff;
|
31 |
-
background-color: #22afba;
|
32 |
-
width: 28px;
|
33 |
-
height: 28px;
|
34 |
-
line-height: 28px;
|
35 |
-
border-radius: 50%;
|
36 |
-
margin-right: 10px;
|
37 |
-
}
|
38 |
-
div.sp-wpc-help .sp-wpc-pro-features .feature-section{
|
39 |
-
margin-bottom: 40px;
|
40 |
-
}
|
41 |
-
div.sp-wpc-help .sp-wpc-pro-features .feature-section .sp-wpc-feature h3{
|
42 |
-
margin-top:0;
|
43 |
-
}
|
44 |
-
div.sp-wpc-help .sp-wpc-pro-features .feature-section .sp-wpc-feature p{
|
45 |
-
margin-bottom:0;
|
46 |
-
}
|
47 |
-
div.sp-wpc-help .sp-wpc-pro-features .feature-section .sp-wpc-feature{
|
48 |
-
box-shadow: 0 0 10px 0 #dddddd;
|
49 |
-
margin: 4px;
|
50 |
-
border: 0 solid;
|
51 |
-
}
|
52 |
-
div.sp-wpc-help .sp-wpc-pro-features .feature-section.three-col .col{
|
53 |
-
min-width: 32%;
|
54 |
-
max-width: 32%;
|
55 |
-
margin-top: 20px;
|
56 |
-
}
|
57 |
-
div.sp-wpc-help .sp-wpc-pro-features .sp-wpc-pro-subtitle{
|
58 |
-
font-size: 1.2em;
|
59 |
-
margin-bottom: 26px;
|
60 |
-
}
|
61 |
-
|
62 |
-
div.sp-wpc-help .sp-wpc-upgrade-sticky-footer{
|
63 |
-
position: fixed;
|
64 |
-
bottom: 0;
|
65 |
-
background: #fff;
|
66 |
-
width: calc(100% - 195px);
|
67 |
-
z-index: 9;
|
68 |
-
margin-left: -25px;
|
69 |
-
text-align: center;
|
70 |
-
border: 1px solid #dfdfdf;
|
71 |
-
padding: 15px 0;
|
72 |
-
border-bottom: none;
|
73 |
-
}
|
74 |
-
div.sp-wpc-help .sp-wpc-pro-features h2{
|
75 |
-
font-size: 2.5em;
|
76 |
-
font-weight: 400;
|
77 |
-
}
|
78 |
-
div.sp-wpc-help .sp-wpc-upgrade-sticky-footer h3{
|
79 |
-
margin-top: 17px;
|
80 |
-
margin-bottom: 20px;
|
81 |
-
}
|
82 |
-
|
83 |
-
div.sp-wpc-help .sp-wpc-upgrade-sticky-footer a.button{
|
84 |
-
margin: 0 8px;
|
85 |
-
}
|
86 |
-
|
87 |
-
/* ShortCode Table */
|
88 |
-
div.sp-wpc-help .table-bordered {
|
89 |
-
border: 1px solid #ddd;
|
90 |
-
width: 100%;
|
91 |
-
}
|
92 |
-
div.sp-wpc-help .table-bordered>tbody>tr>td{
|
93 |
-
border: 1px solid #ddd;
|
94 |
-
padding: 3px 10px;
|
95 |
-
background-color: #ffffff;
|
96 |
-
font-size: 13px;
|
97 |
-
}
|
98 |
-
div.sp-wpc-help .table-bordered>thead>tr>th{
|
99 |
-
border: 1px solid #ddd;
|
100 |
-
background: #f1f9fa;
|
101 |
-
padding: 3px 8px;
|
102 |
-
font-size: 13px;
|
103 |
-
}
|
104 |
-
|
105 |
-
/* Responsive CSS */
|
106 |
-
@media (max-width: 960px) {
|
107 |
-
div.sp-wpc-help .sp-wpc-upgrade-sticky-footer {
|
108 |
-
width: calc(100%);
|
109 |
-
}
|
110 |
-
}
|
111 |
-
@media (max-width: 500px) {
|
112 |
-
div.sp-wpc-help .wp-badge {
|
113 |
-
background-position-x: center;
|
114 |
-
}
|
115 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/style.css
DELETED
@@ -1,90 +0,0 @@
|
|
1 |
-
div.wordpress-carousel-free-section {
|
2 |
-
display: none;
|
3 |
-
}
|
4 |
-
|
5 |
-
div.wordpress-carousel-free-section.slick-initialized {
|
6 |
-
display: block;
|
7 |
-
}
|
8 |
-
|
9 |
-
div.wordpress-carousel-free-section .single_wcf_item:focus {
|
10 |
-
outline: none;
|
11 |
-
}
|
12 |
-
|
13 |
-
div.wordpress-carousel-free-section .single_wcf_item {
|
14 |
-
margin: 0 10px;
|
15 |
-
display: inline-block;
|
16 |
-
vertical-align: middle;
|
17 |
-
float: none;
|
18 |
-
}
|
19 |
-
|
20 |
-
div.wordpress-carousel-free-section .single_wcf_item img {
|
21 |
-
margin: 0 auto;
|
22 |
-
display: block;
|
23 |
-
max-width: 100%;
|
24 |
-
}
|
25 |
-
|
26 |
-
div.wordpress-carousel-free-section .slick-prev {
|
27 |
-
left: 0;
|
28 |
-
text-align: left;
|
29 |
-
}
|
30 |
-
|
31 |
-
div.wordpress-carousel-free-section .slick-next {
|
32 |
-
right: 0;
|
33 |
-
text-align: right;
|
34 |
-
}
|
35 |
-
|
36 |
-
div.wordpress-carousel-free-section .slick-prev,
|
37 |
-
div.wordpress-carousel-free-section .slick-next {
|
38 |
-
position: absolute;
|
39 |
-
z-index: 22;
|
40 |
-
top: 50%;
|
41 |
-
width: 14px;
|
42 |
-
height: 30px;
|
43 |
-
font-size: 30px;
|
44 |
-
-webkit-transition: ease all 0.3s;
|
45 |
-
-moz-transition: ease all 0.3s;
|
46 |
-
-ms-transition: ease all 0.3s;
|
47 |
-
-o-transition: ease all 0.3s;
|
48 |
-
transition: ease all 0.3s;
|
49 |
-
line-height: 30px;
|
50 |
-
margin-top: -15px;
|
51 |
-
cursor: pointer;
|
52 |
-
opacity: .5;
|
53 |
-
}
|
54 |
-
|
55 |
-
div.wordpress-carousel-free-section .slick-prev:hover,
|
56 |
-
div.wordpress-carousel-free-section .slick-next:hover {
|
57 |
-
opacity: 1;
|
58 |
-
}
|
59 |
-
|
60 |
-
/* Dots */
|
61 |
-
div.wordpress-carousel-free-section ul.slick-dots {
|
62 |
-
list-style: none;
|
63 |
-
padding: 0;
|
64 |
-
margin: 0;
|
65 |
-
text-align: center;
|
66 |
-
margin-top: 22px;
|
67 |
-
}
|
68 |
-
|
69 |
-
div.wordpress-carousel-free-section ul.slick-dots li {
|
70 |
-
display: inline;
|
71 |
-
}
|
72 |
-
|
73 |
-
div.wordpress-carousel-free-section ul.slick-dots li button {
|
74 |
-
border: 0 solid;
|
75 |
-
overflow: hidden;
|
76 |
-
width: 12px;
|
77 |
-
height: 12px;
|
78 |
-
border-radius: 50%;
|
79 |
-
text-indent: -999px;
|
80 |
-
background-color: #cccccc;
|
81 |
-
margin: 3px;
|
82 |
-
}
|
83 |
-
|
84 |
-
div.wordpress-carousel-free-section ul.slick-dots li button:focus {
|
85 |
-
outline: none;
|
86 |
-
}
|
87 |
-
|
88 |
-
div.wordpress-carousel-free-section ul.slick-dots li.slick-active button {
|
89 |
-
background-color: #666;
|
90 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/admin.js
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
jQuery(function ($) {
|
2 |
-
|
3 |
-
'use strict';
|
4 |
-
|
5 |
-
/* === Pro Features === */
|
6 |
-
(function () {
|
7 |
-
var container = document.querySelector('.welcome-panel.sp-wpc-pro-features .welcome-panel-column-container');
|
8 |
-
var msnry = new Masonry( container, {
|
9 |
-
// options
|
10 |
-
itemSelector: '.welcome-panel-column',
|
11 |
-
horizontalOrder: true
|
12 |
-
});
|
13 |
-
}());
|
14 |
-
|
15 |
-
|
16 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/slick.min.js
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
_ _ _ _
|
3 |
-
___| (_) ___| | __ (_)___
|
4 |
-
/ __| | |/ __| |/ / | / __|
|
5 |
-
\__ \ | | (__| < _ | \__ \
|
6 |
-
|___/_|_|\___|_|\_(_)/ |___/
|
7 |
-
|__/
|
8 |
-
|
9 |
-
Version: 1.6.0
|
10 |
-
Author: Ken Wheeler
|
11 |
-
Website: http://kenwheeler.github.io
|
12 |
-
Docs: http://kenwheeler.github.io/slick
|
13 |
-
Repo: http://github.com/kenwheeler/slick
|
14 |
-
Issues: http://github.com/kenwheeler/slick/issues
|
15 |
-
|
16 |
-
*/
|
17 |
-
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";var b=window.Slick||{};b=function(){function c(c,d){var f,e=this;e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(b,c){return a('<button type="button" data-role="none" role="button" tabindex="0" />').text(c+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},e.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},a.extend(e,e.initials),e.activeBreakpoint=null,e.animType=null,e.animProp=null,e.breakpoints=[],e.breakpointSettings=[],e.cssTransitions=!1,e.focussed=!1,e.interrupted=!1,e.hidden="hidden",e.paused=!0,e.positionProp=null,e.respondTo=null,e.rowCount=1,e.shouldClick=!0,e.$slider=a(c),e.$slidesCache=null,e.transformType=null,e.transitionType=null,e.visibilityChange="visibilitychange",e.windowWidth=0,e.windowTimer=null,f=a(c).data("slick")||{},e.options=a.extend({},e.defaults,d,f),e.currentSlide=e.options.initialSlide,e.originalSettings=e.options,"undefined"!=typeof document.mozHidden?(e.hidden="mozHidden",e.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(e.hidden="webkitHidden",e.visibilityChange="webkitvisibilitychange"),e.autoPlay=a.proxy(e.autoPlay,e),e.autoPlayClear=a.proxy(e.autoPlayClear,e),e.autoPlayIterator=a.proxy(e.autoPlayIterator,e),e.changeSlide=a.proxy(e.changeSlide,e),e.clickHandler=a.proxy(e.clickHandler,e),e.selectHandler=a.proxy(e.selectHandler,e),e.setPosition=a.proxy(e.setPosition,e),e.swipeHandler=a.proxy(e.swipeHandler,e),e.dragHandler=a.proxy(e.dragHandler,e),e.keyHandler=a.proxy(e.keyHandler,e),e.instanceUid=b++,e.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,e.registerBreakpoints(),e.init(!0)}var b=0;return c}(),b.prototype.activateADA=function(){var a=this;a.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},b.prototype.addSlide=b.prototype.slickAdd=function(b,c,d){var e=this;if("boolean"==typeof c)d=c,c=null;else if(0>c||c>=e.slideCount)return!1;e.unload(),"number"==typeof c?0===c&&0===e.$slides.length?a(b).appendTo(e.$slideTrack):d?a(b).insertBefore(e.$slides.eq(c)):a(b).insertAfter(e.$slides.eq(c)):d===!0?a(b).prependTo(e.$slideTrack):a(b).appendTo(e.$slideTrack),e.$slides=e.$slideTrack.children(this.options.slide),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.append(e.$slides),e.$slides.each(function(b,c){a(c).attr("data-slick-index",b)}),e.$slidesCache=e.$slides,e.reinit()},b.prototype.animateHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.animate({height:b},a.options.speed)}},b.prototype.animateSlide=function(b,c){var d={},e=this;e.animateHeight(),e.options.rtl===!0&&e.options.vertical===!1&&(b=-b),e.transformsEnabled===!1?e.options.vertical===!1?e.$slideTrack.animate({left:b},e.options.speed,e.options.easing,c):e.$slideTrack.animate({top:b},e.options.speed,e.options.easing,c):e.cssTransitions===!1?(e.options.rtl===!0&&(e.currentLeft=-e.currentLeft),a({animStart:e.currentLeft}).animate({animStart:b},{duration:e.options.speed,easing:e.options.easing,step:function(a){a=Math.ceil(a),e.options.vertical===!1?(d[e.animType]="translate("+a+"px, 0px)",e.$slideTrack.css(d)):(d[e.animType]="translate(0px,"+a+"px)",e.$slideTrack.css(d))},complete:function(){c&&c.call()}})):(e.applyTransition(),b=Math.ceil(b),e.options.vertical===!1?d[e.animType]="translate3d("+b+"px, 0px, 0px)":d[e.animType]="translate3d(0px,"+b+"px, 0px)",e.$slideTrack.css(d),c&&setTimeout(function(){e.disableTransition(),c.call()},e.options.speed))},b.prototype.getNavTarget=function(){var b=this,c=b.options.asNavFor;return c&&null!==c&&(c=a(c).not(b.$slider)),c},b.prototype.asNavFor=function(b){var c=this,d=c.getNavTarget();null!==d&&"object"==typeof d&&d.each(function(){var c=a(this).slick("getSlick");c.unslicked||c.slideHandler(b,!0)})},b.prototype.applyTransition=function(a){var b=this,c={};b.options.fade===!1?c[b.transitionType]=b.transformType+" "+b.options.speed+"ms "+b.options.cssEase:c[b.transitionType]="opacity "+b.options.speed+"ms "+b.options.cssEase,b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.autoPlay=function(){var a=this;a.autoPlayClear(),a.slideCount>a.options.slidesToShow&&(a.autoPlayTimer=setInterval(a.autoPlayIterator,a.options.autoplaySpeed))},b.prototype.autoPlayClear=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer)},b.prototype.autoPlayIterator=function(){var a=this,b=a.currentSlide+a.options.slidesToScroll;a.paused||a.interrupted||a.focussed||(a.options.infinite===!1&&(1===a.direction&&a.currentSlide+1===a.slideCount-1?a.direction=0:0===a.direction&&(b=a.currentSlide-a.options.slidesToScroll,a.currentSlide-1===0&&(a.direction=1))),a.slideHandler(b))},b.prototype.buildArrows=function(){var b=this;b.options.arrows===!0&&(b.$prevArrow=a(b.options.prevArrow).addClass("slick-arrow"),b.$nextArrow=a(b.options.nextArrow).addClass("slick-arrow"),b.slideCount>b.options.slidesToShow?(b.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.prependTo(b.options.appendArrows),b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.appendTo(b.options.appendArrows),b.options.infinite!==!0&&b.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):b.$prevArrow.add(b.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},b.prototype.buildDots=function(){var c,d,b=this;if(b.options.dots===!0&&b.slideCount>b.options.slidesToShow){for(b.$slider.addClass("slick-dotted"),d=a("<ul />").addClass(b.options.dotsClass),c=0;c<=b.getDotCount();c+=1)d.append(a("<li />").append(b.options.customPaging.call(this,b,c)));b.$dots=d.appendTo(b.options.appendDots),b.$dots.find("li").first().addClass("slick-active").attr("aria-hidden","false")}},b.prototype.buildOut=function(){var b=this;b.$slides=b.$slider.children(b.options.slide+":not(.slick-cloned)").addClass("slick-slide"),b.slideCount=b.$slides.length,b.$slides.each(function(b,c){a(c).attr("data-slick-index",b).data("originalStyling",a(c).attr("style")||"")}),b.$slider.addClass("slick-slider"),b.$slideTrack=0===b.slideCount?a('<div class="slick-track"/>').appendTo(b.$slider):b.$slides.wrapAll('<div class="slick-track"/>').parent(),b.$list=b.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent(),b.$slideTrack.css("opacity",0),(b.options.centerMode===!0||b.options.swipeToSlide===!0)&&(b.options.slidesToScroll=1),a("img[data-lazy]",b.$slider).not("[src]").addClass("slick-loading"),b.setupInfinite(),b.buildArrows(),b.buildDots(),b.updateDots(),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.options.draggable===!0&&b.$list.addClass("draggable")},b.prototype.buildRows=function(){var b,c,d,e,f,g,h,a=this;if(e=document.createDocumentFragment(),g=a.$slider.children(),a.options.rows>1){for(h=a.options.slidesPerRow*a.options.rows,f=Math.ceil(g.length/h),b=0;f>b;b++){var i=document.createElement("div");for(c=0;c<a.options.rows;c++){var j=document.createElement("div");for(d=0;d<a.options.slidesPerRow;d++){var k=b*h+(c*a.options.slidesPerRow+d);g.get(k)&&j.appendChild(g.get(k))}i.appendChild(j)}e.appendChild(i)}a.$slider.empty().append(e),a.$slider.children().children().children().css({width:100/a.options.slidesPerRow+"%",display:"inline-block"})}},b.prototype.checkResponsive=function(b,c){var e,f,g,d=this,h=!1,i=d.$slider.width(),j=window.innerWidth||a(window).width();if("window"===d.respondTo?g=j:"slider"===d.respondTo?g=i:"min"===d.respondTo&&(g=Math.min(j,i)),d.options.responsive&&d.options.responsive.length&&null!==d.options.responsive){f=null;for(e in d.breakpoints)d.breakpoints.hasOwnProperty(e)&&(d.originalSettings.mobileFirst===!1?g<d.breakpoints[e]&&(f=d.breakpoints[e]):g>d.breakpoints[e]&&(f=d.breakpoints[e]));null!==f?null!==d.activeBreakpoint?(f!==d.activeBreakpoint||c)&&(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):null!==d.activeBreakpoint&&(d.activeBreakpoint=null,d.options=d.originalSettings,b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b),h=f),b||h===!1||d.$slider.trigger("breakpoint",[d,h])}},b.prototype.changeSlide=function(b,c){var f,g,h,d=this,e=a(b.currentTarget);switch(e.is("a")&&b.preventDefault(),e.is("li")||(e=e.closest("li")),h=d.slideCount%d.options.slidesToScroll!==0,f=h?0:(d.slideCount-d.currentSlide)%d.options.slidesToScroll,b.data.message){case"previous":g=0===f?d.options.slidesToScroll:d.options.slidesToShow-f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide-g,!1,c);break;case"next":g=0===f?d.options.slidesToScroll:f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide+g,!1,c);break;case"index":var i=0===b.data.index?0:b.data.index||e.index()*d.options.slidesToScroll;d.slideHandler(d.checkNavigable(i),!1,c),e.children().trigger("focus");break;default:return}},b.prototype.checkNavigable=function(a){var c,d,b=this;if(c=b.getNavigableIndexes(),d=0,a>c[c.length-1])a=c[c.length-1];else for(var e in c){if(a<c[e]){a=d;break}d=c[e]}return a},b.prototype.cleanUpEvents=function(){var b=this;b.options.dots&&null!==b.$dots&&a("li",b.$dots).off("click.slick",b.changeSlide).off("mouseenter.slick",a.proxy(b.interrupt,b,!0)).off("mouseleave.slick",a.proxy(b.interrupt,b,!1)),b.$slider.off("focus.slick blur.slick"),b.options.arrows===!0&&b.slideCount>b.options.slidesToShow&&(b.$prevArrow&&b.$prevArrow.off("click.slick",b.changeSlide),b.$nextArrow&&b.$nextArrow.off("click.slick",b.changeSlide)),b.$list.off("touchstart.slick mousedown.slick",b.swipeHandler),b.$list.off("touchmove.slick mousemove.slick",b.swipeHandler),b.$list.off("touchend.slick mouseup.slick",b.swipeHandler),b.$list.off("touchcancel.slick mouseleave.slick",b.swipeHandler),b.$list.off("click.slick",b.clickHandler),a(document).off(b.visibilityChange,b.visibility),b.cleanUpSlideEvents(),b.options.accessibility===!0&&b.$list.off("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().off("click.slick",b.selectHandler),a(window).off("orientationchange.slick.slick-"+b.instanceUid,b.orientationChange),a(window).off("resize.slick.slick-"+b.instanceUid,b.resize),a("[draggable!=true]",b.$slideTrack).off("dragstart",b.preventDefault),a(window).off("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).off("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.cleanUpSlideEvents=function(){var b=this;b.$list.off("mouseenter.slick",a.proxy(b.interrupt,b,!0)),b.$list.off("mouseleave.slick",a.proxy(b.interrupt,b,!1))},b.prototype.cleanUpRows=function(){var b,a=this;a.options.rows>1&&(b=a.$slides.children().children(),b.removeAttr("style"),a.$slider.empty().append(b))},b.prototype.clickHandler=function(a){var b=this;b.shouldClick===!1&&(a.stopImmediatePropagation(),a.stopPropagation(),a.preventDefault())},b.prototype.destroy=function(b){var c=this;c.autoPlayClear(),c.touchObject={},c.cleanUpEvents(),a(".slick-cloned",c.$slider).detach(),c.$dots&&c.$dots.remove(),c.$prevArrow&&c.$prevArrow.length&&(c.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.prevArrow)&&c.$prevArrow.remove()),c.$nextArrow&&c.$nextArrow.length&&(c.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.nextArrow)&&c.$nextArrow.remove()),c.$slides&&(c.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){a(this).attr("style",a(this).data("originalStyling"))}),c.$slideTrack.children(this.options.slide).detach(),c.$slideTrack.detach(),c.$list.detach(),c.$slider.append(c.$slides)),c.cleanUpRows(),c.$slider.removeClass("slick-slider"),c.$slider.removeClass("slick-initialized"),c.$slider.removeClass("slick-dotted"),c.unslicked=!0,b||c.$slider.trigger("destroy",[c])},b.prototype.disableTransition=function(a){var b=this,c={};c[b.transitionType]="",b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.fadeSlide=function(a,b){var c=this;c.cssTransitions===!1?(c.$slides.eq(a).css({zIndex:c.options.zIndex}),c.$slides.eq(a).animate({opacity:1},c.options.speed,c.options.easing,b)):(c.applyTransition(a),c.$slides.eq(a).css({opacity:1,zIndex:c.options.zIndex}),b&&setTimeout(function(){c.disableTransition(a),b.call()},c.options.speed))},b.prototype.fadeSlideOut=function(a){var b=this;b.cssTransitions===!1?b.$slides.eq(a).animate({opacity:0,zIndex:b.options.zIndex-2},b.options.speed,b.options.easing):(b.applyTransition(a),b.$slides.eq(a).css({opacity:0,zIndex:b.options.zIndex-2}))},b.prototype.filterSlides=b.prototype.slickFilter=function(a){var b=this;null!==a&&(b.$slidesCache=b.$slides,b.unload(),b.$slideTrack.children(this.options.slide).detach(),b.$slidesCache.filter(a).appendTo(b.$slideTrack),b.reinit())},b.prototype.focusHandler=function(){var b=this;b.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*:not(.slick-arrow)",function(c){c.stopImmediatePropagation();var d=a(this);setTimeout(function(){b.options.pauseOnFocus&&(b.focussed=d.is(":focus"),b.autoPlay())},0)})},b.prototype.getCurrent=b.prototype.slickCurrentSlide=function(){var a=this;return a.currentSlide},b.prototype.getDotCount=function(){var a=this,b=0,c=0,d=0;if(a.options.infinite===!0)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else if(a.options.centerMode===!0)d=a.slideCount;else if(a.options.asNavFor)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else d=1+Math.ceil((a.slideCount-a.options.slidesToShow)/a.options.slidesToScroll);return d-1},b.prototype.getLeft=function(a){var c,d,f,b=this,e=0;return b.slideOffset=0,d=b.$slides.first().outerHeight(!0),b.options.infinite===!0?(b.slideCount>b.options.slidesToShow&&(b.slideOffset=b.slideWidth*b.options.slidesToShow*-1,e=d*b.options.slidesToShow*-1),b.slideCount%b.options.slidesToScroll!==0&&a+b.options.slidesToScroll>b.slideCount&&b.slideCount>b.options.slidesToShow&&(a>b.slideCount?(b.slideOffset=(b.options.slidesToShow-(a-b.slideCount))*b.slideWidth*-1,e=(b.options.slidesToShow-(a-b.slideCount))*d*-1):(b.slideOffset=b.slideCount%b.options.slidesToScroll*b.slideWidth*-1,e=b.slideCount%b.options.slidesToScroll*d*-1))):a+b.options.slidesToShow>b.slideCount&&(b.slideOffset=(a+b.options.slidesToShow-b.slideCount)*b.slideWidth,e=(a+b.options.slidesToShow-b.slideCount)*d),b.slideCount<=b.options.slidesToShow&&(b.slideOffset=0,e=0),b.options.centerMode===!0&&b.options.infinite===!0?b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)-b.slideWidth:b.options.centerMode===!0&&(b.slideOffset=0,b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)),c=b.options.vertical===!1?a*b.slideWidth*-1+b.slideOffset:a*d*-1+e,b.options.variableWidth===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow),c=b.options.rtl===!0?f[0]?-1*(b.$slideTrack.width()-f[0].offsetLeft-f.width()):0:f[0]?-1*f[0].offsetLeft:0,b.options.centerMode===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow+1),c=b.options.rtl===!0?f[0]?-1*(b.$slideTrack.width()-f[0].offsetLeft-f.width()):0:f[0]?-1*f[0].offsetLeft:0,c+=(b.$list.width()-f.outerWidth())/2)),c},b.prototype.getOption=b.prototype.slickGetOption=function(a){var b=this;return b.options[a]},b.prototype.getNavigableIndexes=function(){var e,a=this,b=0,c=0,d=[];for(a.options.infinite===!1?e=a.slideCount:(b=-1*a.options.slidesToScroll,c=-1*a.options.slidesToScroll,e=2*a.slideCount);e>b;)d.push(b),b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;return d},b.prototype.getSlick=function(){return this},b.prototype.getSlideCount=function(){var c,d,e,b=this;return e=b.options.centerMode===!0?b.slideWidth*Math.floor(b.options.slidesToShow/2):0,b.options.swipeToSlide===!0?(b.$slideTrack.find(".slick-slide").each(function(c,f){return f.offsetLeft-e+a(f).outerWidth()/2>-1*b.swipeLeft?(d=f,!1):void 0}),c=Math.abs(a(d).attr("data-slick-index")-b.currentSlide)||1):b.options.slidesToScroll},b.prototype.goTo=b.prototype.slickGoTo=function(a,b){var c=this;c.changeSlide({data:{message:"index",index:parseInt(a)}},b)},b.prototype.init=function(b){var c=this;a(c.$slider).hasClass("slick-initialized")||(a(c.$slider).addClass("slick-initialized"),c.buildRows(),c.buildOut(),c.setProps(),c.startLoad(),c.loadSlider(),c.initializeEvents(),c.updateArrows(),c.updateDots(),c.checkResponsive(!0),c.focusHandler()),b&&c.$slider.trigger("init",[c]),c.options.accessibility===!0&&c.initADA(),c.options.autoplay&&(c.paused=!1,c.autoPlay())},b.prototype.initADA=function(){var b=this;b.$slides.add(b.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),b.$slideTrack.attr("role","listbox"),b.$slides.not(b.$slideTrack.find(".slick-cloned")).each(function(c){a(this).attr({role:"option","aria-describedby":"slick-slide"+b.instanceUid+c})}),null!==b.$dots&&b.$dots.attr("role","tablist").find("li").each(function(c){a(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+b.instanceUid+c,id:"slick-slide"+b.instanceUid+c})}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar"),b.activateADA()},b.prototype.initArrowEvents=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},a.changeSlide),a.$nextArrow.off("click.slick").on("click.slick",{message:"next"},a.changeSlide))},b.prototype.initDotEvents=function(){var b=this;b.options.dots===!0&&b.slideCount>b.options.slidesToShow&&a("li",b.$dots).on("click.slick",{message:"index"},b.changeSlide),b.options.dots===!0&&b.options.pauseOnDotsHover===!0&&a("li",b.$dots).on("mouseenter.slick",a.proxy(b.interrupt,b,!0)).on("mouseleave.slick",a.proxy(b.interrupt,b,!1))},b.prototype.initSlideEvents=function(){var b=this;b.options.pauseOnHover&&(b.$list.on("mouseenter.slick",a.proxy(b.interrupt,b,!0)),b.$list.on("mouseleave.slick",a.proxy(b.interrupt,b,!1)))},b.prototype.initializeEvents=function(){var b=this;b.initArrowEvents(),b.initDotEvents(),b.initSlideEvents(),b.$list.on("touchstart.slick mousedown.slick",{action:"start"},b.swipeHandler),b.$list.on("touchmove.slick mousemove.slick",{action:"move"},b.swipeHandler),b.$list.on("touchend.slick mouseup.slick",{action:"end"},b.swipeHandler),b.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},b.swipeHandler),b.$list.on("click.slick",b.clickHandler),a(document).on(b.visibilityChange,a.proxy(b.visibility,b)),b.options.accessibility===!0&&b.$list.on("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),a(window).on("orientationchange.slick.slick-"+b.instanceUid,a.proxy(b.orientationChange,b)),a(window).on("resize.slick.slick-"+b.instanceUid,a.proxy(b.resize,b)),a("[draggable!=true]",b.$slideTrack).on("dragstart",b.preventDefault),a(window).on("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).on("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.initUI=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.show(),a.$nextArrow.show()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.show()},b.prototype.keyHandler=function(a){var b=this;a.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===a.keyCode&&b.options.accessibility===!0?b.changeSlide({data:{message:b.options.rtl===!0?"next":"previous"}}):39===a.keyCode&&b.options.accessibility===!0&&b.changeSlide({data:{message:b.options.rtl===!0?"previous":"next"}}))},b.prototype.lazyLoad=function(){function g(c){a("img[data-lazy]",c).each(function(){var c=a(this),d=a(this).attr("data-lazy"),e=document.createElement("img");e.onload=function(){c.animate({opacity:0},100,function(){c.attr("src",d).animate({opacity:1},200,function(){c.removeAttr("data-lazy").removeClass("slick-loading")}),b.$slider.trigger("lazyLoaded",[b,c,d])})},e.onerror=function(){c.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),b.$slider.trigger("lazyLoadError",[b,c,d])},e.src=d})}var c,d,e,f,b=this;b.options.centerMode===!0?b.options.infinite===!0?(e=b.currentSlide+(b.options.slidesToShow/2+1),f=e+b.options.slidesToShow+2):(e=Math.max(0,b.currentSlide-(b.options.slidesToShow/2+1)),f=2+(b.options.slidesToShow/2+1)+b.currentSlide):(e=b.options.infinite?b.options.slidesToShow+b.currentSlide:b.currentSlide,f=Math.ceil(e+b.options.slidesToShow),b.options.fade===!0&&(e>0&&e--,f<=b.slideCount&&f++)),c=b.$slider.find(".slick-slide").slice(e,f),g(c),b.slideCount<=b.options.slidesToShow?(d=b.$slider.find(".slick-slide"),g(d)):b.currentSlide>=b.slideCount-b.options.slidesToShow?(d=b.$slider.find(".slick-cloned").slice(0,b.options.slidesToShow),g(d)):0===b.currentSlide&&(d=b.$slider.find(".slick-cloned").slice(-1*b.options.slidesToShow),g(d))},b.prototype.loadSlider=function(){var a=this;a.setPosition(),a.$slideTrack.css({opacity:1}),a.$slider.removeClass("slick-loading"),a.initUI(),"progressive"===a.options.lazyLoad&&a.progressiveLazyLoad()},b.prototype.next=b.prototype.slickNext=function(){var a=this;a.changeSlide({data:{message:"next"}})},b.prototype.orientationChange=function(){var a=this;a.checkResponsive(),a.setPosition()},b.prototype.pause=b.prototype.slickPause=function(){var a=this;a.autoPlayClear(),a.paused=!0},b.prototype.play=b.prototype.slickPlay=function(){var a=this;a.autoPlay(),a.options.autoplay=!0,a.paused=!1,a.focussed=!1,a.interrupted=!1},b.prototype.postSlide=function(a){var b=this;b.unslicked||(b.$slider.trigger("afterChange",[b,a]),b.animating=!1,b.setPosition(),b.swipeLeft=null,b.options.autoplay&&b.autoPlay(),b.options.accessibility===!0&&b.initADA())},b.prototype.prev=b.prototype.slickPrev=function(){var a=this;a.changeSlide({data:{message:"previous"}})},b.prototype.preventDefault=function(a){a.preventDefault()},b.prototype.progressiveLazyLoad=function(b){b=b||1;var e,f,g,c=this,d=a("img[data-lazy]",c.$slider);d.length?(e=d.first(),f=e.attr("data-lazy"),g=document.createElement("img"),g.onload=function(){e.attr("src",f).removeAttr("data-lazy").removeClass("slick-loading"),c.options.adaptiveHeight===!0&&c.setPosition(),c.$slider.trigger("lazyLoaded",[c,e,f]),c.progressiveLazyLoad()},g.onerror=function(){3>b?setTimeout(function(){c.progressiveLazyLoad(b+1)},500):(e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),c.$slider.trigger("lazyLoadError",[c,e,f]),c.progressiveLazyLoad())},g.src=f):c.$slider.trigger("allImagesLoaded",[c])},b.prototype.refresh=function(b){var d,e,c=this;e=c.slideCount-c.options.slidesToShow,!c.options.infinite&&c.currentSlide>e&&(c.currentSlide=e),c.slideCount<=c.options.slidesToShow&&(c.currentSlide=0),d=c.currentSlide,c.destroy(!0),a.extend(c,c.initials,{currentSlide:d}),c.init(),b||c.changeSlide({data:{message:"index",index:d}},!1)},b.prototype.registerBreakpoints=function(){var c,d,e,b=this,f=b.options.responsive||null;if("array"===a.type(f)&&f.length){b.respondTo=b.options.respondTo||"window";for(c in f)if(e=b.breakpoints.length-1,d=f[c].breakpoint,f.hasOwnProperty(c)){for(;e>=0;)b.breakpoints[e]&&b.breakpoints[e]===d&&b.breakpoints.splice(e,1),e--;b.breakpoints.push(d),b.breakpointSettings[d]=f[c].settings}b.breakpoints.sort(function(a,c){return b.options.mobileFirst?a-c:c-a})}},b.prototype.reinit=function(){var b=this;b.$slides=b.$slideTrack.children(b.options.slide).addClass("slick-slide"),b.slideCount=b.$slides.length,b.currentSlide>=b.slideCount&&0!==b.currentSlide&&(b.currentSlide=b.currentSlide-b.options.slidesToScroll),b.slideCount<=b.options.slidesToShow&&(b.currentSlide=0),b.registerBreakpoints(),b.setProps(),b.setupInfinite(),b.buildArrows(),b.updateArrows(),b.initArrowEvents(),b.buildDots(),b.updateDots(),b.initDotEvents(),b.cleanUpSlideEvents(),b.initSlideEvents(),b.checkResponsive(!1,!0),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.setPosition(),b.focusHandler(),b.paused=!b.options.autoplay,b.autoPlay(),b.$slider.trigger("reInit",[b])},b.prototype.resize=function(){var b=this;a(window).width()!==b.windowWidth&&(clearTimeout(b.windowDelay),b.windowDelay=window.setTimeout(function(){b.windowWidth=a(window).width(),b.checkResponsive(),b.unslicked||b.setPosition()},50))},b.prototype.removeSlide=b.prototype.slickRemove=function(a,b,c){var d=this;return"boolean"==typeof a?(b=a,a=b===!0?0:d.slideCount-1):a=b===!0?--a:a,d.slideCount<1||0>a||a>d.slideCount-1?!1:(d.unload(),c===!0?d.$slideTrack.children().remove():d.$slideTrack.children(this.options.slide).eq(a).remove(),d.$slides=d.$slideTrack.children(this.options.slide),d.$slideTrack.children(this.options.slide).detach(),d.$slideTrack.append(d.$slides),d.$slidesCache=d.$slides,void d.reinit())},b.prototype.setCSS=function(a){var d,e,b=this,c={};b.options.rtl===!0&&(a=-a),d="left"==b.positionProp?Math.ceil(a)+"px":"0px",e="top"==b.positionProp?Math.ceil(a)+"px":"0px",c[b.positionProp]=a,b.transformsEnabled===!1?b.$slideTrack.css(c):(c={},b.cssTransitions===!1?(c[b.animType]="translate("+d+", "+e+")",b.$slideTrack.css(c)):(c[b.animType]="translate3d("+d+", "+e+", 0px)",b.$slideTrack.css(c)))},b.prototype.setDimensions=function(){var a=this;a.options.vertical===!1?a.options.centerMode===!0&&a.$list.css({padding:"0px "+a.options.centerPadding}):(a.$list.height(a.$slides.first().outerHeight(!0)*a.options.slidesToShow),a.options.centerMode===!0&&a.$list.css({padding:a.options.centerPadding+" 0px"})),a.listWidth=a.$list.width(),a.listHeight=a.$list.height(),a.options.vertical===!1&&a.options.variableWidth===!1?(a.slideWidth=Math.ceil(a.listWidth/a.options.slidesToShow),a.$slideTrack.width(Math.ceil(a.slideWidth*a.$slideTrack.children(".slick-slide").length))):a.options.variableWidth===!0?a.$slideTrack.width(5e3*a.slideCount):(a.slideWidth=Math.ceil(a.listWidth),a.$slideTrack.height(Math.ceil(a.$slides.first().outerHeight(!0)*a.$slideTrack.children(".slick-slide").length)));var b=a.$slides.first().outerWidth(!0)-a.$slides.first().width();a.options.variableWidth===!1&&a.$slideTrack.children(".slick-slide").width(a.slideWidth-b)},b.prototype.setFade=function(){var c,b=this;b.$slides.each(function(d,e){c=b.slideWidth*d*-1,b.options.rtl===!0?a(e).css({position:"relative",right:c,top:0,zIndex:b.options.zIndex-2,opacity:0}):a(e).css({position:"relative",left:c,top:0,zIndex:b.options.zIndex-2,opacity:0})}),b.$slides.eq(b.currentSlide).css({zIndex:b.options.zIndex-1,opacity:1})},b.prototype.setHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.css("height",b)}},b.prototype.setOption=b.prototype.slickSetOption=function(){var c,d,e,f,h,b=this,g=!1;if("object"===a.type(arguments[0])?(e=arguments[0],g=arguments[1],h="multiple"):"string"===a.type(arguments[0])&&(e=arguments[0],f=arguments[1],g=arguments[2],"responsive"===arguments[0]&&"array"===a.type(arguments[1])?h="responsive":"undefined"!=typeof arguments[1]&&(h="single")),"single"===h)b.options[e]=f;else if("multiple"===h)a.each(e,function(a,c){b.options[a]=c});else if("responsive"===h)for(d in f)if("array"!==a.type(b.options.responsive))b.options.responsive=[f[d]];else{for(c=b.options.responsive.length-1;c>=0;)b.options.responsive[c].breakpoint===f[d].breakpoint&&b.options.responsive.splice(c,1),c--;b.options.responsive.push(f[d])}g&&(b.unload(),b.reinit())},b.prototype.setPosition=function(){var a=this;a.setDimensions(),a.setHeight(),a.options.fade===!1?a.setCSS(a.getLeft(a.currentSlide)):a.setFade(),a.$slider.trigger("setPosition",[a])},b.prototype.setProps=function(){var a=this,b=document.body.style;a.positionProp=a.options.vertical===!0?"top":"left","top"===a.positionProp?a.$slider.addClass("slick-vertical"):a.$slider.removeClass("slick-vertical"),(void 0!==b.WebkitTransition||void 0!==b.MozTransition||void 0!==b.msTransition)&&a.options.useCSS===!0&&(a.cssTransitions=!0),a.options.fade&&("number"==typeof a.options.zIndex?a.options.zIndex<3&&(a.options.zIndex=3):a.options.zIndex=a.defaults.zIndex),void 0!==b.OTransform&&(a.animType="OTransform",a.transformType="-o-transform",a.transitionType="OTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.MozTransform&&(a.animType="MozTransform",a.transformType="-moz-transform",a.transitionType="MozTransition",void 0===b.perspectiveProperty&&void 0===b.MozPerspective&&(a.animType=!1)),void 0!==b.webkitTransform&&(a.animType="webkitTransform",a.transformType="-webkit-transform",a.transitionType="webkitTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.msTransform&&(a.animType="msTransform",a.transformType="-ms-transform",a.transitionType="msTransition",void 0===b.msTransform&&(a.animType=!1)),void 0!==b.transform&&a.animType!==!1&&(a.animType="transform",a.transformType="transform",a.transitionType="transition"),a.transformsEnabled=a.options.useTransform&&null!==a.animType&&a.animType!==!1},b.prototype.setSlideClasses=function(a){var c,d,e,f,b=this;d=b.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),b.$slides.eq(a).addClass("slick-current"),b.options.centerMode===!0?(c=Math.floor(b.options.slidesToShow/2),b.options.infinite===!0&&(a>=c&&a<=b.slideCount-1-c?b.$slides.slice(a-c,a+c+1).addClass("slick-active").attr("aria-hidden","false"):(e=b.options.slidesToShow+a,
|
18 |
-
d.slice(e-c+1,e+c+2).addClass("slick-active").attr("aria-hidden","false")),0===a?d.eq(d.length-1-b.options.slidesToShow).addClass("slick-center"):a===b.slideCount-1&&d.eq(b.options.slidesToShow).addClass("slick-center")),b.$slides.eq(a).addClass("slick-center")):a>=0&&a<=b.slideCount-b.options.slidesToShow?b.$slides.slice(a,a+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):d.length<=b.options.slidesToShow?d.addClass("slick-active").attr("aria-hidden","false"):(f=b.slideCount%b.options.slidesToShow,e=b.options.infinite===!0?b.options.slidesToShow+a:a,b.options.slidesToShow==b.options.slidesToScroll&&b.slideCount-a<b.options.slidesToShow?d.slice(e-(b.options.slidesToShow-f),e+f).addClass("slick-active").attr("aria-hidden","false"):d.slice(e,e+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false")),"ondemand"===b.options.lazyLoad&&b.lazyLoad()},b.prototype.setupInfinite=function(){var c,d,e,b=this;if(b.options.fade===!0&&(b.options.centerMode=!1),b.options.infinite===!0&&b.options.fade===!1&&(d=null,b.slideCount>b.options.slidesToShow)){for(e=b.options.centerMode===!0?b.options.slidesToShow+1:b.options.slidesToShow,c=b.slideCount;c>b.slideCount-e;c-=1)d=c-1,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d-b.slideCount).prependTo(b.$slideTrack).addClass("slick-cloned");for(c=0;e>c;c+=1)d=c,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d+b.slideCount).appendTo(b.$slideTrack).addClass("slick-cloned");b.$slideTrack.find(".slick-cloned").find("[id]").each(function(){a(this).attr("id","")})}},b.prototype.interrupt=function(a){var b=this;a||b.autoPlay(),b.interrupted=a},b.prototype.selectHandler=function(b){var c=this,d=a(b.target).is(".slick-slide")?a(b.target):a(b.target).parents(".slick-slide"),e=parseInt(d.attr("data-slick-index"));return e||(e=0),c.slideCount<=c.options.slidesToShow?(c.setSlideClasses(e),void c.asNavFor(e)):void c.slideHandler(e)},b.prototype.slideHandler=function(a,b,c){var d,e,f,g,j,h=null,i=this;return b=b||!1,i.animating===!0&&i.options.waitForAnimate===!0||i.options.fade===!0&&i.currentSlide===a||i.slideCount<=i.options.slidesToShow?void 0:(b===!1&&i.asNavFor(a),d=a,h=i.getLeft(d),g=i.getLeft(i.currentSlide),i.currentLeft=null===i.swipeLeft?g:i.swipeLeft,i.options.infinite===!1&&i.options.centerMode===!1&&(0>a||a>i.getDotCount()*i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d))):i.options.infinite===!1&&i.options.centerMode===!0&&(0>a||a>i.slideCount-i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d))):(i.options.autoplay&&clearInterval(i.autoPlayTimer),e=0>d?i.slideCount%i.options.slidesToScroll!==0?i.slideCount-i.slideCount%i.options.slidesToScroll:i.slideCount+d:d>=i.slideCount?i.slideCount%i.options.slidesToScroll!==0?0:d-i.slideCount:d,i.animating=!0,i.$slider.trigger("beforeChange",[i,i.currentSlide,e]),f=i.currentSlide,i.currentSlide=e,i.setSlideClasses(i.currentSlide),i.options.asNavFor&&(j=i.getNavTarget(),j=j.slick("getSlick"),j.slideCount<=j.options.slidesToShow&&j.setSlideClasses(i.currentSlide)),i.updateDots(),i.updateArrows(),i.options.fade===!0?(c!==!0?(i.fadeSlideOut(f),i.fadeSlide(e,function(){i.postSlide(e)})):i.postSlide(e),void i.animateHeight()):void(c!==!0?i.animateSlide(h,function(){i.postSlide(e)}):i.postSlide(e))))},b.prototype.startLoad=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.hide(),a.$nextArrow.hide()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.hide(),a.$slider.addClass("slick-loading")},b.prototype.swipeDirection=function(){var a,b,c,d,e=this;return a=e.touchObject.startX-e.touchObject.curX,b=e.touchObject.startY-e.touchObject.curY,c=Math.atan2(b,a),d=Math.round(180*c/Math.PI),0>d&&(d=360-Math.abs(d)),45>=d&&d>=0?e.options.rtl===!1?"left":"right":360>=d&&d>=315?e.options.rtl===!1?"left":"right":d>=135&&225>=d?e.options.rtl===!1?"right":"left":e.options.verticalSwiping===!0?d>=35&&135>=d?"down":"up":"vertical"},b.prototype.swipeEnd=function(a){var c,d,b=this;if(b.dragging=!1,b.interrupted=!1,b.shouldClick=b.touchObject.swipeLength>10?!1:!0,void 0===b.touchObject.curX)return!1;if(b.touchObject.edgeHit===!0&&b.$slider.trigger("edge",[b,b.swipeDirection()]),b.touchObject.swipeLength>=b.touchObject.minSwipe){switch(d=b.swipeDirection()){case"left":case"down":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide+b.getSlideCount()):b.currentSlide+b.getSlideCount(),b.currentDirection=0;break;case"right":case"up":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide-b.getSlideCount()):b.currentSlide-b.getSlideCount(),b.currentDirection=1}"vertical"!=d&&(b.slideHandler(c),b.touchObject={},b.$slider.trigger("swipe",[b,d]))}else b.touchObject.startX!==b.touchObject.curX&&(b.slideHandler(b.currentSlide),b.touchObject={})},b.prototype.swipeHandler=function(a){var b=this;if(!(b.options.swipe===!1||"ontouchend"in document&&b.options.swipe===!1||b.options.draggable===!1&&-1!==a.type.indexOf("mouse")))switch(b.touchObject.fingerCount=a.originalEvent&&void 0!==a.originalEvent.touches?a.originalEvent.touches.length:1,b.touchObject.minSwipe=b.listWidth/b.options.touchThreshold,b.options.verticalSwiping===!0&&(b.touchObject.minSwipe=b.listHeight/b.options.touchThreshold),a.data.action){case"start":b.swipeStart(a);break;case"move":b.swipeMove(a);break;case"end":b.swipeEnd(a)}},b.prototype.swipeMove=function(a){var d,e,f,g,h,b=this;return h=void 0!==a.originalEvent?a.originalEvent.touches:null,!b.dragging||h&&1!==h.length?!1:(d=b.getLeft(b.currentSlide),b.touchObject.curX=void 0!==h?h[0].pageX:a.clientX,b.touchObject.curY=void 0!==h?h[0].pageY:a.clientY,b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curX-b.touchObject.startX,2))),b.options.verticalSwiping===!0&&(b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curY-b.touchObject.startY,2)))),e=b.swipeDirection(),"vertical"!==e?(void 0!==a.originalEvent&&b.touchObject.swipeLength>4&&a.preventDefault(),g=(b.options.rtl===!1?1:-1)*(b.touchObject.curX>b.touchObject.startX?1:-1),b.options.verticalSwiping===!0&&(g=b.touchObject.curY>b.touchObject.startY?1:-1),f=b.touchObject.swipeLength,b.touchObject.edgeHit=!1,b.options.infinite===!1&&(0===b.currentSlide&&"right"===e||b.currentSlide>=b.getDotCount()&&"left"===e)&&(f=b.touchObject.swipeLength*b.options.edgeFriction,b.touchObject.edgeHit=!0),b.options.vertical===!1?b.swipeLeft=d+f*g:b.swipeLeft=d+f*(b.$list.height()/b.listWidth)*g,b.options.verticalSwiping===!0&&(b.swipeLeft=d+f*g),b.options.fade===!0||b.options.touchMove===!1?!1:b.animating===!0?(b.swipeLeft=null,!1):void b.setCSS(b.swipeLeft)):void 0)},b.prototype.swipeStart=function(a){var c,b=this;return b.interrupted=!0,1!==b.touchObject.fingerCount||b.slideCount<=b.options.slidesToShow?(b.touchObject={},!1):(void 0!==a.originalEvent&&void 0!==a.originalEvent.touches&&(c=a.originalEvent.touches[0]),b.touchObject.startX=b.touchObject.curX=void 0!==c?c.pageX:a.clientX,b.touchObject.startY=b.touchObject.curY=void 0!==c?c.pageY:a.clientY,void(b.dragging=!0))},b.prototype.unfilterSlides=b.prototype.slickUnfilter=function(){var a=this;null!==a.$slidesCache&&(a.unload(),a.$slideTrack.children(this.options.slide).detach(),a.$slidesCache.appendTo(a.$slideTrack),a.reinit())},b.prototype.unload=function(){var b=this;a(".slick-cloned",b.$slider).remove(),b.$dots&&b.$dots.remove(),b.$prevArrow&&b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.remove(),b.$nextArrow&&b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.remove(),b.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},b.prototype.unslick=function(a){var b=this;b.$slider.trigger("unslick",[b,a]),b.destroy()},b.prototype.updateArrows=function(){var b,a=this;b=Math.floor(a.options.slidesToShow/2),a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&!a.options.infinite&&(a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===a.currentSlide?(a.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-a.options.slidesToShow&&a.options.centerMode===!1?(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-1&&a.options.centerMode===!0&&(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},b.prototype.updateDots=function(){var a=this;null!==a.$dots&&(a.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true"),a.$dots.find("li").eq(Math.floor(a.currentSlide/a.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false"))},b.prototype.visibility=function(){var a=this;a.options.autoplay&&(document[a.hidden]?a.interrupted=!0:a.interrupted=!1)},a.fn.slick=function(){var f,g,a=this,c=arguments[0],d=Array.prototype.slice.call(arguments,1),e=a.length;for(f=0;e>f;f++)if("object"==typeof c||"undefined"==typeof c?a[f].slick=new b(a[f],c):g=a[f].slick[c].apply(a[f].slick,d),"undefined"!=typeof g)return g;return a}});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/functions.php
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Include files
|
5 |
-
*/
|
6 |
-
require_once( SP_WP_CAROUSEL_FREE_DIR . 'inc/shortcodes.php' );
|
7 |
-
require_once( SP_WP_CAROUSEL_FREE_DIR . 'inc/scripts.php' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/scripts.php
DELETED
@@ -1,57 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
-
exit;
|
4 |
-
} // if direct access
|
5 |
-
|
6 |
-
/**
|
7 |
-
* Scripts and styles
|
8 |
-
*/
|
9 |
-
class SP_WCF_Scripts_AND_Style{
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Script version number
|
13 |
-
*/
|
14 |
-
protected $version;
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Initialize the class
|
18 |
-
*/
|
19 |
-
public function __construct() {
|
20 |
-
$this->version = '20170501';
|
21 |
-
|
22 |
-
add_action( 'wp_enqueue_scripts', array( $this, 'sp_wp_carousel_free_script' ) );
|
23 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );
|
24 |
-
}
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Front Scripts
|
28 |
-
*/
|
29 |
-
public function sp_wp_carousel_free_script() {
|
30 |
-
// CSS Files
|
31 |
-
wp_enqueue_style( 'slick', SP_WP_CAROUSEL_FREE_URL . 'assets/css/slick.css', false, $this->version );
|
32 |
-
wp_enqueue_style( 'font-awesome', SP_WP_CAROUSEL_FREE_URL . 'assets/css/font-awesome.min.css', false, $this->version );
|
33 |
-
wp_enqueue_style( 'wp-carousel-free-style', SP_WP_CAROUSEL_FREE_URL . 'assets/css/style.css', false, $this->version );
|
34 |
-
|
35 |
-
//JS Files
|
36 |
-
wp_enqueue_script( 'slick-main', SP_WP_CAROUSEL_FREE_URL . 'assets/js/slick.min.js', array( 'jquery' ), $this->version, true );
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Admin Scripts
|
41 |
-
*/
|
42 |
-
public function admin_scripts() {
|
43 |
-
|
44 |
-
if ( 'options-general.php?page=about-wp-carousel' ) {
|
45 |
-
//CSS Files
|
46 |
-
wp_enqueue_style( 'font-awesome', SP_WP_CAROUSEL_FREE_URL . 'assets/css/font-awesome.min.css', false, $this->version );
|
47 |
-
wp_enqueue_style( 'sp-wp-carousel-admin-style', SP_WP_CAROUSEL_FREE_URL . 'assets/css/admin.css', false, $this->version );
|
48 |
-
|
49 |
-
//JS Files
|
50 |
-
wp_enqueue_script( 'jquery-masonry');
|
51 |
-
wp_enqueue_script( 'sp-wp-carousel-admin-js', SP_WP_CAROUSEL_FREE_URL . 'assets/js/admin.js', array( 'jquery' ), $this->version, true );
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
|
56 |
-
}
|
57 |
-
new SP_WCF_Scripts_AND_Style();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/shortcodes.php
DELETED
@@ -1,199 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Registering shortcode
|
3 |
-
function wp_carousel_free_shortcode( $attr ) {
|
4 |
-
$post = get_post();
|
5 |
-
|
6 |
-
static $instance = 0;
|
7 |
-
$instance ++;
|
8 |
-
|
9 |
-
if ( ! empty( $attr['ids'] ) ) {
|
10 |
-
if ( empty( $attr['orderby'] ) ) {
|
11 |
-
$attr['orderby'] = 'post__in';
|
12 |
-
}
|
13 |
-
$attr['include'] = $attr['ids'];
|
14 |
-
}
|
15 |
-
|
16 |
-
$output = apply_filters( 'sp_wcfgallery_shortcode', '', $attr );
|
17 |
-
if ( $output != '' ) {
|
18 |
-
return $output;
|
19 |
-
}
|
20 |
-
|
21 |
-
if ( isset( $attr['orderby'] ) ) {
|
22 |
-
$attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );
|
23 |
-
if ( ! $attr['orderby'] ) {
|
24 |
-
unset( $attr['orderby'] );
|
25 |
-
}
|
26 |
-
}
|
27 |
-
|
28 |
-
extract( shortcode_atts( array(
|
29 |
-
'ids' => '',
|
30 |
-
'items' => '5',
|
31 |
-
'items_desktop' => '4',
|
32 |
-
'items_desktop_small' => '3',
|
33 |
-
'items_tablet' => '2',
|
34 |
-
'items_mobile' => '1',
|
35 |
-
'bullets' => 'false',
|
36 |
-
'nav' => 'true',
|
37 |
-
'auto_play' => 'true',
|
38 |
-
'size' => 'medium',
|
39 |
-
'include' => '',
|
40 |
-
'exclude' => '',
|
41 |
-
), $attr, 'gallery' ) );
|
42 |
-
|
43 |
-
// helper function to return shortcode regex match on instance occurring on page or post
|
44 |
-
if ( ! function_exists( 'get_match' ) ) {
|
45 |
-
function get_match( $regex, $content, $instance ) {
|
46 |
-
preg_match_all( $regex, $content, $matches );
|
47 |
-
|
48 |
-
return $matches[1][ $instance ];
|
49 |
-
}
|
50 |
-
}
|
51 |
-
|
52 |
-
// Extract the shortcode arguments from the $page or $post
|
53 |
-
$shortcode_args = shortcode_parse_atts( get_match( '/\[wcfgallery\s(.*)\]/isU', $post->post_content, $instance - 1 ) );
|
54 |
-
|
55 |
-
// get the ids specified in the shortcode call
|
56 |
-
if ( is_array( $ids ) ) {
|
57 |
-
$ids = $shortcode_args["ids"];
|
58 |
-
}
|
59 |
-
|
60 |
-
$id = uniqid();
|
61 |
-
$order = 'DESC';
|
62 |
-
$orderby = 'title';
|
63 |
-
|
64 |
-
if ( 'RAND' == $order ) {
|
65 |
-
$orderby = 'none';
|
66 |
-
}
|
67 |
-
|
68 |
-
if ( ! empty( $ids ) ) {
|
69 |
-
$_attachments = get_posts( array(
|
70 |
-
'include' => $ids,
|
71 |
-
'post_status' => 'inherit',
|
72 |
-
'post_type' => 'attachment',
|
73 |
-
'post_mime_type' => 'image',
|
74 |
-
'order' => $order,
|
75 |
-
'orderby' => $orderby
|
76 |
-
) );
|
77 |
-
|
78 |
-
$attachments = array();
|
79 |
-
foreach ( $_attachments as $key => $val ) {
|
80 |
-
$attachments[ $val->ID ] = $_attachments[ $key ];
|
81 |
-
}
|
82 |
-
} elseif ( ! empty( $exclude ) ) {
|
83 |
-
$attachments = get_children( array(
|
84 |
-
'post_parent' => $id,
|
85 |
-
'exclude' => $exclude,
|
86 |
-
'post_status' => 'inherit',
|
87 |
-
'post_type' => 'attachment',
|
88 |
-
'post_mime_type' => 'image',
|
89 |
-
'order' => $order,
|
90 |
-
'orderby' => $orderby
|
91 |
-
) );
|
92 |
-
} else {
|
93 |
-
|
94 |
-
}
|
95 |
-
|
96 |
-
if ( empty( $attachments ) ) {
|
97 |
-
return '';
|
98 |
-
}
|
99 |
-
|
100 |
-
if ( is_feed() ) {
|
101 |
-
$output = "\n";
|
102 |
-
foreach ( $attachments as $att_id => $attachment ) {
|
103 |
-
$output .= wp_get_attachment_link( $att_id, $size, true ) . "\n";
|
104 |
-
}
|
105 |
-
|
106 |
-
return $output;
|
107 |
-
}
|
108 |
-
|
109 |
-
$gallery_style = $gallery_div = '';
|
110 |
-
|
111 |
-
// Carousel Area Padding
|
112 |
-
if ( $nav == 'true' ) {
|
113 |
-
$carousel_area_padding = '0 15px';
|
114 |
-
} else {
|
115 |
-
$carousel_area_padding = '0';
|
116 |
-
}
|
117 |
-
|
118 |
-
// Bullet CSS
|
119 |
-
if ( $bullets == 'true' ) {
|
120 |
-
$the_nav_margin = '-40px';
|
121 |
-
} else {
|
122 |
-
$the_nav_margin = '-15px';
|
123 |
-
}
|
124 |
-
|
125 |
-
$gallery_div = "
|
126 |
-
<style type='text/css'>
|
127 |
-
div#wordpress-carousel-free-$id.wordpress-carousel-free-section .slick-prev,
|
128 |
-
div#wordpress-carousel-free-$id.wordpress-carousel-free-section .slick-next{
|
129 |
-
margin-top: $the_nav_margin;
|
130 |
-
}
|
131 |
-
</style>
|
132 |
-
|
133 |
-
<script type='text/javascript'>
|
134 |
-
jQuery(document).ready(function() {
|
135 |
-
jQuery('#wordpress-carousel-free-$id').slick({
|
136 |
-
infinite: true,
|
137 |
-
slidesToShow: " . $items . ",
|
138 |
-
slidesToScroll: 1,
|
139 |
-
prevArrow: \"<div class='slick-prev'><i class='fa fa-angle-left'></i></div>\",
|
140 |
-
nextArrow: \"<div class='slick-next'><i class='fa fa-angle-right'></i></div>\",
|
141 |
-
dots: " . $bullets . ",
|
142 |
-
arrows: " . $nav . ",
|
143 |
-
autoplay: " . $auto_play . ",
|
144 |
-
responsive: [
|
145 |
-
{
|
146 |
-
breakpoint: 1199,
|
147 |
-
settings: {
|
148 |
-
slidesToShow: " . $items_desktop . "
|
149 |
-
}
|
150 |
-
},
|
151 |
-
{
|
152 |
-
breakpoint: 979,
|
153 |
-
settings: {
|
154 |
-
slidesToShow: " . $items_desktop_small . "
|
155 |
-
}
|
156 |
-
},
|
157 |
-
{
|
158 |
-
breakpoint: 767,
|
159 |
-
settings: {
|
160 |
-
slidesToShow: " . $items_tablet . "
|
161 |
-
}
|
162 |
-
},
|
163 |
-
{
|
164 |
-
breakpoint: 479,
|
165 |
-
settings: {
|
166 |
-
slidesToShow: " . $items_mobile . "
|
167 |
-
}
|
168 |
-
}
|
169 |
-
]
|
170 |
-
});
|
171 |
-
});
|
172 |
-
</script>
|
173 |
-
|
174 |
-
<div id='wordpress-carousel-free-$id' class='wordpress-carousel-free-section' style='padding:$carousel_area_padding;'>";
|
175 |
-
|
176 |
-
$output = apply_filters( 'gallery_style', $gallery_style . $gallery_div );
|
177 |
-
|
178 |
-
foreach ( $attachments as $attach_id => $attachment ) {
|
179 |
-
|
180 |
-
$wcf_image_url = wp_get_attachment_image_src( $attach_id, $size, false );
|
181 |
-
|
182 |
-
$wcf_image_title = $attachment->post_title;
|
183 |
-
|
184 |
-
|
185 |
-
$output .= "
|
186 |
-
<div class='single_wcf_item'>
|
187 |
-
<img src='$wcf_image_url[0]' alt='$wcf_image_title' />
|
188 |
-
</div>
|
189 |
-
";
|
190 |
-
|
191 |
-
}
|
192 |
-
|
193 |
-
$output .= "
|
194 |
-
</div>\n";
|
195 |
-
|
196 |
-
return $output;
|
197 |
-
}
|
198 |
-
|
199 |
-
add_shortcode( 'wcfgallery', 'wp_carousel_free_shortcode' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-wp-carousel-free-i18n.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Define the internationalization functionality
|
4 |
+
*
|
5 |
+
* Loads and defines the internationalization files for this plugin
|
6 |
+
* so that it is ready for translation.
|
7 |
+
*
|
8 |
+
* @link https://shapedplugin.com/
|
9 |
+
* @since 2.0.0
|
10 |
+
*
|
11 |
+
* @package WP_Carousel_Free
|
12 |
+
* @subpackage WP_Carousel_Free/includes
|
13 |
+
*/
|
14 |
+
|
15 |
+
/**
|
16 |
+
* WP_Carousel_Free_I18n define the internationalization functionality.
|
17 |
+
*
|
18 |
+
* @since 2.0.0
|
19 |
+
* @author ShapedPlugin <shapedplugin@gmail.com>
|
20 |
+
*/
|
21 |
+
class WP_Carousel_Free_I18n {
|
22 |
+
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Load the plugin text domain for translation.
|
26 |
+
*
|
27 |
+
* @since 2.0.0
|
28 |
+
*/
|
29 |
+
public function load_plugin_textdomain() {
|
30 |
+
|
31 |
+
load_plugin_textdomain(
|
32 |
+
'wp-carousel-free',
|
33 |
+
false,
|
34 |
+
dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/'
|
35 |
+
);
|
36 |
+
|
37 |
+
}
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
+
}
|
includes/class-wp-carousel-free-loader.php
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Register all actions and filters for the plugin
|
4 |
+
*
|
5 |
+
* @link https://shapedplugin.com/
|
6 |
+
* @since 3.0.0
|
7 |
+
*
|
8 |
+
* @package WP_Carousel_Free
|
9 |
+
* @subpackage WP_Carousel_Free/includes
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Register all actions and filters for the plugin.
|
14 |
+
*
|
15 |
+
* Maintain a list of all hooks that are registered throughout
|
16 |
+
* the plugin, and register them with the WordPress API. Call the
|
17 |
+
* run function to execute the list of actions and filters.
|
18 |
+
*
|
19 |
+
* @package WP_Carousel_Free
|
20 |
+
* @subpackage WP _Carousel_Pro/includes
|
21 |
+
* @author ShapedPlugin <shapedplugin@gmail.com>
|
22 |
+
*/
|
23 |
+
class WP_Carousel_Free_Loader {
|
24 |
+
|
25 |
+
/**
|
26 |
+
* The array of actions registered with WordPress.
|
27 |
+
*
|
28 |
+
* @since 2.0.0
|
29 |
+
* @access protected
|
30 |
+
* @var array $actions The actions registered with WordPress to fire when the plugin loads.
|
31 |
+
*/
|
32 |
+
protected $actions;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* The array of filters registered with WordPress.
|
36 |
+
*
|
37 |
+
* @since 2.0.0
|
38 |
+
* @access protected
|
39 |
+
* @var array $filters The filters registered with WordPress to fire when the plugin loads.
|
40 |
+
*/
|
41 |
+
protected $filters;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* The array of shortcode registered with WordPress.
|
45 |
+
*
|
46 |
+
* @since 2.0.0
|
47 |
+
* @access protected
|
48 |
+
* @var array $shortcodes The shortcodes registered with WordPress to add shortcode to the plugin.
|
49 |
+
*/
|
50 |
+
protected $shortcodes;
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Initialize the collections used to maintain the actions and filters.
|
54 |
+
*
|
55 |
+
* @since 2.0.0
|
56 |
+
*/
|
57 |
+
public function __construct() {
|
58 |
+
|
59 |
+
$this->actions = array();
|
60 |
+
$this->filters = array();
|
61 |
+
$this->shortcodes = array();
|
62 |
+
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Add a new action to the collection to be registered with WordPress.
|
67 |
+
*
|
68 |
+
* @since 2.0.0
|
69 |
+
* @param string $hook The name of the WordPress action that is being registered.
|
70 |
+
* @param object $component A reference to the instance of the object on which the action is defined.
|
71 |
+
* @param string $callback The name of the function definition on the $component.
|
72 |
+
* @param int $priority Optional. The priority at which the function should be fired. Default is 10.
|
73 |
+
* @param int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1.
|
74 |
+
*/
|
75 |
+
public function add_action( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
|
76 |
+
$this->actions = $this->add( $this->actions, $hook, $component, $callback, $priority, $accepted_args );
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Add a new filter to the collection to be registered with WordPress.
|
81 |
+
*
|
82 |
+
* @since 2.0.0
|
83 |
+
* @param string $hook The name of the WordPress filter that is being registered.
|
84 |
+
* @param object $component A reference to the instance of the object on which the filter is defined.
|
85 |
+
* @param string $callback The name of the function definition on the $component.
|
86 |
+
* @param int $priority Optional. The priority at which the function should be fired. Default is 10.
|
87 |
+
* @param int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1.
|
88 |
+
*/
|
89 |
+
public function add_filter( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
|
90 |
+
$this->filters = $this->add( $this->filters, $hook, $component, $callback, $priority, $accepted_args );
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Add new shortcode to the collection to be registered with the WordPress.
|
95 |
+
*
|
96 |
+
* @since 2.0.0
|
97 |
+
* @param string $tag The name of the shortcode that is being registered.
|
98 |
+
* @param object $component The reference to the instance of the object on which the shortcode is defined.
|
99 |
+
* @param string $callback The name of the function definition on the $component.
|
100 |
+
* @param integer $priority Optional. The priority at which the function should be fired. Default is 10.
|
101 |
+
* @param integer $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1.
|
102 |
+
* @return void
|
103 |
+
*/
|
104 |
+
public function add_shortcode( $tag, $component, $callback, $priority = 10, $accepted_args = 1 ) {
|
105 |
+
$this->shortcodes = $this->add( $this->shortcodes, $tag, $component, $callback, $priority, $accepted_args );
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* A utility function that is used to register the actions and hooks into a single
|
110 |
+
* collection.
|
111 |
+
*
|
112 |
+
* @since 2.0.0
|
113 |
+
* @access private
|
114 |
+
* @param array $hooks The collection of hooks that is being registered (that is, actions or filters).
|
115 |
+
* @param string $hook The name of the WordPress filter that is being registered.
|
116 |
+
* @param object $component A reference to the instance of the object on which the filter is defined.
|
117 |
+
* @param string $callback The name of the function definition on the $component.
|
118 |
+
* @param int $priority The priority at which the function should be fired.
|
119 |
+
* @param int $accepted_args The number of arguments that should be passed to the $callback.
|
120 |
+
* @return array The collection of actions and filters registered with WordPress.
|
121 |
+
*/
|
122 |
+
private function add( $hooks, $hook, $component, $callback, $priority, $accepted_args ) {
|
123 |
+
|
124 |
+
$hooks[] = array(
|
125 |
+
'hook' => $hook,
|
126 |
+
'component' => $component,
|
127 |
+
'callback' => $callback,
|
128 |
+
'priority' => $priority,
|
129 |
+
'accepted_args' => $accepted_args,
|
130 |
+
);
|
131 |
+
|
132 |
+
return $hooks;
|
133 |
+
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Register the filters and actions with WordPress.
|
138 |
+
*
|
139 |
+
* @since 2.0.0
|
140 |
+
*/
|
141 |
+
public function run() {
|
142 |
+
|
143 |
+
foreach ( $this->filters as $hook ) {
|
144 |
+
add_filter( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
|
145 |
+
}
|
146 |
+
|
147 |
+
foreach ( $this->actions as $hook ) {
|
148 |
+
add_action( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
|
149 |
+
}
|
150 |
+
|
151 |
+
foreach ( $this->shortcodes as $hook ) {
|
152 |
+
add_shortcode( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
|
153 |
+
}
|
154 |
+
|
155 |
+
}
|
156 |
+
|
157 |
+
}
|
includes/class-wp-carousel-free-post-types.php
ADDED
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit; // Exit if accessed directly.
|
4 |
+
}
|
5 |
+
/**
|
6 |
+
* The file that defines the carousel post type.
|
7 |
+
*
|
8 |
+
* A class the that defines the carousel post type and make the plugins' menu.
|
9 |
+
*
|
10 |
+
* @link http://shapedplugin.com
|
11 |
+
* @since 2.0.0
|
12 |
+
*
|
13 |
+
* @package WordPress_Carousel_Pro
|
14 |
+
* @subpackage WordPress_Carousel_Pro/includes
|
15 |
+
*/
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Custom post class to register the carousel.
|
19 |
+
*/
|
20 |
+
class WP_Carousel_Free_Post_Type {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* The single instance of the class.
|
24 |
+
*
|
25 |
+
* @var self
|
26 |
+
* @since 2.0.0
|
27 |
+
*/
|
28 |
+
private static $instance;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Path to the file.
|
32 |
+
*
|
33 |
+
* @since 2.0.0
|
34 |
+
*
|
35 |
+
* @var string
|
36 |
+
*/
|
37 |
+
public $file = __FILE__;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Holds the base class object.
|
41 |
+
*
|
42 |
+
* @since 2.0.0
|
43 |
+
*
|
44 |
+
* @var object
|
45 |
+
*/
|
46 |
+
public $base;
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Allows for accessing single instance of class. Class should only be constructed once per call.
|
50 |
+
*
|
51 |
+
* @since 1.0.0
|
52 |
+
* @static
|
53 |
+
* @return self Main instance.
|
54 |
+
*/
|
55 |
+
public static function instance() {
|
56 |
+
if ( is_null( self::$instance ) ) {
|
57 |
+
self::$instance = new self();
|
58 |
+
}
|
59 |
+
return self::$instance;
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* WordPress carousel post type
|
64 |
+
*/
|
65 |
+
public function wp_carousel_post_type() {
|
66 |
+
|
67 |
+
if ( post_type_exists( 'sp_wp_carousel' ) ) {
|
68 |
+
return;
|
69 |
+
}
|
70 |
+
|
71 |
+
// Set the WordPress carousel post type labels.
|
72 |
+
$labels = apply_filters(
|
73 |
+
'sp_wp_carousel_post_type_labels',
|
74 |
+
array(
|
75 |
+
'name' => esc_html_x( 'WordPress Carousels', 'wp-carousel-free' ),
|
76 |
+
'singular_name' => esc_html_x( 'WP Carousel', 'wp-carousel-free' ),
|
77 |
+
'add_new' => esc_html__( 'Add New', 'wp-carousel-free' ),
|
78 |
+
'add_new_item' => esc_html__( 'Add New WP Carousel', 'wp-carousel-free' ),
|
79 |
+
'edit_item' => esc_html__( 'Edit WP Carousel', 'wp-carousel-free' ),
|
80 |
+
'new_item' => esc_html__( 'New WP Carousel', 'wp-carousel-free' ),
|
81 |
+
'view_item' => esc_html__( 'View WP Carousel', 'wp-carousel-free' ),
|
82 |
+
'search_items' => esc_html__( 'Search WP Carousels', 'wp-carousel-free' ),
|
83 |
+
'not_found' => esc_html__( 'No WP Carousels found.', 'wp-carousel-free' ),
|
84 |
+
'not_found_in_trash' => esc_html__( 'No WP Carousels found in trash.', 'wp-carousel-free' ),
|
85 |
+
'parent_item_colon' => esc_html__( 'Parent Item:', 'wp-carousel-free' ),
|
86 |
+
'menu_name' => esc_html__( 'WP Carousel', 'wp-carousel-free' ),
|
87 |
+
'all_items' => esc_html__( 'All Carousels', 'wp-carousel-free' ),
|
88 |
+
)
|
89 |
+
);
|
90 |
+
|
91 |
+
// Set the WordPress carousel post type arguments.
|
92 |
+
$args = apply_filters(
|
93 |
+
'sp_wp_carousel_post_type_args',
|
94 |
+
array(
|
95 |
+
'labels' => $labels,
|
96 |
+
'public' => false,
|
97 |
+
'hierarchical' => false,
|
98 |
+
'exclude_from_search' => true,
|
99 |
+
'show_ui' => true,
|
100 |
+
'show_in_admin_bar' => false,
|
101 |
+
'menu_position' => apply_filters( 'sp_wp_carousel_menu_position', 120 ),
|
102 |
+
'menu_icon' => WPCAROUSELF_URL . '/admin/js/icon32.png',
|
103 |
+
'rewrite' => false,
|
104 |
+
'query_var' => false,
|
105 |
+
'supports' => array(
|
106 |
+
'title',
|
107 |
+
),
|
108 |
+
)
|
109 |
+
);
|
110 |
+
|
111 |
+
register_post_type( 'sp_wp_carousel', $args );
|
112 |
+
}
|
113 |
+
}
|
includes/class-wp-carousel-free-shortcode.php
ADDED
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* The file that defines the plugin shortcode class.
|
5 |
+
*
|
6 |
+
* A class definition that define main carousel shortcode of the plugin.
|
7 |
+
*
|
8 |
+
* @link https://shapedplugin.com/
|
9 |
+
* @since 3.0.0
|
10 |
+
*
|
11 |
+
* @package WP_Carousel_Free
|
12 |
+
* @subpackage WP_Carousel_Free/includes
|
13 |
+
*/
|
14 |
+
|
15 |
+
/**
|
16 |
+
* The Shortcode class.
|
17 |
+
*
|
18 |
+
* This is used to define shortcode, shortcode attributes, and carousel types.
|
19 |
+
*
|
20 |
+
* @since 3.0.0
|
21 |
+
* @package WP_Carousel_Free
|
22 |
+
* @subpackage WP_Carousel_Free/includes
|
23 |
+
* @author Shamim Mia <shamhagh@gmail.com>
|
24 |
+
*/
|
25 |
+
class WP_Carousel_Free_Shortcode {
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Holds the class object.
|
29 |
+
*
|
30 |
+
* @since 2.0.0
|
31 |
+
* @var object
|
32 |
+
*/
|
33 |
+
public static $instance;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Undocumented variable
|
37 |
+
*
|
38 |
+
* @var string $post_id The post id of the carousel shortcode.
|
39 |
+
*/
|
40 |
+
public $post_id;
|
41 |
+
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Allows for accessing single instance of class. Class should only be constructed once per call.
|
45 |
+
*
|
46 |
+
* @since 2.0.0
|
47 |
+
* @static
|
48 |
+
* @return WP_Carousel_Free_Shortcode Shortcode instance.
|
49 |
+
*/
|
50 |
+
public static function instance() {
|
51 |
+
if ( is_null( self::$instance ) ) {
|
52 |
+
self::$instance = new self();
|
53 |
+
}
|
54 |
+
return self::$instance;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* A shortcode for rendering the carousel.
|
59 |
+
*
|
60 |
+
* @param integer $attributes The ID the shortcode.
|
61 |
+
* @return void
|
62 |
+
*/
|
63 |
+
public function sp_wp_carousel_shortcode( $attributes ) {
|
64 |
+
if ( empty( $attributes['id'] ) ) {
|
65 |
+
return;
|
66 |
+
}
|
67 |
+
|
68 |
+
$post_id = intval( $attributes['id'] );
|
69 |
+
|
70 |
+
// Video Carousel.
|
71 |
+
$upload_data = get_post_meta( $post_id, 'sp_wpcp_upload_options', true );
|
72 |
+
if ( empty( $upload_data ) ) {
|
73 |
+
return;
|
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'] : '';
|
83 |
+
$show_slide_image = isset( $shortcode_data['show_image'] ) ? $shortcode_data['show_image'] : '';
|
84 |
+
$show_img_title = isset( $shortcode_data['wpcp_post_title'] ) ? $shortcode_data['wpcp_post_title'] : '';
|
85 |
+
|
86 |
+
$_image_title_att = isset( $shortcode_data['_image_title_attr'] ) ? $shortcode_data['_image_title_attr'] : '';
|
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'] : '' );
|
110 |
+
|
111 |
+
$wpcp_dots = isset( $shortcode_data['wpcp_pagination'] ) ? $shortcode_data['wpcp_pagination'] : '';
|
112 |
+
switch ( $wpcp_dots ) {
|
113 |
+
case 'show':
|
114 |
+
$dots = 'true';
|
115 |
+
$dots_mobile = 'true';
|
116 |
+
break;
|
117 |
+
case 'hide':
|
118 |
+
$dots = 'false';
|
119 |
+
$dots_mobile = 'false';
|
120 |
+
break;
|
121 |
+
case 'hide_mobile':
|
122 |
+
$dots = 'true';
|
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';
|
130 |
+
$arrows_mobile = 'true';
|
131 |
+
break;
|
132 |
+
case 'hide':
|
133 |
+
$arrows = 'false';
|
134 |
+
$arrows_mobile = 'false';
|
135 |
+
break;
|
136 |
+
case 'hide_mobile':
|
137 |
+
$arrows = 'true';
|
138 |
+
$arrows_mobile = 'false';
|
139 |
+
break;
|
140 |
+
}
|
141 |
+
|
142 |
+
// Dynamic CSS.
|
143 |
+
require WPCAROUSELF_PATH . '/public/dynamic-style.php';
|
144 |
+
|
145 |
+
// Carousel Classes.
|
146 |
+
$carousel_classes = 'wpcp-carousel-section sp-wpcp-' . $post_id . ' nav-vertical-center';
|
147 |
+
if ( 'image-carousel' === $carousel_type ) {
|
148 |
+
$carousel_classes .= ' wpcp-image-carousel';
|
149 |
+
} elseif ( 'post-carousel' === $carousel_type ) {
|
150 |
+
$carousel_classes .= ' wpcp-post-carousel';
|
151 |
+
} elseif ( 'product-carousel' === $carousel_type ) {
|
152 |
+
$carousel_classes .= ' wpcp-product-carousel';
|
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();
|
163 |
+
echo $the_wpcf_dynamic_css;
|
164 |
+
require WPCAROUSELF_PATH . '/public/templates/image-carousel.php';
|
165 |
+
$html = ob_get_contents();
|
166 |
+
ob_end_clean();
|
167 |
+
|
168 |
+
return apply_filters( 'sp_wpcp_image_carousel', $html, $post_id );
|
169 |
+
}
|
170 |
+
if ( 'post-carousel' === $carousel_type ) {
|
171 |
+
ob_start();
|
172 |
+
echo $the_wpcf_dynamic_css;
|
173 |
+
require WPCAROUSELF_PATH . '/public/templates/post-carousel.php';
|
174 |
+
$html = ob_get_contents();
|
175 |
+
ob_end_clean();
|
176 |
+
|
177 |
+
return apply_filters( 'sp_wpcp_post_carousel', $html, $post_id );
|
178 |
+
}
|
179 |
+
if ( 'product-carousel' === $carousel_type ) {
|
180 |
+
ob_start();
|
181 |
+
echo $the_wpcf_dynamic_css;
|
182 |
+
require WPCAROUSELF_PATH . '/public/templates/product-carousel.php';
|
183 |
+
$html = ob_get_contents();
|
184 |
+
ob_end_clean();
|
185 |
+
|
186 |
+
return apply_filters( 'sp_wpcp_product_carousel', $html, $post_id );
|
187 |
+
}
|
188 |
+
|
189 |
+
return '';
|
190 |
+
}
|
191 |
+
}
|
includes/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden.
|
index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden.
|
languages/wp-carousel-free.pot
ADDED
@@ -0,0 +1,1051 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\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;_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
|
21 |
+
#: admin/class-wp-carousel-free-admin.php:103
|
22 |
+
msgid "Carousel updated."
|
23 |
+
msgstr ""
|
24 |
+
|
25 |
+
#: admin/class-wp-carousel-free-admin.php:104
|
26 |
+
#, php-format
|
27 |
+
msgid "Carousel restored to revision from %s"
|
28 |
+
msgstr ""
|
29 |
+
|
30 |
+
#: admin/class-wp-carousel-free-admin.php:105
|
31 |
+
msgid "Carousel published."
|
32 |
+
msgstr ""
|
33 |
+
|
34 |
+
#: admin/class-wp-carousel-free-admin.php:106
|
35 |
+
msgid "Carousel saved."
|
36 |
+
msgstr ""
|
37 |
+
|
38 |
+
#: admin/class-wp-carousel-free-admin.php:107
|
39 |
+
msgid "Carousel submitted."
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: admin/class-wp-carousel-free-admin.php:108
|
43 |
+
#, php-format
|
44 |
+
msgid "Carousel scheduled for: <strong>%1$s</strong>."
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: admin/class-wp-carousel-free-admin.php:108
|
48 |
+
msgid "M j, Y @ G:i"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: admin/class-wp-carousel-free-admin.php:109
|
52 |
+
msgid "Carousel draft updated."
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: admin/class-wp-carousel-free-admin.php:121
|
56 |
+
msgid "Carousel Title"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: admin/class-wp-carousel-free-admin.php:122
|
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 |
+
|
73 |
+
#: admin/class-wp-carousel-free-admin.php:164
|
74 |
+
msgid "Create Carousel"
|
75 |
+
msgstr ""
|
76 |
+
|
77 |
+
#: admin/class-wp-carousel-free-admin.php:194
|
78 |
+
msgid "Live Demo"
|
79 |
+
msgstr ""
|
80 |
+
|
81 |
+
#: admin/class-wp-carousel-free-admin.php:195
|
82 |
+
msgid "View WP Carousel Video Tutorials"
|
83 |
+
msgstr ""
|
84 |
+
|
85 |
+
#: admin/class-wp-carousel-free-admin.php:195
|
86 |
+
msgid "Docs & Video Tutorials"
|
87 |
+
msgstr ""
|
88 |
+
|
89 |
+
#: admin/class-wp-carousel-free-admin.php:215
|
90 |
+
#, php-format
|
91 |
+
msgid ""
|
92 |
+
"If you like <strong>WordPress Carousel</strong>, please leave us a <a href="
|
93 |
+
"\"%s\" target=\"_blank\">★★★★★</a> rating. "
|
94 |
+
"Your Review is very important to us as it helps us to grow more. "
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: admin/views/help.php:50
|
98 |
+
msgid "WP Carousel Help"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: admin/views/help.php:50
|
102 |
+
msgid "Help"
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: admin/views/help.php:66
|
106 |
+
msgid "Welcome to WordPress Carousel! "
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: admin/views/help.php:69
|
110 |
+
msgid ""
|
111 |
+
"Thank you for installing WordPress Carousel! You're now running the most "
|
112 |
+
"popular WordPress Carousel plugin.\n"
|
113 |
+
"This video will help you get started with the plugin."
|
114 |
+
msgstr ""
|
115 |
+
|
116 |
+
#: admin/views/help.php:85
|
117 |
+
msgid "Need any Assistance?"
|
118 |
+
msgstr ""
|
119 |
+
|
120 |
+
#: admin/views/help.php:86
|
121 |
+
msgid "Our Expert Support Team is always ready to help you out promptly."
|
122 |
+
msgstr ""
|
123 |
+
|
124 |
+
#: admin/views/help.php:87
|
125 |
+
msgid "Contact Support"
|
126 |
+
msgstr ""
|
127 |
+
|
128 |
+
#: admin/views/help.php:93
|
129 |
+
msgid "Looking for Documentation?"
|
130 |
+
msgstr ""
|
131 |
+
|
132 |
+
#: admin/views/help.php:94
|
133 |
+
msgid "We have detailed documentation on every aspects of WordPress Carousel."
|
134 |
+
msgstr ""
|
135 |
+
|
136 |
+
#: admin/views/help.php:95
|
137 |
+
msgid "Documentation"
|
138 |
+
msgstr ""
|
139 |
+
|
140 |
+
#: admin/views/help.php:101
|
141 |
+
msgid "Like This Plugin?"
|
142 |
+
msgstr ""
|
143 |
+
|
144 |
+
#: admin/views/help.php:102
|
145 |
+
msgid "If you like WordPress Carousel, please leave us a 5 star rating."
|
146 |
+
msgstr ""
|
147 |
+
|
148 |
+
#: admin/views/help.php:103
|
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
|
981 |
+
msgid "WordPress Carousels"
|
982 |
+
msgstr ""
|
983 |
+
|
984 |
+
#: includes/class-wp-carousel-free-post-types.php:76
|
985 |
+
#: includes/class-wp-carousel-free-post-types.php:86
|
986 |
+
msgid "WP Carousel"
|
987 |
+
msgstr ""
|
988 |
+
|
989 |
+
#: includes/class-wp-carousel-free-post-types.php:77
|
990 |
+
msgid "Add New"
|
991 |
+
msgstr ""
|
992 |
+
|
993 |
+
#: includes/class-wp-carousel-free-post-types.php:78
|
994 |
+
msgid "Add New WP Carousel"
|
995 |
+
msgstr ""
|
996 |
+
|
997 |
+
#: includes/class-wp-carousel-free-post-types.php:79
|
998 |
+
msgid "Edit WP Carousel"
|
999 |
+
msgstr ""
|
1000 |
+
|
1001 |
+
#: includes/class-wp-carousel-free-post-types.php:80
|
1002 |
+
msgid "New WP Carousel"
|
1003 |
+
msgstr ""
|
1004 |
+
|
1005 |
+
#: includes/class-wp-carousel-free-post-types.php:81
|
1006 |
+
msgid "View WP Carousel"
|
1007 |
+
msgstr ""
|
1008 |
+
|
1009 |
+
#: includes/class-wp-carousel-free-post-types.php:82
|
1010 |
+
msgid "Search WP Carousels"
|
1011 |
+
msgstr ""
|
1012 |
+
|
1013 |
+
#: includes/class-wp-carousel-free-post-types.php:83
|
1014 |
+
msgid "No WP Carousels found."
|
1015 |
+
msgstr ""
|
1016 |
+
|
1017 |
+
#: includes/class-wp-carousel-free-post-types.php:84
|
1018 |
+
msgid "No WP Carousels found in trash."
|
1019 |
+
msgstr ""
|
1020 |
+
|
1021 |
+
#: includes/class-wp-carousel-free-post-types.php:85
|
1022 |
+
msgid "Parent Item:"
|
1023 |
+
msgstr ""
|
1024 |
+
|
1025 |
+
#: includes/class-wp-carousel-free-post-types.php:87
|
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 ""
|
public/class-wp-carousel-free-public.php
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The public-facing functionality of the plugin.
|
4 |
+
*/
|
5 |
+
class WP_Carousel_Free_Public {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Script and style suffix
|
9 |
+
*
|
10 |
+
* @since 2.0.0
|
11 |
+
* @access protected
|
12 |
+
* @var string
|
13 |
+
*/
|
14 |
+
protected $suffix;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* The ID of the plugin.
|
18 |
+
*
|
19 |
+
* @since 2.0.0
|
20 |
+
* @access protected
|
21 |
+
* @var string $plugin_name The ID of this plugin
|
22 |
+
*/
|
23 |
+
protected $plugin_name;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* The version of the plugin
|
27 |
+
*
|
28 |
+
* @since 2.0.0
|
29 |
+
* @access protected
|
30 |
+
* @var string $version The current version fo the plugin.
|
31 |
+
*/
|
32 |
+
protected $version;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Initialize the class sets its properties.
|
36 |
+
*
|
37 |
+
* @since 2.0.0
|
38 |
+
* @param string $plugin_name The name of the plugin.
|
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 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Register the stylesheets for the public-facing side of the plugin.
|
49 |
+
*
|
50 |
+
* @since 2.0.0
|
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 |
+
/**
|
64 |
+
* Register the JavaScript for the public-facing side of the plugin.
|
65 |
+
*
|
66 |
+
* @since 2.0.0
|
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 |
+
}
|
public/css/ajax-loader.gif
ADDED
Binary file
|
{assets → public}/css/font-awesome.min.css
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
/*!
|
2 |
* Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
|
3 |
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
|
4 |
-
*/@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.7.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.fa-handshake-o:before{content:"\f2b5"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-o:before{content:"\f2b7"}.fa-linode:before{content:"\f2b8"}.fa-address-book:before{content:"\f2b9"}.fa-address-book-o:before{content:"\f2ba"}.fa-vcard:before,.fa-address-card:before{content:"\f2bb"}.fa-vcard-o:before,.fa-address-card-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-id-badge:before{content:"\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\f2c3"}.fa-quora:before{content:"\f2c4"}.fa-free-code-camp:before{content:"\f2c5"}.fa-telegram:before{content:"\f2c6"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\f2cb"}.fa-shower:before{content:"\f2cc"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\f2cd"}.fa-podcast:before{content:"\f2ce"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}.fa-bandcamp:before{content:"\f2d5"}.fa-grav:before{content:"\f2d6"}.fa-etsy:before{content:"\f2d7"}.fa-imdb:before{content:"\f2d8"}.fa-ravelry:before{content:"\f2d9"}.fa-eercast:before{content:"\f2da"}.fa-microchip:before{content:"\f2db"}.fa-snowflake-o:before{content:"\f2dc"}.fa-superpowers:before{content:"\f2dd"}.fa-wpexplorer:before{content:"\f2de"}.fa-meetup:before{content:"\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}
|
1 |
/*!
|
2 |
* Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
|
3 |
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
|
4 |
+
*/@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.7.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.fa-handshake-o:before{content:"\f2b5"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-o:before{content:"\f2b7"}.fa-linode:before{content:"\f2b8"}.fa-address-book:before{content:"\f2b9"}.fa-address-book-o:before{content:"\f2ba"}.fa-vcard:before,.fa-address-card:before{content:"\f2bb"}.fa-vcard-o:before,.fa-address-card-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-id-badge:before{content:"\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\f2c3"}.fa-quora:before{content:"\f2c4"}.fa-free-code-camp:before{content:"\f2c5"}.fa-telegram:before{content:"\f2c6"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\f2cb"}.fa-shower:before{content:"\f2cc"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\f2cd"}.fa-podcast:before{content:"\f2ce"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}.fa-bandcamp:before{content:"\f2d5"}.fa-grav:before{content:"\f2d6"}.fa-etsy:before{content:"\f2d7"}.fa-imdb:before{content:"\f2d8"}.fa-ravelry:before{content:"\f2d9"}.fa-eercast:before{content:"\f2da"}.fa-microchip:before{content:"\f2db"}.fa-snowflake-o:before{content:"\f2dc"}.fa-superpowers:before{content:"\f2dd"}.fa-wpexplorer:before{content:"\f2de"}.fa-meetup:before{content:"\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}
|
{assets → public}/css/slick.css
RENAMED
@@ -55,6 +55,8 @@
|
|
55 |
left: 0;
|
56 |
|
57 |
display: block;
|
|
|
|
|
58 |
}
|
59 |
.slick-track:before,
|
60 |
.slick-track:after
|
@@ -115,3 +117,8 @@
|
|
115 |
.slick-arrow.slick-hidden {
|
116 |
display: none;
|
117 |
}
|
|
|
|
|
|
|
|
|
|
55 |
left: 0;
|
56 |
|
57 |
display: block;
|
58 |
+
margin-left: auto;
|
59 |
+
margin-right: auto;
|
60 |
}
|
61 |
.slick-track:before,
|
62 |
.slick-track:after
|
117 |
.slick-arrow.slick-hidden {
|
118 |
display: none;
|
119 |
}
|
120 |
+
|
121 |
+
/* Slick Theme */
|
122 |
+
.slick-loading .slick-list {
|
123 |
+
background: #fff url('./ajax-loader.gif') center center no-repeat;
|
124 |
+
}
|
public/css/wp-carousel-free-public.css
ADDED
@@ -0,0 +1,368 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*--------------------------------------------------------------
|
2 |
+
## Image Carousel
|
3 |
+
--------------------------------------------------------------*/
|
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 {
|
17 |
+
overflow: hidden;
|
18 |
+
display: inline-block;
|
19 |
+
vertical-align: middle;
|
20 |
+
float: none;
|
21 |
+
}
|
22 |
+
.wpcp-all-captions li {
|
23 |
+
list-style: none;
|
24 |
+
margin: 0;
|
25 |
+
}
|
26 |
+
.wpcp-carousel-section ul,
|
27 |
+
.wpcp-carousel-section p,
|
28 |
+
.wpcp-image-carousel .wpcp-single-item .wpcp-all-captions h2 {
|
29 |
+
margin: 0;
|
30 |
+
}
|
31 |
+
|
32 |
+
.wpcp-carousel-section.wpcp-video-carousel .wpcp-single-item .wpcp-slide-image {
|
33 |
+
position: relative;
|
34 |
+
}
|
35 |
+
.wpcp-carousel-section.wpcp-content-carousel .wpcp-single-item{
|
36 |
+
padding-left: 15px;
|
37 |
+
padding-right: 15px;
|
38 |
+
}
|
39 |
+
.wpcp-carousel-section .wpcp-single-item img {
|
40 |
+
margin: 0 auto;
|
41 |
+
max-width: 100%;
|
42 |
+
box-shadow: none;
|
43 |
+
}
|
44 |
+
.wpcp-carousel-section.wpcp-image-carousel .wpcp-single-item .wpcp-all-captions {
|
45 |
+
padding: 10px 20px 15px;
|
46 |
+
}
|
47 |
+
.wpcp-carousel-section .wpcp-single-item .wpcp-all-captions .wpcp-image-description{
|
48 |
+
margin: 6px 0 0;
|
49 |
+
}
|
50 |
+
.wpcp-carousel-section .wpcp-single-item .wpcp-slide-image a:focus{
|
51 |
+
outline: none;
|
52 |
+
}
|
53 |
+
.wpcp-carousel-section .slick-slide:focus {
|
54 |
+
outline: none;
|
55 |
+
}
|
56 |
+
.wpcp-carousel-section .slick-slide {
|
57 |
+
margin-right: 20px;
|
58 |
+
float: none;
|
59 |
+
display: inline-block;
|
60 |
+
vertical-align: middle;
|
61 |
+
}
|
62 |
+
.wpcp-carousel-section .slick-list {
|
63 |
+
margin-right: -20px;
|
64 |
+
}
|
65 |
+
.wpcp-carousel-section a, .wpcp-carousel-section a:hover,
|
66 |
+
.wpcp-carousel-section .wpcp-all-captions a {
|
67 |
+
text-decoration: none;
|
68 |
+
}
|
69 |
+
|
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;
|
81 |
+
}
|
82 |
+
|
83 |
+
.wpcp-post-carousel .wpcp-single-item .wpcp-all-captions h2 {
|
84 |
+
font-size: 16px;
|
85 |
+
font-weight: 600;
|
86 |
+
margin: 0 0 10px;
|
87 |
+
}
|
88 |
+
|
89 |
+
.wpcp-single-item h2 a {
|
90 |
+
color: #444;
|
91 |
+
text-decoration: none;
|
92 |
+
}
|
93 |
+
|
94 |
+
.wpcp-post-carousel .wpcp-single-item .wpcp-all-captions .post-categories {
|
95 |
+
margin: 0 0 7px;
|
96 |
+
padding: 0;
|
97 |
+
display: block;
|
98 |
+
}
|
99 |
+
.wpcp-post-carousel .wpcp-all-captions p {
|
100 |
+
margin-bottom: 15px;
|
101 |
+
}
|
102 |
+
|
103 |
+
.wpcp_readmore {
|
104 |
+
border: 1px solid;
|
105 |
+
display: inline-block;
|
106 |
+
background: #22afba;
|
107 |
+
margin: 0 0 14px;
|
108 |
+
line-height: 32px;
|
109 |
+
padding: 5px 14px;
|
110 |
+
font-weight: 600;
|
111 |
+
}
|
112 |
+
|
113 |
+
.wpcp_readmore, .wpcp_readmore:focus, .wpcp_readmore:hover {
|
114 |
+
color: #fff;
|
115 |
+
}
|
116 |
+
.wpcp-single-item .wpcp-all-captions .wpcp-post-meta {
|
117 |
+
margin: 0 0 20px;
|
118 |
+
padding: 0;
|
119 |
+
}
|
120 |
+
.wpcp-post-carousel .wpcp-post-meta li {
|
121 |
+
display: inline-block;
|
122 |
+
margin-right: 5px;
|
123 |
+
}
|
124 |
+
|
125 |
+
.wpcp-post-carousel .wpcp-post-meta li:last-child {
|
126 |
+
margin-right: 0;
|
127 |
+
}
|
128 |
+
|
129 |
+
.wpcp-post-meta li, .wpcp-post-meta li a {
|
130 |
+
color: #999;
|
131 |
+
}
|
132 |
+
|
133 |
+
.wpcp-carousel-section.detail-on-right .wpcp-single-item .wpcp-slide-image,.wpcp-carousel-section.detail-on-right .wpcp-single-item .wpcp-all-captions {
|
134 |
+
float: left;
|
135 |
+
width: 50%;
|
136 |
+
box-sizing: border-box;
|
137 |
+
}
|
138 |
+
|
139 |
+
.wpcp-carousel-section.detail-with-overlay .wpcp-all-captions {
|
140 |
+
position: absolute;
|
141 |
+
top: 0;
|
142 |
+
bottom: 0;
|
143 |
+
left: 0;
|
144 |
+
right: 0;
|
145 |
+
display: flex;
|
146 |
+
flex-direction: column;
|
147 |
+
justify-content: center;
|
148 |
+
height: 100%;
|
149 |
+
}
|
150 |
+
|
151 |
+
.wpcp-carousel-section.detail-with-overlay.overlay-lower .wpcp-all-captions {
|
152 |
+
top: auto;
|
153 |
+
display: block;
|
154 |
+
height: auto;
|
155 |
+
}
|
156 |
+
|
157 |
+
/*
|
158 |
+
Overlay visible on hover.
|
159 |
+
*/
|
160 |
+
.wpcp-carousel-section.detail-with-overlay.overlay-on-hover .wpcp-all-captions {
|
161 |
+
visibility: hidden;
|
162 |
+
opacity: 0;
|
163 |
+
transition: visibility 0.3s linear, opacity 0.3s linear;
|
164 |
+
}
|
165 |
+
|
166 |
+
.wpcp-carousel-section.detail-with-overlay.overlay-on-hover .wpcp-single-item:hover .wpcp-all-captions {
|
167 |
+
visibility: visible;
|
168 |
+
opacity: 1;
|
169 |
+
}
|
170 |
+
|
171 |
+
.wpcp-carousel-section.detail-with-overlay .wpcp-single-item {
|
172 |
+
position: relative;
|
173 |
+
}
|
174 |
+
|
175 |
+
.wpcp-carousel-section .wpcp-single-item:focus {
|
176 |
+
outline: none;
|
177 |
+
}
|
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;
|
187 |
+
text-align: center;
|
188 |
+
}
|
189 |
+
.wpcp-product-carousel .wpcp-single-item .wpcp-product-title {
|
190 |
+
margin: 0;
|
191 |
+
font-size: 16px;
|
192 |
+
line-height: 23px;
|
193 |
+
font-weight: 600;
|
194 |
+
}
|
195 |
+
.wpcp-product-price {
|
196 |
+
margin-top:5px;
|
197 |
+
}
|
198 |
+
.wpcp-carousel-section.wpcp-product-carousel .wpcp-cart-button {
|
199 |
+
margin-top: 12px;
|
200 |
+
}
|
201 |
+
.wpcp-carousel-section.wpcp-product-carousel .wpcp-cart-button a.button {
|
202 |
+
background: #ebebeb;
|
203 |
+
color: #545454;
|
204 |
+
border: 1px solid #d1d1d1;
|
205 |
+
font-weight: 500;
|
206 |
+
padding: 0 20px;
|
207 |
+
line-height: 38px;
|
208 |
+
display: inline-block;
|
209 |
+
font-size: 14px;
|
210 |
+
}
|
211 |
+
|
212 |
+
.wpcp-carousel-section.wpcp-product-carousel .wpcp-all-captions .wpcp-cart-button a.add_to_cart_button.added {
|
213 |
+
display: none;
|
214 |
+
}
|
215 |
+
|
216 |
+
.wpcp-carousel-section.wpcp-product-carousel .wpcp-all-captions .wpcp-cart-button .added_to_cart {
|
217 |
+
font-size: 100%;
|
218 |
+
margin: 0;
|
219 |
+
line-height: 38px;
|
220 |
+
cursor: pointer;
|
221 |
+
position: relative;
|
222 |
+
text-decoration: none;
|
223 |
+
overflow: visible;
|
224 |
+
padding: 0 20px;
|
225 |
+
font-weight: 600;
|
226 |
+
border-radius: 3px;
|
227 |
+
left: auto;
|
228 |
+
color: #515151;
|
229 |
+
background-color: #ebe9eb;
|
230 |
+
border: 0;
|
231 |
+
display: inline-block;
|
232 |
+
background-image: none;
|
233 |
+
box-shadow: none;
|
234 |
+
text-shadow: none;
|
235 |
+
border: 1px solid;
|
236 |
+
}
|
237 |
+
|
238 |
+
.wpcp-carousel-section.wpcp-product-carousel .wpcp-all-captions .wpcp-cart-button a.button:hover{
|
239 |
+
background: #3f3f3f;
|
240 |
+
border-color: #d1d1d1;
|
241 |
+
color: #fff;
|
242 |
+
}
|
243 |
+
|
244 |
+
.wpcp-carousel-section.wpcp-product-carousel .wpcp-all-captions .wpcp-cart-button .wc-forward::after {
|
245 |
+
-webkit-font-smoothing: antialiased;
|
246 |
+
-moz-osx-font-smoothing: grayscale;
|
247 |
+
display: inline-block;
|
248 |
+
font-style: normal;
|
249 |
+
font-variant: normal;
|
250 |
+
font-weight: normal;
|
251 |
+
line-height: 1;
|
252 |
+
vertical-align: -.125em;
|
253 |
+
font: normal normal normal 14px/1 FontAwesome;
|
254 |
+
font-weight: 900;
|
255 |
+
line-height: inherit;
|
256 |
+
vertical-align: baseline;
|
257 |
+
content: "\f178";
|
258 |
+
margin-left: 0.5407911001em;
|
259 |
+
}
|
260 |
+
.wpcp-carousel-section .woocommerce-product-rating .star-rating {
|
261 |
+
margin: 4px auto;
|
262 |
+
float: none;
|
263 |
+
}
|
264 |
+
.wpcp-product-price span{
|
265 |
+
font-weight: 700;
|
266 |
+
font-size: 14px;
|
267 |
+
}
|
268 |
+
/*--------------------------------------------------------------
|
269 |
+
## Carousel Navigation
|
270 |
+
--------------------------------------------------------------*/
|
271 |
+
.wpcp-carousel-section .slick-prev:before, .wpcp-carousel-section .slick-next:before, .wpcp-carousel-section .slick-prev:after, .wpcp-carousel-section .slick-next:after {
|
272 |
+
display: none;
|
273 |
+
}
|
274 |
+
|
275 |
+
.wpcp-carousel-section .slick-prev {
|
276 |
+
left: 0;
|
277 |
+
}
|
278 |
+
|
279 |
+
.wpcp-carousel-section .slick-next {
|
280 |
+
right: 0;
|
281 |
+
}
|
282 |
+
|
283 |
+
.wpcp-carousel-section .slick-prev, .wpcp-carousel-section .slick-next {
|
284 |
+
width: 30px;
|
285 |
+
height: 30px;
|
286 |
+
line-height: 30px;
|
287 |
+
position: absolute;
|
288 |
+
z-index: 22;
|
289 |
+
left: auto;
|
290 |
+
top: auto;
|
291 |
+
font-size: 30px;
|
292 |
+
-webkit-transition: ease all 0.3s;
|
293 |
+
-moz-transition: ease all 0.3s;
|
294 |
+
-ms-transition: ease all 0.3s;
|
295 |
+
-o-transition: ease all 0.3s;
|
296 |
+
transition: ease all 0.3s;
|
297 |
+
margin-top: -15px;
|
298 |
+
cursor: pointer;
|
299 |
+
}
|
300 |
+
|
301 |
+
.wpcp-carousel-section.nav-vertical-center {
|
302 |
+
padding: 0 25px;
|
303 |
+
}
|
304 |
+
.wpcp-carousel-section .slick-prev i, .wpcp-carousel-section .slick-next i, .wpcp-carousel-section .slick-prev, .wpcp-carousel-section .slick-next {
|
305 |
+
line-height: 28px;
|
306 |
+
font-family: fontawesome;
|
307 |
+
color: #000;
|
308 |
+
}
|
309 |
+
.wpcp-carousel-section.nav-vertical-center .slick-next, .wpcp-carousel-section.nav-vertical-center .slick-prev {
|
310 |
+
top: 50%;
|
311 |
+
}
|
312 |
+
|
313 |
+
.wpcp-carousel-section.nav-vertical-center .slick-prev {
|
314 |
+
left: 0;
|
315 |
+
}
|
316 |
+
.wpcp-carousel-section.nav-vertical-center .slick-next,
|
317 |
+
.wpcp-carousel-section.nav-vertical-center .slick-prev {
|
318 |
+
margin-top: -15px;
|
319 |
+
}
|
320 |
+
.wpcp-carousel-section.nav-vertical-center.slick-dotted .slick-next,
|
321 |
+
.wpcp-carousel-section.nav-vertical-center.slick-dotted .slick-prev {
|
322 |
+
margin-top: -35px;
|
323 |
+
}
|
324 |
+
.wpcp-carousel-section.nav-vertical-center .slick-next {
|
325 |
+
right: 0;
|
326 |
+
text-align: right;
|
327 |
+
}
|
328 |
+
|
329 |
+
/*--------------------------------------------------------------
|
330 |
+
## Carousel Pagination Dots
|
331 |
+
--------------------------------------------------------------*/
|
332 |
+
.wpcp-carousel-section ul.slick-dots {
|
333 |
+
list-style: none;
|
334 |
+
padding: 0 !important;
|
335 |
+
margin: 0;
|
336 |
+
text-align: center;
|
337 |
+
margin-top: 18px;
|
338 |
+
position: relative;
|
339 |
+
}
|
340 |
+
.wpcp-carousel-section ul.slick-dots li {
|
341 |
+
display: inline;
|
342 |
+
margin: 0;
|
343 |
+
}
|
344 |
+
.wpcp-carousel-section ul.slick-dots li button {
|
345 |
+
background-color: #cccccc;
|
346 |
+
border: 0 solid;
|
347 |
+
border-radius: 50%;
|
348 |
+
font-size: 0;
|
349 |
+
margin: 3px;
|
350 |
+
overflow: hidden;
|
351 |
+
padding: 0;
|
352 |
+
text-indent: -999px;
|
353 |
+
width: 12px;
|
354 |
+
height: 12px;
|
355 |
+
cursor: pointer;
|
356 |
+
}
|
357 |
+
.wpcp-carousel-section ul.slick-dots,
|
358 |
+
.wpcp-carousel-section ul.slick-dots li,
|
359 |
+
.wpcp-carousel-section ul.slick-dots li button {
|
360 |
+
line-height: 1 !important;
|
361 |
+
}
|
362 |
+
.wpcp-carousel-section ul.slick-dots li button:focus {
|
363 |
+
outline: none;
|
364 |
+
}
|
365 |
+
|
366 |
+
.wpcp-carousel-section ul.slick-dots li.slick-active button {
|
367 |
+
background-color: #666;
|
368 |
+
}
|
public/dynamic-style.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The style file for the WP Carousel pro.
|
4 |
+
*
|
5 |
+
* @since 3.0.0
|
6 |
+
* @package WP Carousel
|
7 |
+
* @subpackage wp-carousel-free/public
|
8 |
+
*/
|
9 |
+
|
10 |
+
$section_title_dynamic_css = '';
|
11 |
+
if ( $section_title ) {
|
12 |
+
$section_title_dynamic_css .= '
|
13 |
+
.wpcp-wrapper-' . $post_id . ' .sp-wpcpro-section-title {
|
14 |
+
margin-bottom: ' . $section_title_margin . 'px;
|
15 |
+
}';
|
16 |
+
}
|
17 |
+
|
18 |
+
$slide_border = isset( $shortcode_data['wpcp_slide_border'] ) ? $shortcode_data['wpcp_slide_border'] : '';
|
19 |
+
$custom_css = sp_get_option( 'wpcp_custom_css' );
|
20 |
+
|
21 |
+
if ( 'product-carousel' == $carousel_type ) {
|
22 |
+
$wpcp_product_css = '.wpcp-carousel-section.sp-wpcp-' . $post_id . '.wpcp-product-carousel .wpcp-slide-image {
|
23 |
+
border: ' . $slide_border['width'] . 'px ' . $slide_border['style'] . ' ' . $slide_border['color'] . ';
|
24 |
+
}';
|
25 |
+
} else {
|
26 |
+
$wpcp_product_css = '.wpcp-carousel-section.sp-wpcp-' . $post_id . ' .wpcp-single-item {
|
27 |
+
border: ' . $slide_border['width'] . 'px ' . $slide_border['style'] . ' ' . $slide_border['color'] . ';
|
28 |
+
}';
|
29 |
+
}
|
30 |
+
|
31 |
+
// Nav Style.
|
32 |
+
$nav_dynamic_style = '';
|
33 |
+
$nav_dynamic_style .= '
|
34 |
+
.wpcp-carousel-section.sp-wpcp-' . $post_id . ' .slick-prev,
|
35 |
+
.wpcp-carousel-section.sp-wpcp-' . $post_id . ' .slick-next,
|
36 |
+
.wpcp-carousel-section.sp-wpcp-' . $post_id . ' .slick-prev:hover,
|
37 |
+
.wpcp-carousel-section.sp-wpcp-' . $post_id . ' .slick-next:hover {
|
38 |
+
background: none;
|
39 |
+
border: none;
|
40 |
+
font-size: 30px;
|
41 |
+
}
|
42 |
+
.wpcp-carousel-section.sp-wpcp-' . $post_id . ' .slick-prev i,
|
43 |
+
.wpcp-carousel-section.sp-wpcp-' . $post_id . ' .slick-next i {
|
44 |
+
color: ' . $shortcode_data['wpcp_nav_colors']['color1'] . ';
|
45 |
+
}
|
46 |
+
.wpcp-carousel-section.sp-wpcp-' . $post_id . ' .slick-prev i:hover,
|
47 |
+
.wpcp-carousel-section.sp-wpcp-' . $post_id . ' .slick-next i:hover {
|
48 |
+
color: ' . $shortcode_data['wpcp_nav_colors']['color2'] . ';
|
49 |
+
}';
|
50 |
+
|
51 |
+
/**
|
52 |
+
* The Dynamic Style CSS.
|
53 |
+
*/
|
54 |
+
$the_wpcf_dynamic_css = '<style>';
|
55 |
+
$the_wpcf_dynamic_css .= $wpcp_product_css;
|
56 |
+
$the_wpcf_dynamic_css .= $section_title_dynamic_css;
|
57 |
+
$the_wpcf_dynamic_css .= $nav_dynamic_style;
|
58 |
+
$the_wpcf_dynamic_css .= '
|
59 |
+
.wpcp-carousel-section.sp-wpcp-' . $post_id . ' ul.slick-dots li button {
|
60 |
+
background-color: ' . $shortcode_data['wpcp_pagination_color']['color1'] . ';
|
61 |
+
}
|
62 |
+
.wpcp-carousel-section.sp-wpcp-' . $post_id . ' ul.slick-dots li.slick-active button {
|
63 |
+
background-color: ' . $shortcode_data['wpcp_pagination_color']['color2'] . ';
|
64 |
+
}';
|
65 |
+
if ( 'hide_mobile' === $wpcp_arrows ) {
|
66 |
+
$the_wpcf_dynamic_css .= '
|
67 |
+
@media screen and (max-width: 479px) {
|
68 |
+
.wpcp-carousel-section.nav-vertical-center {
|
69 |
+
padding: 0;
|
70 |
+
}
|
71 |
+
}';
|
72 |
+
}
|
73 |
+
$the_wpcf_dynamic_css .= $custom_css;
|
74 |
+
$the_wpcf_dynamic_css .= '</style>';
|
{assets → public}/fonts/FontAwesome.otf
RENAMED
File without changes
|
{assets → public}/fonts/fontawesome-webfont.eot
RENAMED
File without changes
|
{assets → public}/fonts/fontawesome-webfont.svg
RENAMED
File without changes
|
{assets → public}/fonts/fontawesome-webfont.ttf
RENAMED
File without changes
|
{assets → public}/fonts/fontawesome-webfont.woff
RENAMED
File without changes
|
{assets → public}/fonts/fontawesome-webfont.woff2
RENAMED
File without changes
|
public/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden.
|
public/js/slick.js
ADDED
@@ -0,0 +1,3037 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
_ _ _ _
|
3 |
+
___| (_) ___| | __ (_)___
|
4 |
+
/ __| | |/ __| |/ / | / __|
|
5 |
+
\__ \ | | (__| < _ | \__ \
|
6 |
+
|___/_|_|\___|_|\_(_)/ |___/
|
7 |
+
|__/
|
8 |
+
|
9 |
+
Version: 1.9.0
|
10 |
+
Author: Ken Wheeler
|
11 |
+
Website: http://kenwheeler.github.io
|
12 |
+
Docs: http://kenwheeler.github.io/slick
|
13 |
+
Repo: http://github.com/kenwheeler/slick
|
14 |
+
Issues: http://github.com/kenwheeler/slick/issues
|
15 |
+
|
16 |
+
*/
|
17 |
+
/* global window, document, define, jQuery, setInterval, clearInterval */
|
18 |
+
;(function(factory) {
|
19 |
+
'use strict';
|
20 |
+
if (typeof define === 'function' && define.amd) {
|
21 |
+
define(['jquery'], factory);
|
22 |
+
} else if (typeof exports !== 'undefined') {
|
23 |
+
module.exports = factory(require('jquery'));
|
24 |
+
} else {
|
25 |
+
factory(jQuery);
|
26 |
+
}
|
27 |
+
|
28 |
+
}(function($) {
|
29 |
+
'use strict';
|
30 |
+
var Slick = window.Slick || {};
|
31 |
+
|
32 |
+
Slick = (function() {
|
33 |
+
|
34 |
+
var instanceUid = 0;
|
35 |
+
|
36 |
+
function Slick(element, settings) {
|
37 |
+
|
38 |
+
var _ = this, dataSettings;
|
39 |
+
|
40 |
+
_.defaults = {
|
41 |
+
accessibility: true,
|
42 |
+
adaptiveHeight: false,
|
43 |
+
appendArrows: $(element),
|
44 |
+
appendDots: $(element),
|
45 |
+
arrows: true,
|
46 |
+
asNavFor: null,
|
47 |
+
prevArrow: '<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',
|
48 |
+
nextArrow: '<button class="slick-next" aria-label="Next" type="button">Next</button>',
|
49 |
+
autoplay: false,
|
50 |
+
autoplaySpeed: 3000,
|
51 |
+
centerMode: false,
|
52 |
+
centerPadding: '50px',
|
53 |
+
cssEase: 'ease',
|
54 |
+
customPaging: function(slider, i) {
|
55 |
+
return $('<button type="button" />').text(i + 1);
|
56 |
+
},
|
57 |
+
dots: false,
|
58 |
+
dotsClass: 'slick-dots',
|
59 |
+
draggable: true,
|
60 |
+
easing: 'linear',
|
61 |
+
edgeFriction: 0.35,
|
62 |
+
fade: false,
|
63 |
+
focusOnSelect: false,
|
64 |
+
focusOnChange: false,
|
65 |
+
infinite: true,
|
66 |
+
initialSlide: 0,
|
67 |
+
lazyLoad: 'ondemand',
|
68 |
+
mobileFirst: false,
|
69 |
+
pauseOnHover: true,
|
70 |
+
pauseOnFocus: true,
|
71 |
+
pauseOnDotsHover: false,
|
72 |
+
respondTo: 'window',
|
73 |
+
responsive: null,
|
74 |
+
rows: 1,
|
75 |
+
rtl: false,
|
76 |
+
slide: '',
|
77 |
+
slidesPerRow: 1,
|
78 |
+
slidesToShow: 1,
|
79 |
+
slidesToScroll: 1,
|
80 |
+
speed: 500,
|
81 |
+
swipe: true,
|
82 |
+
swipeToSlide: false,
|
83 |
+
touchMove: true,
|
84 |
+
touchThreshold: 5,
|
85 |
+
useCSS: true,
|
86 |
+
useTransform: true,
|
87 |
+
variableWidth: false,
|
88 |
+
vertical: false,
|
89 |
+
verticalSwiping: false,
|
90 |
+
waitForAnimate: true,
|
91 |
+
zIndex: 1000
|
92 |
+
};
|
93 |
+
|
94 |
+
_.initials = {
|
95 |
+
animating: false,
|
96 |
+
dragging: false,
|
97 |
+
autoPlayTimer: null,
|
98 |
+
currentDirection: 0,
|
99 |
+
currentLeft: null,
|
100 |
+
currentSlide: 0,
|
101 |
+
direction: 1,
|
102 |
+
$dots: null,
|
103 |
+
listWidth: null,
|
104 |
+
listHeight: null,
|
105 |
+
loadIndex: 0,
|
106 |
+
$nextArrow: null,
|
107 |
+
$prevArrow: null,
|
108 |
+
scrolling: false,
|
109 |
+
slideCount: null,
|
110 |
+
slideWidth: null,
|
111 |
+
$slideTrack: null,
|
112 |
+
$slides: null,
|
113 |
+
sliding: false,
|
114 |
+
slideOffset: 0,
|
115 |
+
swipeLeft: null,
|
116 |
+
swiping: false,
|
117 |
+
$list: null,
|
118 |
+
touchObject: {},
|
119 |
+
transformsEnabled: false,
|
120 |
+
unslicked: false
|
121 |
+
};
|
122 |
+
|
123 |
+
$.extend(_, _.initials);
|
124 |
+
|
125 |
+
_.activeBreakpoint = null;
|
126 |
+
_.animType = null;
|
127 |
+
_.animProp = null;
|
128 |
+
_.breakpoints = [];
|
129 |
+
_.breakpointSettings = [];
|
130 |
+
_.cssTransitions = false;
|
131 |
+
_.focussed = false;
|
132 |
+
_.interrupted = false;
|
133 |
+
_.hidden = 'hidden';
|
134 |
+
_.paused = true;
|
135 |
+
_.positionProp = null;
|
136 |
+
_.respondTo = null;
|
137 |
+
_.rowCount = 1;
|
138 |
+
_.shouldClick = true;
|
139 |
+
_.$slider = $(element);
|
140 |
+
_.$slidesCache = null;
|
141 |
+
_.transformType = null;
|
142 |
+
_.transitionType = null;
|
143 |
+
_.visibilityChange = 'visibilitychange';
|
144 |
+
_.windowWidth = 0;
|
145 |
+
_.windowTimer = null;
|
146 |
+
|
147 |
+
dataSettings = $(element).data('slick') || {};
|
148 |
+
|
149 |
+
_.options = $.extend({}, _.defaults, settings, dataSettings);
|
150 |
+
|
151 |
+
_.currentSlide = _.options.initialSlide;
|
152 |
+
|
153 |
+
_.originalSettings = _.options;
|
154 |
+
|
155 |
+
if (typeof document.mozHidden !== 'undefined') {
|
156 |
+
_.hidden = 'mozHidden';
|
157 |
+
_.visibilityChange = 'mozvisibilitychange';
|
158 |
+
} else if (typeof document.webkitHidden !== 'undefined') {
|
159 |
+
_.hidden = 'webkitHidden';
|
160 |
+
_.visibilityChange = 'webkitvisibilitychange';
|
161 |
+
}
|
162 |
+
|
163 |
+
_.autoPlay = $.proxy(_.autoPlay, _);
|
164 |
+
_.autoPlayClear = $.proxy(_.autoPlayClear, _);
|
165 |
+
_.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
|
166 |
+
_.changeSlide = $.proxy(_.changeSlide, _);
|
167 |
+
_.clickHandler = $.proxy(_.clickHandler, _);
|
168 |
+
_.selectHandler = $.proxy(_.selectHandler, _);
|
169 |
+
_.setPosition = $.proxy(_.setPosition, _);
|
170 |
+
_.swipeHandler = $.proxy(_.swipeHandler, _);
|
171 |
+
_.dragHandler = $.proxy(_.dragHandler, _);
|
172 |
+
_.keyHandler = $.proxy(_.keyHandler, _);
|
173 |
+
|
174 |
+
_.instanceUid = instanceUid++;
|
175 |
+
|
176 |
+
// A simple way to check for HTML strings
|
177 |
+
// Strict HTML recognition (must start with <)
|
178 |
+
// Extracted from jQuery v1.11 source
|
179 |
+
_.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;
|
180 |
+
|
181 |
+
|
182 |
+
_.registerBreakpoints();
|
183 |
+
_.init(true);
|
184 |
+
|
185 |
+
}
|
186 |
+
|
187 |
+
return Slick;
|
188 |
+
|
189 |
+
}());
|
190 |
+
|
191 |
+
Slick.prototype.activateADA = function() {
|
192 |
+
var _ = this;
|
193 |
+
|
194 |
+
_.$slideTrack.find('.slick-active').attr({
|
195 |
+
'aria-hidden': 'false'
|
196 |
+
}).find('a, input, button, select').attr({
|
197 |
+
'tabindex': '0'
|
198 |
+
});
|
199 |
+
|
200 |
+
};
|
201 |
+
|
202 |
+
Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) {
|
203 |
+
|
204 |
+
var _ = this;
|
205 |
+
|
206 |
+
if (typeof(index) === 'boolean') {
|
207 |
+
addBefore = index;
|
208 |
+
index = null;
|
209 |
+
} else if (index < 0 || (index >= _.slideCount)) {
|
210 |
+
return false;
|
211 |
+
}
|
212 |
+
|
213 |
+
_.unload();
|
214 |
+
|
215 |
+
if (typeof(index) === 'number') {
|
216 |
+
if (index === 0 && _.$slides.length === 0) {
|
217 |
+
$(markup).appendTo(_.$slideTrack);
|
218 |
+
} else if (addBefore) {
|
219 |
+
$(markup).insertBefore(_.$slides.eq(index));
|
220 |
+
} else {
|
221 |
+
$(markup).insertAfter(_.$slides.eq(index));
|
222 |
+
}
|
223 |
+
} else {
|
224 |
+
if (addBefore === true) {
|
225 |
+
$(markup).prependTo(_.$slideTrack);
|
226 |
+
} else {
|
227 |
+
$(markup).appendTo(_.$slideTrack);
|
228 |
+
}
|
229 |
+
}
|
230 |
+
|
231 |
+
_.$slides = _.$slideTrack.children(this.options.slide);
|
232 |
+
|
233 |
+
_.$slideTrack.children(this.options.slide).detach();
|
234 |
+
|
235 |
+
_.$slideTrack.append(_.$slides);
|
236 |
+
|
237 |
+
_.$slides.each(function(index, element) {
|
238 |
+
$(element).attr('data-slick-index', index);
|
239 |
+
});
|
240 |
+
|
241 |
+
_.$slidesCache = _.$slides;
|
242 |
+
|
243 |
+
_.reinit();
|
244 |
+
|
245 |
+
};
|
246 |
+
|
247 |
+
Slick.prototype.animateHeight = function() {
|
248 |
+
var _ = this;
|
249 |
+
if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
|
250 |
+
var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
|
251 |
+
_.$list.animate({
|
252 |
+
height: targetHeight
|
253 |
+
}, _.options.speed);
|
254 |
+
}
|
255 |
+
};
|
256 |
+
|
257 |
+
Slick.prototype.animateSlide = function(targetLeft, callback) {
|
258 |
+
|
259 |
+
var animProps = {},
|
260 |
+
_ = this;
|
261 |
+
|
262 |
+
_.animateHeight();
|
263 |
+
|
264 |
+
if (_.options.rtl === true && _.options.vertical === false) {
|
265 |
+
targetLeft = -targetLeft;
|
266 |
+
}
|
267 |
+
if (_.transformsEnabled === false) {
|
268 |
+
if (_.options.vertical === false) {
|
269 |
+
_.$slideTrack.animate({
|
270 |
+
left: targetLeft
|
271 |
+
}, _.options.speed, _.options.easing, callback);
|
272 |
+
} else {
|
273 |
+
_.$slideTrack.animate({
|
274 |
+
top: targetLeft
|
275 |
+
}, _.options.speed, _.options.easing, callback);
|
276 |
+
}
|
277 |
+
|
278 |
+
} else {
|
279 |
+
|
280 |
+
if (_.cssTransitions === false) {
|
281 |
+
if (_.options.rtl === true) {
|
282 |
+
_.currentLeft = -(_.currentLeft);
|
283 |
+
}
|
284 |
+
$({
|
285 |
+
animStart: _.currentLeft
|
286 |
+
}).animate({
|
287 |
+
animStart: targetLeft
|
288 |
+
}, {
|
289 |
+
duration: _.options.speed,
|
290 |
+
easing: _.options.easing,
|
291 |
+
step: function(now) {
|
292 |
+
now = Math.ceil(now);
|
293 |
+
if (_.options.vertical === false) {
|
294 |
+
animProps[_.animType] = 'translate(' +
|
295 |
+
now + 'px, 0px)';
|
296 |
+
_.$slideTrack.css(animProps);
|
297 |
+
} else {
|
298 |
+
animProps[_.animType] = 'translate(0px,' +
|
299 |
+
now + 'px)';
|
300 |
+
_.$slideTrack.css(animProps);
|
301 |
+
}
|
302 |
+
},
|
303 |
+
complete: function() {
|
304 |
+
if (callback) {
|
305 |
+
callback.call();
|
306 |
+
}
|
307 |
+
}
|
308 |
+
});
|
309 |
+
|
310 |
+
} else {
|
311 |
+
|
312 |
+
_.applyTransition();
|
313 |
+
targetLeft = Math.ceil(targetLeft);
|
314 |
+
|
315 |
+
if (_.options.vertical === false) {
|
316 |
+
animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
|
317 |
+
} else {
|
318 |
+
animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
|
319 |
+
}
|
320 |
+
_.$slideTrack.css(animProps);
|
321 |
+
|
322 |
+
if (callback) {
|
323 |
+
setTimeout(function() {
|
324 |
+
|
325 |
+
_.disableTransition();
|
326 |
+
|
327 |
+
callback.call();
|
328 |
+
}, _.options.speed);
|
329 |
+
}
|
330 |
+
|
331 |
+
}
|
332 |
+
|
333 |
+
}
|
334 |
+
|
335 |
+
};
|
336 |
+
|
337 |
+
Slick.prototype.getNavTarget = function() {
|
338 |
+
|
339 |
+
var _ = this,
|
340 |
+
asNavFor = _.options.asNavFor;
|
341 |
+
|
342 |
+
if ( asNavFor && asNavFor !== null ) {
|
343 |
+
asNavFor = $(asNavFor).not(_.$slider);
|
344 |
+
}
|
345 |
+
|
346 |
+
return asNavFor;
|
347 |
+
|
348 |
+
};
|
349 |
+
|
350 |
+
Slick.prototype.asNavFor = function(index) {
|
351 |
+
|
352 |
+
var _ = this,
|
353 |
+
asNavFor = _.getNavTarget();
|
354 |
+
|
355 |
+
if ( asNavFor !== null && typeof asNavFor === 'object' ) {
|
356 |
+
asNavFor.each(function() {
|
357 |
+
var target = $(this).slick('getSlick');
|
358 |
+
if(!target.unslicked) {
|
359 |
+
target.slideHandler(index, true);
|
360 |
+
}
|
361 |
+
});
|
362 |
+
}
|
363 |
+
|
364 |
+
};
|
365 |
+
|
366 |
+
Slick.prototype.applyTransition = function(slide) {
|
367 |
+
|
368 |
+
var _ = this,
|
369 |
+
transition = {};
|
370 |
+
|
371 |
+
if (_.options.fade === false) {
|
372 |
+
transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
|
373 |
+
} else {
|
374 |
+
transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
|
375 |
+
}
|
376 |
+
|
377 |
+
if (_.options.fade === false) {
|
378 |
+
_.$slideTrack.css(transition);
|
379 |
+
} else {
|
380 |
+
_.$slides.eq(slide).css(transition);
|
381 |
+
}
|
382 |
+
|
383 |
+
};
|
384 |
+
|
385 |
+
Slick.prototype.autoPlay = function() {
|
386 |
+
|
387 |
+
var _ = this;
|
388 |
+
|
389 |
+
_.autoPlayClear();
|
390 |
+
|
391 |
+
if ( _.slideCount > _.options.slidesToShow ) {
|
392 |
+
_.autoPlayTimer = setInterval( _.autoPlayIterator, _.options.autoplaySpeed );
|
393 |
+
}
|
394 |
+
|
395 |
+
};
|
396 |
+
|
397 |
+
Slick.prototype.autoPlayClear = function() {
|
398 |
+
|
399 |
+
var _ = this;
|
400 |
+
|
401 |
+
if (_.autoPlayTimer) {
|
402 |
+
clearInterval(_.autoPlayTimer);
|
403 |
+
}
|
404 |
+
|
405 |
+
};
|
406 |
+
|
407 |
+
Slick.prototype.autoPlayIterator = function() {
|
408 |
+
|
409 |
+
var _ = this,
|
410 |
+
slideTo = _.currentSlide + _.options.slidesToScroll;
|
411 |
+
|
412 |
+
if ( !_.paused && !_.interrupted && !_.focussed ) {
|
413 |
+
|
414 |
+
if ( _.options.infinite === false ) {
|
415 |
+
|
416 |
+
if ( _.direction === 1 && ( _.currentSlide + 1 ) === ( _.slideCount - 1 )) {
|
417 |
+
_.direction = 0;
|
418 |
+
}
|
419 |
+
|
420 |
+
else if ( _.direction === 0 ) {
|
421 |
+
|
422 |
+
slideTo = _.currentSlide - _.options.slidesToScroll;
|
423 |
+
|
424 |
+
if ( _.currentSlide - 1 === 0 ) {
|
425 |
+
_.direction = 1;
|
426 |
+
}
|
427 |
+
|
428 |
+
}
|
429 |
+
|
430 |
+
}
|
431 |
+
|
432 |
+
_.slideHandler( slideTo );
|
433 |
+
|
434 |
+
}
|
435 |
+
|
436 |
+
};
|
437 |
+
|
438 |
+
Slick.prototype.buildArrows = function() {
|
439 |
+
|
440 |
+
var _ = this;
|
441 |
+
|
442 |
+
if (_.options.arrows === true ) {
|
443 |
+
|
444 |
+
_.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');
|
445 |
+
_.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');
|
446 |
+
|
447 |
+
if( _.slideCount > _.options.slidesToShow ) {
|
448 |
+
|
449 |
+
_.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
|
450 |
+
_.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
|
451 |
+
|
452 |
+
if (_.htmlExpr.test(_.options.prevArrow)) {
|
453 |
+
_.$prevArrow.prependTo(_.options.appendArrows);
|
454 |
+
}
|
455 |
+
|
456 |
+
if (_.htmlExpr.test(_.options.nextArrow)) {
|
457 |
+
_.$nextArrow.appendTo(_.options.appendArrows);
|
458 |
+
}
|
459 |
+
|
460 |
+
if (_.options.infinite !== true) {
|
461 |
+
_.$prevArrow
|
462 |
+
.addClass('slick-disabled')
|
463 |
+
.attr('aria-disabled', 'true');
|
464 |
+
}
|
465 |
+
|
466 |
+
} else {
|
467 |
+
|
468 |
+
_.$prevArrow.add( _.$nextArrow )
|
469 |
+
|
470 |
+
.addClass('slick-hidden')
|
471 |
+
.attr({
|
472 |
+
'aria-disabled': 'true',
|
473 |
+
'tabindex': '-1'
|
474 |
+
});
|
475 |
+
|
476 |
+
}
|
477 |
+
|
478 |
+
}
|
479 |
+
|
480 |
+
};
|
481 |
+
|
482 |
+
Slick.prototype.buildDots = function() {
|
483 |
+
|
484 |
+
var _ = this,
|
485 |
+
i, dot;
|
486 |
+
|
487 |
+
if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
|
488 |
+
|
489 |
+
_.$slider.addClass('slick-dotted');
|
490 |
+
|
491 |
+
dot = $('<ul />').addClass(_.options.dotsClass);
|
492 |
+
|
493 |
+
for (i = 0; i <= _.getDotCount(); i += 1) {
|
494 |
+
dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));
|
495 |
+
}
|
496 |
+
|
497 |
+
_.$dots = dot.appendTo(_.options.appendDots);
|
498 |
+
|
499 |
+
_.$dots.find('li').first().addClass('slick-active');
|
500 |
+
|
501 |
+
}
|
502 |
+
|
503 |
+
};
|
504 |
+
|
505 |
+
Slick.prototype.buildOut = function() {
|
506 |
+
|
507 |
+
var _ = this;
|
508 |
+
|
509 |
+
_.$slides =
|
510 |
+
_.$slider
|
511 |
+
.children( _.options.slide + ':not(.slick-cloned)')
|
512 |
+
.addClass('slick-slide');
|
513 |
+
|
514 |
+
_.slideCount = _.$slides.length;
|
515 |
+
|
516 |
+
_.$slides.each(function(index, element) {
|
517 |
+
$(element)
|
518 |
+
.attr('data-slick-index', index)
|
519 |
+
.data('originalStyling', $(element).attr('style') || '');
|
520 |
+
});
|
521 |
+
|
522 |
+
_.$slider.addClass('slick-slider');
|
523 |
+
|
524 |
+
_.$slideTrack = (_.slideCount === 0) ?
|
525 |
+
$('<div class="slick-track"/>').appendTo(_.$slider) :
|
526 |
+
_.$slides.wrapAll('<div class="slick-track"/>').parent();
|
527 |
+
|
528 |
+
_.$list = _.$slideTrack.wrap(
|
529 |
+
'<div class="slick-list"/>').parent();
|
530 |
+
_.$slideTrack.css('opacity', 0);
|
531 |
+
|
532 |
+
if (_.options.centerMode === true || _.options.swipeToSlide === true) {
|
533 |
+
_.options.slidesToScroll = 1;
|
534 |
+
}
|
535 |
+
|
536 |
+
$('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');
|
537 |
+
|
538 |
+
_.setupInfinite();
|
539 |
+
|
540 |
+
_.buildArrows();
|
541 |
+
|
542 |
+
_.buildDots();
|
543 |
+
|
544 |
+
_.updateDots();
|
545 |
+
|
546 |
+
|
547 |
+
_.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
|
548 |
+
|
549 |
+
if (_.options.draggable === true) {
|
550 |
+
_.$list.addClass('draggable');
|
551 |
+
}
|
552 |
+
|
553 |
+
};
|
554 |
+
|
555 |
+
Slick.prototype.buildRows = function() {
|
556 |
+
|
557 |
+
var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection;
|
558 |
+
|
559 |
+
newSlides = document.createDocumentFragment();
|
560 |
+
originalSlides = _.$slider.children();
|
561 |
+
|
562 |
+
if(_.options.rows > 0) {
|
563 |
+
|
564 |
+
slidesPerSection = _.options.slidesPerRow * _.options.rows;
|
565 |
+
numOfSlides = Math.ceil(
|
566 |
+
originalSlides.length / slidesPerSection
|
567 |
+
);
|
568 |
+
|
569 |
+
for(a = 0; a < numOfSlides; a++){
|
570 |
+
var slide = document.createElement('div');
|
571 |
+
for(b = 0; b < _.options.rows; b++) {
|
572 |
+
var row = document.createElement('div');
|
573 |
+
for(c = 0; c < _.options.slidesPerRow; c++) {
|
574 |
+
var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));
|
575 |
+
if (originalSlides.get(target)) {
|
576 |
+
row.appendChild(originalSlides.get(target));
|
577 |
+
}
|
578 |
+
}
|
579 |
+
slide.appendChild(row);
|
580 |
+
}
|
581 |
+
newSlides.appendChild(slide);
|
582 |
+
}
|
583 |
+
|
584 |
+
_.$slider.empty().append(newSlides);
|
585 |
+
_.$slider.children().children().children()
|
586 |
+
.css({
|
587 |
+
'width':(100 / _.options.slidesPerRow) + '%',
|
588 |
+
'display': 'inline-block'
|
589 |
+
});
|
590 |
+
|
591 |
+
}
|
592 |
+
|
593 |
+
};
|
594 |
+
|
595 |
+
Slick.prototype.checkResponsive = function(initial, forceUpdate) {
|
596 |
+
|
597 |
+
var _ = this,
|
598 |
+
breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;
|
599 |
+
var sliderWidth = _.$slider.width();
|
600 |
+
var windowWidth = window.innerWidth || $(window).width();
|
601 |
+
|
602 |
+
if (_.respondTo === 'window') {
|
603 |
+
respondToWidth = windowWidth;
|
604 |
+
} else if (_.respondTo === 'slider') {
|
605 |
+
respondToWidth = sliderWidth;
|
606 |
+
} else if (_.respondTo === 'min') {
|
607 |
+
respondToWidth = Math.min(windowWidth, sliderWidth);
|
608 |
+
}
|
609 |
+
|
610 |
+
if ( _.options.responsive &&
|
611 |
+
_.options.responsive.length &&
|
612 |
+
_.options.responsive !== null) {
|
613 |
+
|
614 |
+
targetBreakpoint = null;
|
615 |
+
|
616 |
+
for (breakpoint in _.breakpoints) {
|
617 |
+
if (_.breakpoints.hasOwnProperty(breakpoint)) {
|
618 |
+
if (_.originalSettings.mobileFirst === false) {
|
619 |
+
if (respondToWidth < _.breakpoints[breakpoint]) {
|
620 |
+
targetBreakpoint = _.breakpoints[breakpoint];
|
621 |
+
}
|
622 |
+
} else {
|
623 |
+
if (respondToWidth > _.breakpoints[breakpoint]) {
|
624 |
+
targetBreakpoint = _.breakpoints[breakpoint];
|
625 |
+
}
|
626 |
+
}
|
627 |
+
}
|
628 |
+
}
|
629 |
+
|
630 |
+
if (targetBreakpoint !== null) {
|
631 |
+
if (_.activeBreakpoint !== null) {
|
632 |
+
if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {
|
633 |
+
_.activeBreakpoint =
|
634 |
+
targetBreakpoint;
|
635 |
+
if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
|
636 |
+
_.unslick(targetBreakpoint);
|
637 |
+
} else {
|
638 |
+
_.options = $.extend({}, _.originalSettings,
|
639 |
+
_.breakpointSettings[
|
640 |
+
targetBreakpoint]);
|
641 |
+
if (initial === true) {
|
642 |
+
_.currentSlide = _.options.initialSlide;
|
643 |
+
}
|
644 |
+
_.refresh(initial);
|
645 |
+
}
|
646 |
+
triggerBreakpoint = targetBreakpoint;
|
647 |
+
}
|
648 |
+
} else {
|
649 |
+
_.activeBreakpoint = targetBreakpoint;
|
650 |
+
if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
|
651 |
+
_.unslick(targetBreakpoint);
|
652 |
+
} else {
|
653 |
+
_.options = $.extend({}, _.originalSettings,
|
654 |
+
_.breakpointSettings[
|
655 |
+
targetBreakpoint]);
|
656 |
+
if (initial === true) {
|
657 |
+
_.currentSlide = _.options.initialSlide;
|
658 |
+
}
|
659 |
+
_.refresh(initial);
|
660 |
+
}
|
661 |
+
triggerBreakpoint = targetBreakpoint;
|
662 |
+
}
|
663 |
+
} else {
|
664 |
+
if (_.activeBreakpoint !== null) {
|
665 |
+
_.activeBreakpoint = null;
|
666 |
+
_.options = _.originalSettings;
|
667 |
+
if (initial === true) {
|
668 |
+
_.currentSlide = _.options.initialSlide;
|
669 |
+
}
|
670 |
+
_.refresh(initial);
|
671 |
+
triggerBreakpoint = targetBreakpoint;
|
672 |
+
}
|
673 |
+
}
|
674 |
+
|
675 |
+
// only trigger breakpoints during an actual break. not on initialize.
|
676 |
+
if( !initial && triggerBreakpoint !== false ) {
|
677 |
+
_.$slider.trigger('breakpoint', [_, triggerBreakpoint]);
|
678 |
+
}
|
679 |
+
}
|
680 |
+
|
681 |
+
};
|
682 |
+
|
683 |
+
Slick.prototype.changeSlide = function(event, dontAnimate) {
|
684 |
+
|
685 |
+
var _ = this,
|
686 |
+
$target = $(event.currentTarget),
|
687 |
+
indexOffset, slideOffset, unevenOffset;
|
688 |
+
|
689 |
+
// If target is a link, prevent default action.
|
690 |
+
if($target.is('a')) {
|
691 |
+
event.preventDefault();
|
692 |
+
}
|
693 |
+
|
694 |
+
// If target is not the <li> element (ie: a child), find the <li>.
|
695 |
+
if(!$target.is('li')) {
|
696 |
+
$target = $target.closest('li');
|
697 |
+
}
|
698 |
+
|
699 |
+
unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);
|
700 |
+
indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;
|
701 |
+
|
702 |
+
switch (event.data.message) {
|
703 |
+
|
704 |
+
case 'previous':
|
705 |
+
slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;
|
706 |
+
if (_.slideCount > _.options.slidesToShow) {
|
707 |
+
_.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);
|
708 |
+
}
|
709 |
+
break;
|
710 |
+
|
711 |
+
case 'next':
|
712 |
+
slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;
|
713 |
+
if (_.slideCount > _.options.slidesToShow) {
|
714 |
+
_.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);
|
715 |
+
}
|
716 |
+
break;
|
717 |
+
|
718 |
+
case 'index':
|
719 |
+
var index = event.data.index === 0 ? 0 :
|
720 |
+
event.data.index || $target.index() * _.options.slidesToScroll;
|
721 |
+
|
722 |
+
_.slideHandler(_.checkNavigable(index), false, dontAnimate);
|
723 |
+
$target.children().trigger('focus');
|
724 |
+
break;
|
725 |
+
|
726 |
+
default:
|
727 |
+
return;
|
728 |
+
}
|
729 |
+
|
730 |
+
};
|
731 |
+
|
732 |
+
Slick.prototype.checkNavigable = function(index) {
|
733 |
+
|
734 |
+
var _ = this,
|
735 |
+
navigables, prevNavigable;
|
736 |
+
|
737 |
+
navigables = _.getNavigableIndexes();
|
738 |
+
prevNavigable = 0;
|
739 |
+
if (index > navigables[navigables.length - 1]) {
|
740 |
+
index = navigables[navigables.length - 1];
|
741 |
+
} else {
|
742 |
+
for (var n in navigables) {
|
743 |
+
if (index < navigables[n]) {
|
744 |
+
index = prevNavigable;
|
745 |
+
break;
|
746 |
+
}
|
747 |
+
prevNavigable = navigables[n];
|
748 |
+
}
|
749 |
+
}
|
750 |
+
|
751 |
+
return index;
|
752 |
+
};
|
753 |
+
|
754 |
+
Slick.prototype.cleanUpEvents = function() {
|
755 |
+
|
756 |
+
var _ = this;
|
757 |
+
|
758 |
+
if (_.options.dots && _.$dots !== null) {
|
759 |
+
|
760 |
+
$('li', _.$dots)
|
761 |
+
.off('click.slick', _.changeSlide)
|
762 |
+
.off('mouseenter.slick', $.proxy(_.interrupt, _, true))
|
763 |
+
.off('mouseleave.slick', $.proxy(_.interrupt, _, false));
|
764 |
+
|
765 |
+
if (_.options.accessibility === true) {
|
766 |
+
_.$dots.off('keydown.slick', _.keyHandler);
|
767 |
+
}
|
768 |
+
}
|
769 |
+
|
770 |
+
_.$slider.off('focus.slick blur.slick');
|
771 |
+
|
772 |
+
if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
|
773 |
+
_.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
|
774 |
+
_.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);
|
775 |
+
|
776 |
+
if (_.options.accessibility === true) {
|
777 |
+
_.$prevArrow && _.$prevArrow.off('keydown.slick', _.keyHandler);
|
778 |
+
_.$nextArrow && _.$nextArrow.off('keydown.slick', _.keyHandler);
|
779 |
+
}
|
780 |
+
}
|
781 |
+
|
782 |
+
_.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
|
783 |
+
_.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
|
784 |
+
_.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
|
785 |
+
_.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);
|
786 |
+
|
787 |
+
_.$list.off('click.slick', _.clickHandler);
|
788 |
+
|
789 |
+
$(document).off(_.visibilityChange, _.visibility);
|
790 |
+
|
791 |
+
_.cleanUpSlideEvents();
|
792 |
+
|
793 |
+
if (_.options.accessibility === true) {
|
794 |
+
_.$list.off('keydown.slick', _.keyHandler);
|
795 |
+
}
|
796 |
+
|
797 |
+
if (_.options.focusOnSelect === true) {
|
798 |
+
$(_.$slideTrack).children().off('click.slick', _.selectHandler);
|
799 |
+
}
|
800 |
+
|
801 |
+
$(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);
|
802 |
+
|
803 |
+
$(window).off('resize.slick.slick-' + _.instanceUid, _.resize);
|
804 |
+
|
805 |
+
$('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);
|
806 |
+
|
807 |
+
$(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);
|
808 |
+
|
809 |
+
};
|
810 |
+
|
811 |
+
Slick.prototype.cleanUpSlideEvents = function() {
|
812 |
+
|
813 |
+
var _ = this;
|
814 |
+
|
815 |
+
_.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));
|
816 |
+
_.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));
|
817 |
+
|
818 |
+
};
|
819 |
+
|
820 |
+
Slick.prototype.cleanUpRows = function() {
|
821 |
+
|
822 |
+
var _ = this, originalSlides;
|
823 |
+
|
824 |
+
if(_.options.rows > 0) {
|
825 |
+
originalSlides = _.$slides.children().children();
|
826 |
+
// originalSlides.removeAttr('style'); // ShapedPlugin (was removing inline style in mobile view.)
|
827 |
+
_.$slider.empty().append(originalSlides);
|
828 |
+
}
|
829 |
+
|
830 |
+
};
|
831 |
+
|
832 |
+
Slick.prototype.clickHandler = function(event) {
|
833 |
+
|
834 |
+
var _ = this;
|
835 |
+
|
836 |
+
if (_.shouldClick === false) {
|
837 |
+
event.stopImmediatePropagation();
|
838 |
+
event.stopPropagation();
|
839 |
+
event.preventDefault();
|
840 |
+
}
|
841 |
+
|
842 |
+
};
|
843 |
+
|
844 |
+
Slick.prototype.destroy = function(refresh) {
|
845 |
+
|
846 |
+
var _ = this;
|
847 |
+
|
848 |
+
_.autoPlayClear();
|
849 |
+
|
850 |
+
_.touchObject = {};
|
851 |
+
|
852 |
+
_.cleanUpEvents();
|
853 |
+
|
854 |
+
$('.slick-cloned', _.$slider).detach();
|
855 |
+
|
856 |
+
if (_.$dots) {
|
857 |
+
_.$dots.remove();
|
858 |
+
}
|
859 |
+
|
860 |
+
if ( _.$prevArrow && _.$prevArrow.length ) {
|
861 |
+
|
862 |
+
_.$prevArrow
|
863 |
+
.removeClass('slick-disabled slick-arrow slick-hidden')
|
864 |
+
.removeAttr('aria-hidden aria-disabled tabindex')
|
865 |
+
.css('display','');
|
866 |
+
|
867 |
+
if ( _.htmlExpr.test( _.options.prevArrow )) {
|
868 |
+
_.$prevArrow.remove();
|
869 |
+
}
|
870 |
+
}
|
871 |
+
|
872 |
+
if ( _.$nextArrow && _.$nextArrow.length ) {
|
873 |
+
|
874 |
+
_.$nextArrow
|
875 |
+
.removeClass('slick-disabled slick-arrow slick-hidden')
|
876 |
+
.removeAttr('aria-hidden aria-disabled tabindex')
|
877 |
+
.css('display','');
|
878 |
+
|
879 |
+
if ( _.htmlExpr.test( _.options.nextArrow )) {
|
880 |
+
_.$nextArrow.remove();
|
881 |
+
}
|
882 |
+
}
|
883 |
+
|
884 |
+
|
885 |
+
if (_.$slides) {
|
886 |
+
|
887 |
+
_.$slides
|
888 |
+
.removeClass('slick-slide slick-active slick-center slick-visible slick-current')
|
889 |
+
.removeAttr('aria-hidden')
|
890 |
+
.removeAttr('data-slick-index')
|
891 |
+
.each(function(){
|
892 |
+
$(this).attr('style', $(this).data('originalStyling'));
|
893 |
+
});
|
894 |
+
|
895 |
+
_.$slideTrack.children(this.options.slide).detach();
|
896 |
+
|
897 |
+
_.$slideTrack.detach();
|
898 |
+
|
899 |
+
_.$list.detach();
|
900 |
+
|
901 |
+
_.$slider.append(_.$slides);
|
902 |
+
}
|
903 |
+
|
904 |
+
_.cleanUpRows();
|
905 |
+
|
906 |
+
_.$slider.removeClass('slick-slider');
|
907 |
+
_.$slider.removeClass('slick-initialized');
|
908 |
+
_.$slider.removeClass('slick-dotted');
|
909 |
+
|
910 |
+
_.unslicked = true;
|
911 |
+
|
912 |
+
if(!refresh) {
|
913 |
+
_.$slider.trigger('destroy', [_]);
|
914 |
+
}
|
915 |
+
|
916 |
+
};
|
917 |
+
|
918 |
+
Slick.prototype.disableTransition = function(slide) {
|
919 |
+
|
920 |
+
var _ = this,
|
921 |
+
transition = {};
|
922 |
+
|
923 |
+
transition[_.transitionType] = '';
|
924 |
+
|
925 |
+
if (_.options.fade === false) {
|
926 |
+
_.$slideTrack.css(transition);
|
927 |
+
} else {
|
928 |
+
_.$slides.eq(slide).css(transition);
|
929 |
+
}
|
930 |
+
|
931 |
+
};
|
932 |
+
|
933 |
+
Slick.prototype.fadeSlide = function(slideIndex, callback) {
|
934 |
+
|
935 |
+
var _ = this;
|
936 |
+
|
937 |
+
if (_.cssTransitions === false) {
|
938 |
+
|
939 |
+
_.$slides.eq(slideIndex).css({
|
940 |
+
zIndex: _.options.zIndex
|
941 |
+
});
|
942 |
+
|
943 |
+
_.$slides.eq(slideIndex).animate({
|
944 |
+
opacity: 1
|
945 |
+
}, _.options.speed, _.options.easing, callback);
|
946 |
+
|
947 |
+
} else {
|
948 |
+
|
949 |
+
_.applyTransition(slideIndex);
|
950 |
+
|
951 |
+
_.$slides.eq(slideIndex).css({
|
952 |
+
opacity: 1,
|
953 |
+
zIndex: _.options.zIndex
|
954 |
+
});
|
955 |
+
|
956 |
+
if (callback) {
|
957 |
+
setTimeout(function() {
|
958 |
+
|
959 |
+
_.disableTransition(slideIndex);
|
960 |
+
|
961 |
+
callback.call();
|
962 |
+
}, _.options.speed);
|
963 |
+
}
|
964 |
+
|
965 |
+
}
|
966 |
+
|
967 |
+
};
|
968 |
+
|
969 |
+
Slick.prototype.fadeSlideOut = function(slideIndex) {
|
970 |
+
|
971 |
+
var _ = this;
|
972 |
+
|
973 |
+
if (_.cssTransitions === false) {
|
974 |
+
|
975 |
+
_.$slides.eq(slideIndex).animate({
|
976 |
+
opacity: 0,
|
977 |
+
zIndex: _.options.zIndex - 2
|
978 |
+
}, _.options.speed, _.options.easing);
|
979 |
+
|
980 |
+
} else {
|
981 |
+
|
982 |
+
_.applyTransition(slideIndex);
|
983 |
+
|
984 |
+
_.$slides.eq(slideIndex).css({
|
985 |
+
opacity: 0,
|
986 |
+
zIndex: _.options.zIndex - 2
|
987 |
+
});
|
988 |
+
|
989 |
+
}
|
990 |
+
|
991 |
+
};
|
992 |
+
|
993 |
+
Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) {
|
994 |
+
|
995 |
+
var _ = this;
|
996 |
+
|
997 |
+
if (filter !== null) {
|
998 |
+
|
999 |
+
_.$slidesCache = _.$slides;
|
1000 |
+
|
1001 |
+
_.unload();
|
1002 |
+
|
1003 |
+
_.$slideTrack.children(this.options.slide).detach();
|
1004 |
+
|
1005 |
+
_.$slidesCache.filter(filter).appendTo(_.$slideTrack);
|
1006 |
+
|
1007 |
+
_.reinit();
|
1008 |
+
|
1009 |
+
}
|
1010 |
+
|
1011 |
+
};
|
1012 |
+
|
1013 |
+
Slick.prototype.focusHandler = function() {
|
1014 |
+
|
1015 |
+
var _ = this;
|
1016 |
+
|
1017 |
+
// If any child element receives focus within the slider we need to pause the autoplay
|
1018 |
+
_.$slider
|
1019 |
+
.off('focus.slick blur.slick')
|
1020 |
+
.on(
|
1021 |
+
'focus.slick',
|
1022 |
+
'*',
|
1023 |
+
function(event) {
|
1024 |
+
var $sf = $(this);
|
1025 |
+
|
1026 |
+
setTimeout(function() {
|
1027 |
+
if( _.options.pauseOnFocus ) {
|
1028 |
+
if ($sf.is(':focus')) {
|
1029 |
+
_.focussed = true;
|
1030 |
+
_.autoPlay();
|
1031 |
+
}
|
1032 |
+
}
|
1033 |
+
}, 0);
|
1034 |
+
}
|
1035 |
+
).on(
|
1036 |
+
'blur.slick',
|
1037 |
+
'*',
|
1038 |
+
function(event) {
|
1039 |
+
var $sf = $(this);
|
1040 |
+
|
1041 |
+
// When a blur occurs on any elements within the slider we become unfocused
|
1042 |
+
if( _.options.pauseOnFocus ) {
|
1043 |
+
_.focussed = false;
|
1044 |
+
_.autoPlay();
|
1045 |
+
}
|
1046 |
+
}
|
1047 |
+
);
|
1048 |
+
};
|
1049 |
+
|
1050 |
+
Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() {
|
1051 |
+
|
1052 |
+
var _ = this;
|
1053 |
+
return _.currentSlide;
|
1054 |
+
|
1055 |
+
};
|
1056 |
+
|
1057 |
+
Slick.prototype.getDotCount = function() {
|
1058 |
+
|
1059 |
+
var _ = this;
|
1060 |
+
|
1061 |
+
var breakPoint = 0;
|
1062 |
+
var counter = 0;
|
1063 |
+
var pagerQty = 0;
|
1064 |
+
|
1065 |
+
if (_.options.infinite === true) {
|
1066 |
+
if (_.slideCount <= _.options.slidesToShow) {
|
1067 |
+
++pagerQty;
|
1068 |
+
} else {
|
1069 |
+
while (breakPoint < _.slideCount) {
|
1070 |
+
++pagerQty;
|
1071 |
+
breakPoint = counter + _.options.slidesToScroll;
|
1072 |
+
counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
|
1073 |
+
}
|
1074 |
+
}
|
1075 |
+
} else if (_.options.centerMode === true) {
|
1076 |
+
pagerQty = _.slideCount;
|
1077 |
+
} else if(!_.options.asNavFor) {
|
1078 |
+
pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);
|
1079 |
+
}else {
|
1080 |
+
while (breakPoint < _.slideCount) {
|
1081 |
+
++pagerQty;
|
1082 |
+
breakPoint = counter + _.options.slidesToScroll;
|
1083 |
+
counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
|
1084 |
+
}
|
1085 |
+
}
|
1086 |
+
|
1087 |
+
return pagerQty - 1;
|
1088 |
+
|
1089 |
+
};
|
1090 |
+
|
1091 |
+
Slick.prototype.getLeft = function(slideIndex) {
|
1092 |
+
|
1093 |
+
var _ = this,
|
1094 |
+
targetLeft,
|
1095 |
+
verticalHeight,
|
1096 |
+
verticalOffset = 0,
|
1097 |
+
targetSlide,
|
1098 |
+
coef;
|
1099 |
+
|
1100 |
+
_.slideOffset = 0;
|
1101 |
+
verticalHeight = _.$slides.first().outerHeight(true);
|
1102 |
+
|
1103 |
+
if (_.options.infinite === true) {
|
1104 |
+
if (_.slideCount > _.options.slidesToShow) {
|
1105 |
+
_.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
|
1106 |
+
coef = -1
|
1107 |
+
|
1108 |
+
if (_.options.vertical === true && _.options.centerMode === true) {
|
1109 |
+
if (_.options.slidesToShow === 2) {
|
1110 |
+
coef = -1.5;
|
1111 |
+
} else if (_.options.slidesToShow === 1) {
|
1112 |
+
coef = -2
|
1113 |
+
}
|
1114 |
+
}
|
1115 |
+
verticalOffset = (verticalHeight * _.options.slidesToShow) * coef;
|
1116 |
+
}
|
1117 |
+
if (_.slideCount % _.options.slidesToScroll !== 0) {
|
1118 |
+
if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
|
1119 |
+
if (slideIndex > _.slideCount) {
|
1120 |
+
_.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;
|
1121 |
+
verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
|
1122 |
+
} else {
|
1123 |
+
_.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
|
1124 |
+
verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
|
1125 |
+
}
|
1126 |
+
}
|
1127 |
+
}
|
1128 |
+
} else {
|
1129 |
+
if (slideIndex + _.options.slidesToShow > _.slideCount) {
|
1130 |
+
_.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
|
1131 |
+
verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;
|
1132 |
+
}
|
1133 |
+
}
|
1134 |
+
|
1135 |
+
if (_.slideCount <= _.options.slidesToShow) {
|
1136 |
+
_.slideOffset = 0;
|
1137 |
+
verticalOffset = 0;
|
1138 |
+
}
|
1139 |
+
|
1140 |
+
if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) {
|
1141 |
+
_.slideOffset = ((_.slideWidth * Math.floor(_.options.slidesToShow)) / 2) - ((_.slideWidth * _.slideCount) / 2);
|
1142 |
+
} else if (_.options.centerMode === true && _.options.infinite === true) {
|
1143 |
+
_.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
|
1144 |
+
} else if (_.options.centerMode === true) {
|
1145 |
+
_.slideOffset = 0;
|
1146 |
+
_.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
|
1147 |
+
}
|
1148 |
+
|
1149 |
+
if (_.options.vertical === false) {
|
1150 |
+
targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
|
1151 |
+
} else {
|
1152 |
+
targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
|
1153 |
+
}
|
1154 |
+
|
1155 |
+
if (_.options.variableWidth === true) {
|
1156 |
+
|
1157 |
+
if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
|
1158 |
+
targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
|
1159 |
+
} else {
|
1160 |
+
targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
|
1161 |
+
}
|
1162 |
+
|
1163 |
+
if (_.options.rtl === true) {
|
1164 |
+
if (targetSlide[0]) {
|
1165 |
+
targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
|
1166 |
+
} else {
|
1167 |
+
targetLeft = 0;
|
1168 |
+
}
|
1169 |
+
} else {
|
1170 |
+
targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
|
1171 |
+
}
|
1172 |
+
|
1173 |
+
if (_.options.centerMode === true) {
|
1174 |
+
if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
|
1175 |
+
targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
|
1176 |
+
} else {
|
1177 |
+
targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
|
1178 |
+
}
|
1179 |
+
|
1180 |
+
if (_.options.rtl === true) {
|
1181 |
+
if (targetSlide[0]) {
|
1182 |
+
targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
|
1183 |
+
} else {
|
1184 |
+
targetLeft = 0;
|
1185 |
+
}
|
1186 |
+
} else {
|
1187 |
+
targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
|
1188 |
+
}
|
1189 |
+
|
1190 |
+
targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
|
1191 |
+
}
|
1192 |
+
}
|
1193 |
+
|
1194 |
+
return targetLeft;
|
1195 |
+
|
1196 |
+
};
|
1197 |
+
|
1198 |
+
Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) {
|
1199 |
+
|
1200 |
+
var _ = this;
|
1201 |
+
|
1202 |
+
return _.options[option];
|
1203 |
+
|
1204 |
+
};
|
1205 |
+
|
1206 |
+
Slick.prototype.getNavigableIndexes = function() {
|
1207 |
+
|
1208 |
+
var _ = this,
|
1209 |
+
breakPoint = 0,
|
1210 |
+
counter = 0,
|
1211 |
+
indexes = [],
|
1212 |
+
max;
|
1213 |
+
|
1214 |
+
if (_.options.infinite === false) {
|
1215 |
+
max = _.slideCount;
|
1216 |
+
} else {
|
1217 |
+
breakPoint = _.options.slidesToScroll * -1;
|
1218 |
+
counter = _.options.slidesToScroll * -1;
|
1219 |
+
max = _.slideCount * 2;
|
1220 |
+
}
|
1221 |
+
|
1222 |
+
while (breakPoint < max) {
|
1223 |
+
indexes.push(breakPoint);
|
1224 |
+
breakPoint = counter + _.options.slidesToScroll;
|
1225 |
+
counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
|
1226 |
+
}
|
1227 |
+
|
1228 |
+
return indexes;
|
1229 |
+
|
1230 |
+
};
|
1231 |
+
|
1232 |
+
Slick.prototype.getSlick = function() {
|
1233 |
+
|
1234 |
+
return this;
|
1235 |
+
|
1236 |
+
};
|
1237 |
+
|
1238 |
+
Slick.prototype.getSlideCount = function() {
|
1239 |
+
|
1240 |
+
var _ = this,
|
1241 |
+
slidesTraversed, swipedSlide, swipeTarget, centerOffset;
|
1242 |
+
|
1243 |
+
centerOffset = _.options.centerMode === true ? Math.floor(_.$list.width() / 2) : 0;
|
1244 |
+
swipeTarget = (_.swipeLeft * -1) + centerOffset;
|
1245 |
+
|
1246 |
+
if (_.options.swipeToSlide === true) {
|
1247 |
+
|
1248 |
+
_.$slideTrack.find('.slick-slide').each(function(index, slide) {
|
1249 |
+
|
1250 |
+
var slideOuterWidth, slideOffset, slideRightBoundary;
|
1251 |
+
slideOuterWidth = $(slide).outerWidth();
|
1252 |
+
slideOffset = slide.offsetLeft;
|
1253 |
+
if (_.options.centerMode !== true) {
|
1254 |
+
slideOffset += (slideOuterWidth / 2);
|
1255 |
+
}
|
1256 |
+
|
1257 |
+
slideRightBoundary = slideOffset + (slideOuterWidth);
|
1258 |
+
|
1259 |
+
if (swipeTarget < slideRightBoundary) {
|
1260 |
+
swipedSlide = slide;
|
1261 |
+
return false;
|
1262 |
+
}
|
1263 |
+
});
|
1264 |
+
|
1265 |
+
slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;
|
1266 |
+
|
1267 |
+
return slidesTraversed;
|
1268 |
+
|
1269 |
+
} else {
|
1270 |
+
return _.options.slidesToScroll;
|
1271 |
+
}
|
1272 |
+
|
1273 |
+
};
|
1274 |
+
|
1275 |
+
Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) {
|
1276 |
+
|
1277 |
+
var _ = this;
|
1278 |
+
|
1279 |
+
_.changeSlide({
|
1280 |
+
data: {
|
1281 |
+
message: 'index',
|
1282 |
+
index: parseInt(slide)
|
1283 |
+
}
|
1284 |
+
}, dontAnimate);
|
1285 |
+
|
1286 |
+
};
|
1287 |
+
|
1288 |
+
Slick.prototype.init = function(creation) {
|
1289 |
+
|
1290 |
+
var _ = this;
|
1291 |
+
|
1292 |
+
if (!$(_.$slider).hasClass('slick-initialized')) {
|
1293 |
+
|
1294 |
+
$(_.$slider).addClass('slick-initialized');
|
1295 |
+
|
1296 |
+
_.buildRows();
|
1297 |
+
_.buildOut();
|
1298 |
+
_.setProps();
|
1299 |
+
_.startLoad();
|
1300 |
+
_.loadSlider();
|
1301 |
+
_.initializeEvents();
|
1302 |
+
_.updateArrows();
|
1303 |
+
_.updateDots();
|
1304 |
+
_.checkResponsive(true);
|
1305 |
+
_.focusHandler();
|
1306 |
+
|
1307 |
+
}
|
1308 |
+
|
1309 |
+
if (creation) {
|
1310 |
+
_.$slider.trigger('init', [_]);
|
1311 |
+
}
|
1312 |
+
|
1313 |
+
if (_.options.accessibility === true) {
|
1314 |
+
_.initADA();
|
1315 |
+
}
|
1316 |
+
|
1317 |
+
if ( _.options.autoplay ) {
|
1318 |
+
|
1319 |
+
_.paused = false;
|
1320 |
+
_.autoPlay();
|
1321 |
+
|
1322 |
+
}
|
1323 |
+
|
1324 |
+
};
|
1325 |
+
|
1326 |
+
Slick.prototype.initADA = function() {
|
1327 |
+
var _ = this,
|
1328 |
+
numDotGroups = Math.ceil(_.slideCount / _.options.slidesToShow),
|
1329 |
+
tabControlIndexes = _.getNavigableIndexes().filter(function(val) {
|
1330 |
+
return (val >= 0) && (val < _.slideCount);
|
1331 |
+
});
|
1332 |
+
|
1333 |
+
_.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({
|
1334 |
+
'aria-hidden': 'true',
|
1335 |
+
'tabindex': '-1'
|
1336 |
+
}).find('a, input, button, select').attr({
|
1337 |
+
'tabindex': '-1'
|
1338 |
+
});
|
1339 |
+
|
1340 |
+
if (_.$dots !== null) {
|
1341 |
+
_.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) {
|
1342 |
+
var slideControlIndex = tabControlIndexes.indexOf(i);
|
1343 |
+
|
1344 |
+
$(this).attr({
|
1345 |
+
'role': 'tabpanel',
|
1346 |
+
'id': 'slick-slide' + _.instanceUid + i,
|
1347 |
+
'tabindex': -1
|
1348 |
+
});
|
1349 |
+
|
1350 |
+
if (slideControlIndex !== -1) {
|
1351 |
+
var ariaButtonControl = 'slick-slide-control' + _.instanceUid + slideControlIndex
|
1352 |
+
if ($('#' + ariaButtonControl).length) {
|
1353 |
+
$(this).attr({
|
1354 |
+
'aria-describedby': ariaButtonControl
|
1355 |
+
});
|
1356 |
+
}
|
1357 |
+
}
|
1358 |
+
});
|
1359 |
+
|
1360 |
+
_.$dots.attr('role', 'tablist').find('li').each(function(i) {
|
1361 |
+
var mappedSlideIndex = tabControlIndexes[i];
|
1362 |
+
|
1363 |
+
$(this).attr({
|
1364 |
+
'role': 'presentation'
|
1365 |
+
});
|
1366 |
+
|
1367 |
+
$(this).find('button').first().attr({
|
1368 |
+
'role': 'tab',
|
1369 |
+
'id': 'slick-slide-control' + _.instanceUid + i,
|
1370 |
+
'aria-controls': 'slick-slide' + _.instanceUid + mappedSlideIndex,
|
1371 |
+
'aria-label': (i + 1) + ' of ' + numDotGroups,
|
1372 |
+
'aria-selected': null,
|
1373 |
+
'tabindex': '-1'
|
1374 |
+
});
|
1375 |
+
|
1376 |
+
}).eq(_.currentSlide).find('button').attr({
|
1377 |
+
'aria-selected': 'true',
|
1378 |
+
'tabindex': '0'
|
1379 |
+
}).end();
|
1380 |
+
}
|
1381 |
+
|
1382 |
+
for (var i=_.currentSlide, max=i+_.options.slidesToShow; i < max; i++) {
|
1383 |
+
if (_.options.focusOnChange) {
|
1384 |
+
_.$slides.eq(i).attr({'tabindex': '0'});
|
1385 |
+
} else {
|
1386 |
+
_.$slides.eq(i).removeAttr('tabindex');
|
1387 |
+
}
|
1388 |
+
}
|
1389 |
+
|
1390 |
+
_.activateADA();
|
1391 |
+
|
1392 |
+
};
|
1393 |
+
|
1394 |
+
Slick.prototype.initArrowEvents = function() {
|
1395 |
+
|
1396 |
+
var _ = this;
|
1397 |
+
|
1398 |
+
if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
|
1399 |
+
_.$prevArrow
|
1400 |
+
.off('click.slick')
|
1401 |
+
.on('click.slick', {
|
1402 |
+
message: 'previous'
|
1403 |
+
}, _.changeSlide);
|
1404 |
+
_.$nextArrow
|
1405 |
+
.off('click.slick')
|
1406 |
+
.on('click.slick', {
|
1407 |
+
message: 'next'
|
1408 |
+
}, _.changeSlide);
|
1409 |
+
|
1410 |
+
if (_.options.accessibility === true) {
|
1411 |
+
_.$prevArrow.on('keydown.slick', _.keyHandler);
|
1412 |
+
_.$nextArrow.on('keydown.slick', _.keyHandler);
|
1413 |
+
}
|
1414 |
+
}
|
1415 |
+
|
1416 |
+
};
|
1417 |
+
|
1418 |
+
Slick.prototype.initDotEvents = function() {
|
1419 |
+
|
1420 |
+
var _ = this;
|
1421 |
+
|
1422 |
+
if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
|
1423 |
+
$('li', _.$dots).on('click.slick', {
|
1424 |
+
message: 'index'
|
1425 |
+
}, _.changeSlide);
|
1426 |
+
|
1427 |
+
if (_.options.accessibility === true) {
|
1428 |
+
_.$dots.on('keydown.slick', _.keyHandler);
|
1429 |
+
}
|
1430 |
+
}
|
1431 |
+
|
1432 |
+
if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.slideCount > _.options.slidesToShow) {
|
1433 |
+
|
1434 |
+
$('li', _.$dots)
|
1435 |
+
.on('mouseenter.slick', $.proxy(_.interrupt, _, true))
|
1436 |
+
.on('mouseleave.slick', $.proxy(_.interrupt, _, false));
|
1437 |
+
|
1438 |
+
}
|
1439 |
+
|
1440 |
+
};
|
1441 |
+
|
1442 |
+
Slick.prototype.initSlideEvents = function() {
|
1443 |
+
|
1444 |
+
var _ = this;
|
1445 |
+
|
1446 |
+
if ( _.options.pauseOnHover ) {
|
1447 |
+
|
1448 |
+
_.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
|
1449 |
+
_.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));
|
1450 |
+
|
1451 |
+
}
|
1452 |
+
|
1453 |
+
};
|
1454 |
+
|
1455 |
+
Slick.prototype.initializeEvents = function() {
|
1456 |
+
|
1457 |
+
var _ = this;
|
1458 |
+
|
1459 |
+
_.initArrowEvents();
|
1460 |
+
|
1461 |
+
_.initDotEvents();
|
1462 |
+
_.initSlideEvents();
|
1463 |
+
|
1464 |
+
_.$list.on('touchstart.slick mousedown.slick', {
|
1465 |
+
action: 'start'
|
1466 |
+
}, _.swipeHandler);
|
1467 |
+
_.$list.on('touchmove.slick mousemove.slick', {
|
1468 |
+
action: 'move'
|
1469 |
+
}, _.swipeHandler);
|
1470 |
+
_.$list.on('touchend.slick mouseup.slick', {
|
1471 |
+
action: 'end'
|
1472 |
+
}, _.swipeHandler);
|
1473 |
+
_.$list.on('touchcancel.slick mouseleave.slick', {
|
1474 |
+
action: 'end'
|
1475 |
+
}, _.swipeHandler);
|
1476 |
+
|
1477 |
+
_.$list.on('click.slick', _.clickHandler);
|
1478 |
+
|
1479 |
+
$(document).on(_.visibilityChange, $.proxy(_.visibility, _));
|
1480 |
+
|
1481 |
+
if (_.options.accessibility === true) {
|
1482 |
+
_.$list.on('keydown.slick', _.keyHandler);
|
1483 |
+
}
|
1484 |
+
|
1485 |
+
if (_.options.focusOnSelect === true) {
|
1486 |
+
$(_.$slideTrack).children().on('click.slick', _.selectHandler);
|
1487 |
+
}
|
1488 |
+
|
1489 |
+
$(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));
|
1490 |
+
|
1491 |
+
$(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));
|
1492 |
+
|
1493 |
+
$('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);
|
1494 |
+
|
1495 |
+
$(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
|
1496 |
+
$(_.setPosition);
|
1497 |
+
|
1498 |
+
};
|
1499 |
+
|
1500 |
+
Slick.prototype.initUI = function() {
|
1501 |
+
|
1502 |
+
var _ = this;
|
1503 |
+
|
1504 |
+
if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
|
1505 |
+
|
1506 |
+
_.$prevArrow.show();
|
1507 |
+
_.$nextArrow.show();
|
1508 |
+
|
1509 |
+
}
|
1510 |
+
|
1511 |
+
if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
|
1512 |
+
|
1513 |
+
_.$dots.show();
|
1514 |
+
|
1515 |
+
}
|
1516 |
+
|
1517 |
+
};
|
1518 |
+
|
1519 |
+
Slick.prototype.keyHandler = function(event) {
|
1520 |
+
|
1521 |
+
var _ = this;
|
1522 |
+
//Dont slide if the cursor is inside the form fields and arrow keys are pressed
|
1523 |
+
if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
|
1524 |
+
if (event.keyCode === 37 && _.options.accessibility === true) {
|
1525 |
+
_.changeSlide({
|
1526 |
+
data: {
|
1527 |
+
message: _.options.rtl === true ? 'next' : 'previous'
|
1528 |
+
}
|
1529 |
+
});
|
1530 |
+
} else if (event.keyCode === 39 && _.options.accessibility === true) {
|
1531 |
+
_.changeSlide({
|
1532 |
+
data: {
|
1533 |
+
message: _.options.rtl === true ? 'previous' : 'next'
|
1534 |
+
}
|
1535 |
+
});
|
1536 |
+
}
|
1537 |
+
}
|
1538 |
+
|
1539 |
+
};
|
1540 |
+
|
1541 |
+
Slick.prototype.lazyLoad = function() {
|
1542 |
+
|
1543 |
+
var _ = this,
|
1544 |
+
loadRange, cloneRange, rangeStart, rangeEnd;
|
1545 |
+
|
1546 |
+
function loadImages(imagesScope) {
|
1547 |
+
|
1548 |
+
$('img[data-lazy]', imagesScope).each(function() {
|
1549 |
+
|
1550 |
+
var image = $(this),
|
1551 |
+
imageSource = $(this).attr('data-lazy'),
|
1552 |
+
imageSrcSet = $(this).attr('data-srcset'),
|
1553 |
+
imageSizes = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'),
|
1554 |
+
imageToLoad = document.createElement('img');
|
1555 |
+
|
1556 |
+
imageToLoad.onload = function() {
|
1557 |
+
|
1558 |
+
image
|
1559 |
+
.animate({ opacity: 0 }, 100, function() {
|
1560 |
+
|
1561 |
+
if (imageSrcSet) {
|
1562 |
+
image
|
1563 |
+
.attr('srcset', imageSrcSet );
|
1564 |
+
|
1565 |
+
if (imageSizes) {
|
1566 |
+
image
|
1567 |
+
.attr('sizes', imageSizes );
|
1568 |
+
}
|
1569 |
+
}
|
1570 |
+
|
1571 |
+
image
|
1572 |
+
.attr('src', imageSource)
|
1573 |
+
.animate({ opacity: 1 }, 200, function() {
|
1574 |
+
image
|
1575 |
+
.removeAttr('data-lazy data-srcset data-sizes')
|
1576 |
+
.removeClass('slick-loading');
|
1577 |
+
});
|
1578 |
+
_.$slider.trigger('lazyLoaded', [_, image, imageSource]);
|
1579 |
+
});
|
1580 |
+
|
1581 |
+
};
|
1582 |
+
|
1583 |
+
imageToLoad.onerror = function() {
|
1584 |
+
|
1585 |
+
image
|
1586 |
+
.removeAttr( 'data-lazy' )
|
1587 |
+
.removeClass( 'slick-loading' )
|
1588 |
+
.addClass( 'slick-lazyload-error' );
|
1589 |
+
|
1590 |
+
_.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
|
1591 |
+
|
1592 |
+
};
|
1593 |
+
|
1594 |
+
imageToLoad.src = imageSource;
|
1595 |
+
|
1596 |
+
});
|
1597 |
+
|
1598 |
+
}
|
1599 |
+
|
1600 |
+
if (_.options.centerMode === true) {
|
1601 |
+
if (_.options.infinite === true) {
|
1602 |
+
rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
|
1603 |
+
rangeEnd = rangeStart + _.options.slidesToShow + 2;
|
1604 |
+
} else {
|
1605 |
+
rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));
|
1606 |
+
rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;
|
1607 |
+
}
|
1608 |
+
} else {
|
1609 |
+
rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
|
1610 |
+
rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);
|
1611 |
+
if (_.options.fade === true) {
|
1612 |
+
if (rangeStart > 0) rangeStart--;
|
1613 |
+
if (rangeEnd <= _.slideCount) rangeEnd++;
|
1614 |
+
}
|
1615 |
+
}
|
1616 |
+
|
1617 |
+
loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
|
1618 |
+
|
1619 |
+
if (_.options.lazyLoad === 'anticipated') {
|
1620 |
+
var prevSlide = rangeStart - 1,
|
1621 |
+
nextSlide = rangeEnd,
|
1622 |
+
$slides = _.$slider.find('.slick-slide');
|
1623 |
+
|
1624 |
+
for (var i = 0; i < _.options.slidesToScroll; i++) {
|
1625 |
+
if (prevSlide < 0) prevSlide = _.slideCount - 1;
|
1626 |
+
loadRange = loadRange.add($slides.eq(prevSlide));
|
1627 |
+
loadRange = loadRange.add($slides.eq(nextSlide));
|
1628 |
+
prevSlide--;
|
1629 |
+
nextSlide++;
|
1630 |
+
}
|
1631 |
+
}
|
1632 |
+
|
1633 |
+
loadImages(loadRange);
|
1634 |
+
|
1635 |
+
if (_.slideCount <= _.options.slidesToShow) {
|
1636 |
+
cloneRange = _.$slider.find('.slick-slide');
|
1637 |
+
loadImages(cloneRange);
|
1638 |
+
} else
|
1639 |
+
if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
|
1640 |
+
cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
|
1641 |
+
loadImages(cloneRange);
|
1642 |
+
} else if (_.currentSlide === 0) {
|
1643 |
+
cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
|
1644 |
+
loadImages(cloneRange);
|
1645 |
+
}
|
1646 |
+
|
1647 |
+
};
|
1648 |
+
|
1649 |
+
Slick.prototype.loadSlider = function() {
|
1650 |
+
|
1651 |
+
var _ = this;
|
1652 |
+
|
1653 |
+
_.setPosition();
|
1654 |
+
|
1655 |
+
_.$slideTrack.css({
|
1656 |
+
opacity: 1
|
1657 |
+
});
|
1658 |
+
|
1659 |
+
_.$slider.removeClass('slick-loading');
|
1660 |
+
|
1661 |
+
_.initUI();
|
1662 |
+
|
1663 |
+
if (_.options.lazyLoad === 'progressive') {
|
1664 |
+
_.progressiveLazyLoad();
|
1665 |
+
}
|
1666 |
+
|
1667 |
+
};
|
1668 |
+
|
1669 |
+
Slick.prototype.next = Slick.prototype.slickNext = function() {
|
1670 |
+
|
1671 |
+
var _ = this;
|
1672 |
+
|
1673 |
+
_.changeSlide({
|
1674 |
+
data: {
|
1675 |
+
message: 'next'
|
1676 |
+
}
|
1677 |
+
});
|
1678 |
+
|
1679 |
+
};
|
1680 |
+
|
1681 |
+
Slick.prototype.orientationChange = function() {
|
1682 |
+
|
1683 |
+
var _ = this;
|
1684 |
+
|
1685 |
+
_.checkResponsive();
|
1686 |
+
_.setPosition();
|
1687 |
+
|
1688 |
+
};
|
1689 |
+
|
1690 |
+
Slick.prototype.pause = Slick.prototype.slickPause = function() {
|
1691 |
+
|
1692 |
+
var _ = this;
|
1693 |
+
|
1694 |
+
_.autoPlayClear();
|
1695 |
+
_.paused = true;
|
1696 |
+
|
1697 |
+
};
|
1698 |
+
|
1699 |
+
Slick.prototype.play = Slick.prototype.slickPlay = function() {
|
1700 |
+
|
1701 |
+
var _ = this;
|
1702 |
+
|
1703 |
+
_.autoPlay();
|
1704 |
+
_.options.autoplay = true;
|
1705 |
+
_.paused = false;
|
1706 |
+
_.focussed = false;
|
1707 |
+
_.interrupted = false;
|
1708 |
+
|
1709 |
+
};
|
1710 |
+
|
1711 |
+
Slick.prototype.postSlide = function(index) {
|
1712 |
+
|
1713 |
+
var _ = this;
|
1714 |
+
|
1715 |
+
if( !_.unslicked ) {
|
1716 |
+
|
1717 |
+
_.$slider.trigger('afterChange', [_, index]);
|
1718 |
+
|
1719 |
+
_.animating = false;
|
1720 |
+
|
1721 |
+
if (_.slideCount > _.options.slidesToShow) {
|
1722 |
+
_.setPosition();
|
1723 |
+
}
|
1724 |
+
|
1725 |
+
_.swipeLeft = null;
|
1726 |
+
|
1727 |
+
if ( _.options.autoplay ) {
|
1728 |
+
_.autoPlay();
|
1729 |
+
}
|
1730 |
+
|
1731 |
+
if (_.options.accessibility === true) {
|
1732 |
+
_.initADA();
|
1733 |
+
|
1734 |
+
if (_.options.focusOnChange) {
|
1735 |
+
var $currentSlide = $(_.$slides.get(_.currentSlide));
|
1736 |
+
$currentSlide.attr('tabindex', 0).focus();
|
1737 |
+
}
|
1738 |
+
}
|
1739 |
+
|
1740 |
+
}
|
1741 |
+
|
1742 |
+
};
|
1743 |
+
|
1744 |
+
Slick.prototype.prev = Slick.prototype.slickPrev = function() {
|
1745 |
+
|
1746 |
+
var _ = this;
|
1747 |
+
|
1748 |
+
_.changeSlide({
|
1749 |
+
data: {
|
1750 |
+
message: 'previous'
|
1751 |
+
}
|
1752 |
+
});
|
1753 |
+
|
1754 |
+
};
|
1755 |
+
|
1756 |
+
Slick.prototype.preventDefault = function(event) {
|
1757 |
+
|
1758 |
+
event.preventDefault();
|
1759 |
+
|
1760 |
+
};
|
1761 |
+
|
1762 |
+
Slick.prototype.progressiveLazyLoad = function( tryCount ) {
|
1763 |
+
|
1764 |
+
tryCount = tryCount || 1;
|
1765 |
+
|
1766 |
+
var _ = this,
|
1767 |
+
$imgsToLoad = $( 'img[data-lazy]', _.$slider ),
|
1768 |
+
image,
|
1769 |
+
imageSource,
|
1770 |
+
imageSrcSet,
|
1771 |
+
imageSizes,
|
1772 |
+
imageToLoad;
|
1773 |
+
|
1774 |
+
if ( $imgsToLoad.length ) {
|
1775 |
+
|
1776 |
+
image = $imgsToLoad.first();
|
1777 |
+
imageSource = image.attr('data-lazy');
|
1778 |
+
imageSrcSet = image.attr('data-srcset');
|
1779 |
+
imageSizes = image.attr('data-sizes') || _.$slider.attr('data-sizes');
|
1780 |
+
imageToLoad = document.createElement('img');
|
1781 |
+
|
1782 |
+
imageToLoad.onload = function() {
|
1783 |
+
|
1784 |
+
if (imageSrcSet) {
|
1785 |
+
image
|
1786 |
+
.attr('srcset', imageSrcSet );
|
1787 |
+
|
1788 |
+
if (imageSizes) {
|
1789 |
+
image
|
1790 |
+
.attr('sizes', imageSizes );
|
1791 |
+
}
|
1792 |
+
}
|
1793 |
+
|
1794 |
+
image
|
1795 |
+
.attr( 'src', imageSource )
|
1796 |
+
.removeAttr('data-lazy data-srcset data-sizes')
|
1797 |
+
.removeClass('slick-loading');
|
1798 |
+
|
1799 |
+
if ( _.options.adaptiveHeight === true ) {
|
1800 |
+
_.setPosition();
|
1801 |
+
}
|
1802 |
+
|
1803 |
+
_.$slider.trigger('lazyLoaded', [ _, image, imageSource ]);
|
1804 |
+
_.progressiveLazyLoad();
|
1805 |
+
|
1806 |
+
};
|
1807 |
+
|
1808 |
+
imageToLoad.onerror = function() {
|
1809 |
+
|
1810 |
+
if ( tryCount < 3 ) {
|
1811 |
+
|
1812 |
+
/**
|
1813 |
+
* try to load the image 3 times,
|
1814 |
+
* leave a slight delay so we don't get
|
1815 |
+
* servers blocking the request.
|
1816 |
+
*/
|
1817 |
+
setTimeout( function() {
|
1818 |
+
_.progressiveLazyLoad( tryCount + 1 );
|
1819 |
+
}, 500 );
|
1820 |
+
|
1821 |
+
} else {
|
1822 |
+
|
1823 |
+
image
|
1824 |
+
.removeAttr( 'data-lazy' )
|
1825 |
+
.removeClass( 'slick-loading' )
|
1826 |
+
.addClass( 'slick-lazyload-error' );
|
1827 |
+
|
1828 |
+
_.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
|
1829 |
+
|
1830 |
+
_.progressiveLazyLoad();
|
1831 |
+
|
1832 |
+
}
|
1833 |
+
|
1834 |
+
};
|
1835 |
+
|
1836 |
+
imageToLoad.src = imageSource;
|
1837 |
+
|
1838 |
+
} else {
|
1839 |
+
|
1840 |
+
_.$slider.trigger('allImagesLoaded', [ _ ]);
|
1841 |
+
|
1842 |
+
}
|
1843 |
+
|
1844 |
+
};
|
1845 |
+
|
1846 |
+
Slick.prototype.refresh = function( initializing ) {
|
1847 |
+
|
1848 |
+
var _ = this, currentSlide, lastVisibleIndex;
|
1849 |
+
|
1850 |
+
lastVisibleIndex = _.slideCount - _.options.slidesToShow;
|
1851 |
+
|
1852 |
+
// in non-infinite sliders, we don't want to go past the
|
1853 |
+
// last visible index.
|
1854 |
+
if( !_.options.infinite && ( _.currentSlide > lastVisibleIndex )) {
|
1855 |
+
_.currentSlide = lastVisibleIndex;
|
1856 |
+
}
|
1857 |
+
|
1858 |
+
// if less slides than to show, go to start.
|
1859 |
+
if ( _.slideCount <= _.options.slidesToShow ) {
|
1860 |
+
_.currentSlide = 0;
|
1861 |
+
|
1862 |
+
}
|
1863 |
+
|
1864 |
+
currentSlide = _.currentSlide;
|
1865 |
+
|
1866 |
+
_.destroy(true);
|
1867 |
+
|
1868 |
+
$.extend(_, _.initials, { currentSlide: currentSlide });
|
1869 |
+
|
1870 |
+
_.init();
|
1871 |
+
|
1872 |
+
if( !initializing ) {
|
1873 |
+
|
1874 |
+
_.changeSlide({
|
1875 |
+
data: {
|
1876 |
+
message: 'index',
|
1877 |
+
index: currentSlide
|
1878 |
+
}
|
1879 |
+
}, false);
|
1880 |
+
|
1881 |
+
}
|
1882 |
+
|
1883 |
+
};
|
1884 |
+
|
1885 |
+
Slick.prototype.registerBreakpoints = function() {
|
1886 |
+
|
1887 |
+
var _ = this, breakpoint, currentBreakpoint, l,
|
1888 |
+
responsiveSettings = _.options.responsive || null;
|
1889 |
+
|
1890 |
+
if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) {
|
1891 |
+
|
1892 |
+
_.respondTo = _.options.respondTo || 'window';
|
1893 |
+
|
1894 |
+
for ( breakpoint in responsiveSettings ) {
|
1895 |
+
|
1896 |
+
l = _.breakpoints.length-1;
|
1897 |
+
|
1898 |
+
if (responsiveSettings.hasOwnProperty(breakpoint)) {
|
1899 |
+
currentBreakpoint = responsiveSettings[breakpoint].breakpoint;
|
1900 |
+
|
1901 |
+
// loop through the breakpoints and cut out any existing
|
1902 |
+
// ones with the same breakpoint number, we don't want dupes.
|
1903 |
+
while( l >= 0 ) {
|
1904 |
+
if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) {
|
1905 |
+
_.breakpoints.splice(l,1);
|
1906 |
+
}
|
1907 |
+
l--;
|
1908 |
+
}
|
1909 |
+
|
1910 |
+
_.breakpoints.push(currentBreakpoint);
|
1911 |
+
_.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;
|
1912 |
+
|
1913 |
+
}
|
1914 |
+
|
1915 |
+
}
|
1916 |
+
|
1917 |
+
_.breakpoints.sort(function(a, b) {
|
1918 |
+
return ( _.options.mobileFirst ) ? a-b : b-a;
|
1919 |
+
});
|
1920 |
+
|
1921 |
+
}
|
1922 |
+
|
1923 |
+
};
|
1924 |
+
|
1925 |
+
Slick.prototype.reinit = function() {
|
1926 |
+
|
1927 |
+
var _ = this;
|
1928 |
+
|
1929 |
+
_.$slides =
|
1930 |
+
_.$slideTrack
|
1931 |
+
.children(_.options.slide)
|
1932 |
+
.addClass('slick-slide');
|
1933 |
+
|
1934 |
+
_.slideCount = _.$slides.length;
|
1935 |
+
|
1936 |
+
if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
|
1937 |
+
_.currentSlide = _.currentSlide - _.options.slidesToScroll;
|
1938 |
+
}
|
1939 |
+
|
1940 |
+
if (_.slideCount <= _.options.slidesToShow) {
|
1941 |
+
_.currentSlide = 0;
|
1942 |
+
}
|
1943 |
+
|
1944 |
+
_.registerBreakpoints();
|
1945 |
+
|
1946 |
+
_.setProps();
|
1947 |
+
_.setupInfinite();
|
1948 |
+
_.buildArrows();
|
1949 |
+
_.updateArrows();
|
1950 |
+
_.initArrowEvents();
|
1951 |
+
_.buildDots();
|
1952 |
+
_.updateDots();
|
1953 |
+
_.initDotEvents();
|
1954 |
+
_.cleanUpSlideEvents();
|
1955 |
+
_.initSlideEvents();
|
1956 |
+
|
1957 |
+
_.checkResponsive(false, true);
|
1958 |
+
|
1959 |
+
if (_.options.focusOnSelect === true) {
|
1960 |
+
$(_.$slideTrack).children().on('click.slick', _.selectHandler);
|
1961 |
+
}
|
1962 |
+
|
1963 |
+
_.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
|
1964 |
+
|
1965 |
+
_.setPosition();
|
1966 |
+
_.focusHandler();
|
1967 |
+
|
1968 |
+
_.paused = !_.options.autoplay;
|
1969 |
+
_.autoPlay();
|
1970 |
+
|
1971 |
+
_.$slider.trigger('reInit', [_]);
|
1972 |
+
|
1973 |
+
};
|
1974 |
+
|
1975 |
+
Slick.prototype.resize = function() {
|
1976 |
+
|
1977 |
+
var _ = this;
|
1978 |
+
|
1979 |
+
if ($(window).width() !== _.windowWidth) {
|
1980 |
+
clearTimeout(_.windowDelay);
|
1981 |
+
_.windowDelay = window.setTimeout(function() {
|
1982 |
+
_.windowWidth = $(window).width();
|
1983 |
+
_.checkResponsive();
|
1984 |
+
if( !_.unslicked ) { _.setPosition(); }
|
1985 |
+
}, 50);
|
1986 |
+
}
|
1987 |
+
};
|
1988 |
+
|
1989 |
+
Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) {
|
1990 |
+
|
1991 |
+
var _ = this;
|
1992 |
+
|
1993 |
+
if (typeof(index) === 'boolean') {
|
1994 |
+
removeBefore = index;
|
1995 |
+
index = removeBefore === true ? 0 : _.slideCount - 1;
|
1996 |
+
} else {
|
1997 |
+
index = removeBefore === true ? --index : index;
|
1998 |
+
}
|
1999 |
+
|
2000 |
+
if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
|
2001 |
+
return false;
|
2002 |
+
}
|
2003 |
+
|
2004 |
+
_.unload();
|
2005 |
+
|
2006 |
+
if (removeAll === true) {
|
2007 |
+
_.$slideTrack.children().remove();
|
2008 |
+
} else {
|
2009 |
+
_.$slideTrack.children(this.options.slide).eq(index).remove();
|
2010 |
+
}
|
2011 |
+
|
2012 |
+
_.$slides = _.$slideTrack.children(this.options.slide);
|
2013 |
+
|
2014 |
+
_.$slideTrack.children(this.options.slide).detach();
|
2015 |
+
|
2016 |
+
_.$slideTrack.append(_.$slides);
|
2017 |
+
|
2018 |
+
_.$slidesCache = _.$slides;
|
2019 |
+
|
2020 |
+
_.reinit();
|
2021 |
+
|
2022 |
+
};
|
2023 |
+
|
2024 |
+
Slick.prototype.setCSS = function(position) {
|
2025 |
+
|
2026 |
+
var _ = this,
|
2027 |
+
positionProps = {},
|
2028 |
+
x, y;
|
2029 |
+
|
2030 |
+
if (_.options.rtl === true) {
|
2031 |
+
position = -position;
|
2032 |
+
}
|
2033 |
+
x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
|
2034 |
+
y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';
|
2035 |
+
|
2036 |
+
positionProps[_.positionProp] = position;
|
2037 |
+
|
2038 |
+
if (_.transformsEnabled === false) {
|
2039 |
+
_.$slideTrack.css(positionProps);
|
2040 |
+
} else {
|
2041 |
+
positionProps = {};
|
2042 |
+
if (_.cssTransitions === false) {
|
2043 |
+
positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
|
2044 |
+
_.$slideTrack.css(positionProps);
|
2045 |
+
} else {
|
2046 |
+
positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
|
2047 |
+
_.$slideTrack.css(positionProps);
|
2048 |
+
}
|
2049 |
+
}
|
2050 |
+
|
2051 |
+
};
|
2052 |
+
|
2053 |
+
Slick.prototype.setDimensions = function() {
|
2054 |
+
|
2055 |
+
var _ = this;
|
2056 |
+
|
2057 |
+
if (_.options.vertical === false) {
|
2058 |
+
if (_.options.centerMode === true) {
|
2059 |
+
_.$list.css({
|
2060 |
+
padding: ('0px ' + _.options.centerPadding)
|
2061 |
+
});
|
2062 |
+
}
|
2063 |
+
} else {
|
2064 |
+
_.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
|
2065 |
+
if (_.options.centerMode === true) {
|
2066 |
+
_.$list.css({
|
2067 |
+
padding: (_.options.centerPadding + ' 0px')
|
2068 |
+
});
|
2069 |
+
}
|
2070 |
+
}
|
2071 |
+
|
2072 |
+
_.listWidth = _.$list.width();
|
2073 |
+
_.listHeight = _.$list.height();
|
2074 |
+
|
2075 |
+
|
2076 |
+
if (_.options.vertical === false && _.options.variableWidth === false) {
|
2077 |
+
_.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
|
2078 |
+
_.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));
|
2079 |
+
|
2080 |
+
} else if (_.options.variableWidth === true) {
|
2081 |
+
_.$slideTrack.width(5000 * _.slideCount);
|
2082 |
+
} else {
|
2083 |
+
_.slideWidth = Math.ceil(_.listWidth);
|
2084 |
+
_.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));
|
2085 |
+
}
|
2086 |
+
|
2087 |
+
var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();
|
2088 |
+
if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);
|
2089 |
+
|
2090 |
+
};
|
2091 |
+
|
2092 |
+
Slick.prototype.setFade = function() {
|
2093 |
+
|
2094 |
+
var _ = this,
|
2095 |
+
targetLeft;
|
2096 |
+
|
2097 |
+
_.$slides.each(function(index, element) {
|
2098 |
+
targetLeft = (_.slideWidth * index) * -1;
|
2099 |
+
if (_.options.rtl === true) {
|
2100 |
+
$(element).css({
|
2101 |
+
position: 'relative',
|
2102 |
+
right: targetLeft,
|
2103 |
+
top: 0,
|
2104 |
+
zIndex: _.options.zIndex - 2,
|
2105 |
+
opacity: 0
|
2106 |
+
});
|
2107 |
+
} else {
|
2108 |
+
$(element).css({
|
2109 |
+
position: 'relative',
|
2110 |
+
left: targetLeft,
|
2111 |
+
top: 0,
|
2112 |
+
zIndex: _.options.zIndex - 2,
|
2113 |
+
opacity: 0
|
2114 |
+
});
|
2115 |
+
}
|
2116 |
+
});
|
2117 |
+
|
2118 |
+
_.$slides.eq(_.currentSlide).css({
|
2119 |
+
zIndex: _.options.zIndex - 1,
|
2120 |
+
opacity: 1
|
2121 |
+
});
|
2122 |
+
|
2123 |
+
};
|
2124 |
+
|
2125 |
+
Slick.prototype.setHeight = function() {
|
2126 |
+
|
2127 |
+
var _ = this;
|
2128 |
+
|
2129 |
+
if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
|
2130 |
+
var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
|
2131 |
+
_.$list.css('height', targetHeight);
|
2132 |
+
}
|
2133 |
+
|
2134 |
+
};
|
2135 |
+
|
2136 |
+
Slick.prototype.setOption =
|
2137 |
+
Slick.prototype.slickSetOption = function() {
|
2138 |
+
|
2139 |
+
/**
|
2140 |
+
* accepts arguments in format of:
|
2141 |
+
*
|
2142 |
+
* - for changing a single option's value:
|
2143 |
+
* .slick("setOption", option, value, refresh )
|
2144 |
+
*
|
2145 |
+
* - for changing a set of responsive options:
|
2146 |
+
* .slick("setOption", 'responsive', [{}, ...], refresh )
|
2147 |
+
*
|
2148 |
+
* - for updating multiple values at once (not responsive)
|
2149 |
+
* .slick("setOption", { 'option': value, ... }, refresh )
|
2150 |
+
*/
|
2151 |
+
|
2152 |
+
var _ = this, l, item, option, value, refresh = false, type;
|
2153 |
+
|
2154 |
+
if( $.type( arguments[0] ) === 'object' ) {
|
2155 |
+
|
2156 |
+
option = arguments[0];
|
2157 |
+
refresh = arguments[1];
|
2158 |
+
type = 'multiple';
|
2159 |
+
|
2160 |
+
} else if ( $.type( arguments[0] ) === 'string' ) {
|
2161 |
+
|
2162 |
+
option = arguments[0];
|
2163 |
+
value = arguments[1];
|
2164 |
+
refresh = arguments[2];
|
2165 |
+
|
2166 |
+
if ( arguments[0] === 'responsive' && $.type( arguments[1] ) === 'array' ) {
|
2167 |
+
|
2168 |
+
type = 'responsive';
|
2169 |
+
|
2170 |
+
} else if ( typeof arguments[1] !== 'undefined' ) {
|
2171 |
+
|
2172 |
+
type = 'single';
|
2173 |
+
|
2174 |
+
}
|
2175 |
+
|
2176 |
+
}
|
2177 |
+
|
2178 |
+
if ( type === 'single' ) {
|
2179 |
+
|
2180 |
+
_.options[option] = value;
|
2181 |
+
|
2182 |
+
|
2183 |
+
} else if ( type === 'multiple' ) {
|
2184 |
+
|
2185 |
+
$.each( option , function( opt, val ) {
|
2186 |
+
|
2187 |
+
_.options[opt] = val;
|
2188 |
+
|
2189 |
+
});
|
2190 |
+
|
2191 |
+
|
2192 |
+
} else if ( type === 'responsive' ) {
|
2193 |
+
|
2194 |
+
for ( item in value ) {
|
2195 |
+
|
2196 |
+
if( $.type( _.options.responsive ) !== 'array' ) {
|
2197 |
+
|
2198 |
+
_.options.responsive = [ value[item] ];
|
2199 |
+
|
2200 |
+
} else {
|
2201 |
+
|
2202 |
+
l = _.options.responsive.length-1;
|
2203 |
+
|
2204 |
+
// loop through the responsive object and splice out duplicates.
|
2205 |
+
while( l >= 0 ) {
|
2206 |
+
|
2207 |
+
if( _.options.responsive[l].breakpoint === value[item].breakpoint ) {
|
2208 |
+
|
2209 |
+
_.options.responsive.splice(l,1);
|
2210 |
+
|
2211 |
+
}
|
2212 |
+
|
2213 |
+
l--;
|
2214 |
+
|
2215 |
+
}
|
2216 |
+
|
2217 |
+
_.options.responsive.push( value[item] );
|
2218 |
+
|
2219 |
+
}
|
2220 |
+
|
2221 |
+
}
|
2222 |
+
|
2223 |
+
}
|
2224 |
+
|
2225 |
+
if ( refresh ) {
|
2226 |
+
|
2227 |
+
_.unload();
|
2228 |
+
_.reinit();
|
2229 |
+
|
2230 |
+
}
|
2231 |
+
|
2232 |
+
};
|
2233 |
+
|
2234 |
+
Slick.prototype.setPosition = function() {
|
2235 |
+
|
2236 |
+
var _ = this;
|
2237 |
+
|
2238 |
+
_.setDimensions();
|
2239 |
+
|
2240 |
+
_.setHeight();
|
2241 |
+
|
2242 |
+
if (_.options.fade === false) {
|
2243 |
+
_.setCSS(_.getLeft(_.currentSlide));
|
2244 |
+
} else {
|
2245 |
+
_.setFade();
|
2246 |
+
}
|
2247 |
+
|
2248 |
+
_.$slider.trigger('setPosition', [_]);
|
2249 |
+
|
2250 |
+
};
|
2251 |
+
|
2252 |
+
Slick.prototype.setProps = function() {
|
2253 |
+
|
2254 |
+
var _ = this,
|
2255 |
+
bodyStyle = document.body.style;
|
2256 |
+
|
2257 |
+
_.positionProp = _.options.vertical === true ? 'top' : 'left';
|
2258 |
+
|
2259 |
+
if (_.positionProp === 'top') {
|
2260 |
+
_.$slider.addClass('slick-vertical');
|
2261 |
+
} else {
|
2262 |
+
_.$slider.removeClass('slick-vertical');
|
2263 |
+
}
|
2264 |
+
|
2265 |
+
if (bodyStyle.WebkitTransition !== undefined ||
|
2266 |
+
bodyStyle.MozTransition !== undefined ||
|
2267 |
+
bodyStyle.msTransition !== undefined) {
|
2268 |
+
if (_.options.useCSS === true) {
|
2269 |
+
_.cssTransitions = true;
|
2270 |
+
}
|
2271 |
+
}
|
2272 |
+
|
2273 |
+
if ( _.options.fade ) {
|
2274 |
+
if ( typeof _.options.zIndex === 'number' ) {
|
2275 |
+
if( _.options.zIndex < 3 ) {
|
2276 |
+
_.options.zIndex = 3;
|
2277 |
+
}
|
2278 |
+
} else {
|
2279 |
+
_.options.zIndex = _.defaults.zIndex;
|
2280 |
+
}
|
2281 |
+
}
|
2282 |
+
|
2283 |
+
if (bodyStyle.OTransform !== undefined) {
|
2284 |
+
_.animType = 'OTransform';
|
2285 |
+
_.transformType = '-o-transform';
|
2286 |
+
_.transitionType = 'OTransition';
|
2287 |
+
if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
|
2288 |
+
}
|
2289 |
+
if (bodyStyle.MozTransform !== undefined) {
|
2290 |
+
_.animType = 'MozTransform';
|
2291 |
+
_.transformType = '-moz-transform';
|
2292 |
+
_.transitionType = 'MozTransition';
|
2293 |
+
if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
|
2294 |
+
}
|
2295 |
+
if (bodyStyle.webkitTransform !== undefined) {
|
2296 |
+
_.animType = 'webkitTransform';
|
2297 |
+
_.transformType = '-webkit-transform';
|
2298 |
+
_.transitionType = 'webkitTransition';
|
2299 |
+
if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
|
2300 |
+
}
|
2301 |
+
if (bodyStyle.msTransform !== undefined) {
|
2302 |
+
_.animType = 'msTransform';
|
2303 |
+
_.transformType = '-ms-transform';
|
2304 |
+
_.transitionType = 'msTransition';
|
2305 |
+
if (bodyStyle.msTransform === undefined) _.animType = false;
|
2306 |
+
}
|
2307 |
+
if (bodyStyle.transform !== undefined && _.animType !== false) {
|
2308 |
+
_.animType = 'transform';
|
2309 |
+
_.transformType = 'transform';
|
2310 |
+
_.transitionType = 'transition';
|
2311 |
+
}
|
2312 |
+
_.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);
|
2313 |
+
};
|
2314 |
+
|
2315 |
+
|
2316 |
+
Slick.prototype.setSlideClasses = function(index) {
|
2317 |
+
|
2318 |
+
var _ = this,
|
2319 |
+
centerOffset, allSlides, indexOffset, remainder;
|
2320 |
+
|
2321 |
+
allSlides = _.$slider
|
2322 |
+
.find('.slick-slide')
|
2323 |
+
.removeClass('slick-active slick-center slick-current')
|
2324 |
+
.attr('aria-hidden', 'true');
|
2325 |
+
|
2326 |
+
_.$slides
|
2327 |
+
.eq(index)
|
2328 |
+
.addClass('slick-current');
|
2329 |
+
|
2330 |
+
if (_.options.centerMode === true) {
|
2331 |
+
|
2332 |
+
var evenCoef = _.options.slidesToShow % 2 === 0 ? 1 : 0;
|
2333 |
+
|
2334 |
+
centerOffset = Math.floor(_.options.slidesToShow / 2);
|
2335 |
+
|
2336 |
+
if (_.options.infinite === true) {
|
2337 |
+
|
2338 |
+
if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {
|
2339 |
+
_.$slides
|
2340 |
+
.slice(index - centerOffset + evenCoef, index + centerOffset + 1)
|
2341 |
+
.addClass('slick-active')
|
2342 |
+
.attr('aria-hidden', 'false');
|
2343 |
+
|
2344 |
+
} else {
|
2345 |
+
|
2346 |
+
indexOffset = _.options.slidesToShow + index;
|
2347 |
+
allSlides
|
2348 |
+
.slice(indexOffset - centerOffset + 1 + evenCoef, indexOffset + centerOffset + 2)
|
2349 |
+
.addClass('slick-active')
|
2350 |
+
.attr('aria-hidden', 'false');
|
2351 |
+
|
2352 |
+
}
|
2353 |
+
|
2354 |
+
if (index === 0) {
|
2355 |
+
|
2356 |
+
allSlides
|
2357 |
+
.eq(allSlides.length - 1 - _.options.slidesToShow)
|
2358 |
+
.addClass('slick-center');
|
2359 |
+
|
2360 |
+
} else if (index === _.slideCount - 1) {
|
2361 |
+
|
2362 |
+
allSlides
|
2363 |
+
.eq(_.options.slidesToShow)
|
2364 |
+
.addClass('slick-center');
|
2365 |
+
|
2366 |
+
}
|
2367 |
+
|
2368 |
+
}
|
2369 |
+
|
2370 |
+
_.$slides
|
2371 |
+
.eq(index)
|
2372 |
+
.addClass('slick-center');
|
2373 |
+
|
2374 |
+
} else {
|
2375 |
+
|
2376 |
+
if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {
|
2377 |
+
|
2378 |
+
_.$slides
|
2379 |
+
.slice(index, index + _.options.slidesToShow)
|
2380 |
+
.addClass('slick-active')
|
2381 |
+
.attr('aria-hidden', 'false');
|
2382 |
+
|
2383 |
+
} else if (allSlides.length <= _.options.slidesToShow) {
|
2384 |
+
|
2385 |
+
allSlides
|
2386 |
+
.addClass('slick-active')
|
2387 |
+
.attr('aria-hidden', 'false');
|
2388 |
+
|
2389 |
+
} else {
|
2390 |
+
|
2391 |
+
remainder = _.slideCount % _.options.slidesToShow;
|
2392 |
+
indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;
|
2393 |
+
|
2394 |
+
if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {
|
2395 |
+
|
2396 |
+
allSlides
|
2397 |
+
.slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)
|
2398 |
+
.addClass('slick-active')
|
2399 |
+
.attr('aria-hidden', 'false');
|
2400 |
+
|
2401 |
+
} else {
|
2402 |
+
|
2403 |
+
allSlides
|
2404 |
+
.slice(indexOffset, indexOffset + _.options.slidesToShow)
|
2405 |
+
.addClass('slick-active')
|
2406 |
+
.attr('aria-hidden', 'false');
|
2407 |
+
|
2408 |
+
}
|
2409 |
+
|
2410 |
+
}
|
2411 |
+
|
2412 |
+
}
|
2413 |
+
|
2414 |
+
if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') {
|
2415 |
+
_.lazyLoad();
|
2416 |
+
}
|
2417 |
+
};
|
2418 |
+
|
2419 |
+
Slick.prototype.setupInfinite = function() {
|
2420 |
+
|
2421 |
+
var _ = this,
|
2422 |
+
i, slideIndex, infiniteCount;
|
2423 |
+
|
2424 |
+
if (_.options.fade === true) {
|
2425 |
+
_.options.centerMode = false;
|
2426 |
+
}
|
2427 |
+
|
2428 |
+
if (_.options.infinite === true && _.options.fade === false) {
|
2429 |
+
|
2430 |
+
slideIndex = null;
|
2431 |
+
|
2432 |
+
if (_.slideCount > _.options.slidesToShow) {
|
2433 |
+
|
2434 |
+
if (_.options.centerMode === true) {
|
2435 |
+
infiniteCount = _.options.slidesToShow + 1;
|
2436 |
+
} else {
|
2437 |
+
infiniteCount = _.options.slidesToShow;
|
2438 |
+
}
|
2439 |
+
|
2440 |
+
for (i = _.slideCount; i > (_.slideCount -
|
2441 |
+
infiniteCount); i -= 1) {
|
2442 |
+
slideIndex = i - 1;
|
2443 |
+
$(_.$slides[slideIndex]).clone(true).attr('id', '')
|
2444 |
+
.attr('data-slick-index', slideIndex - _.slideCount)
|
2445 |
+
.prependTo(_.$slideTrack).addClass('slick-cloned');
|
2446 |
+
}
|
2447 |
+
for (i = 0; i < infiniteCount + _.slideCount; i += 1) {
|
2448 |
+
slideIndex = i;
|
2449 |
+
$(_.$slides[slideIndex]).clone(true).attr('id', '')
|
2450 |
+
.attr('data-slick-index', slideIndex + _.slideCount)
|
2451 |
+
.appendTo(_.$slideTrack).addClass('slick-cloned');
|
2452 |
+
}
|
2453 |
+
_.$slideTrack.find('.slick-cloned').find('[id]').each(function() {
|
2454 |
+
$(this).attr('id', '');
|
2455 |
+
});
|
2456 |
+
|
2457 |
+
}
|
2458 |
+
|
2459 |
+
}
|
2460 |
+
|
2461 |
+
};
|
2462 |
+
|
2463 |
+
Slick.prototype.interrupt = function( toggle ) {
|
2464 |
+
|
2465 |
+
var _ = this;
|
2466 |
+
|
2467 |
+
if( !toggle ) {
|
2468 |
+
_.autoPlay();
|
2469 |
+
}
|
2470 |
+
_.interrupted = toggle;
|
2471 |
+
|
2472 |
+
};
|
2473 |
+
|
2474 |
+
Slick.prototype.selectHandler = function(event) {
|
2475 |
+
|
2476 |
+
var _ = this;
|
2477 |
+
|
2478 |
+
var targetElement =
|
2479 |
+
$(event.target).is('.slick-slide') ?
|
2480 |
+
$(event.target) :
|
2481 |
+
$(event.target).parents('.slick-slide');
|
2482 |
+
|
2483 |
+
var index = parseInt(targetElement.attr('data-slick-index'));
|
2484 |
+
|
2485 |
+
if (!index) index = 0;
|
2486 |
+
|
2487 |
+
if (_.slideCount <= _.options.slidesToShow) {
|
2488 |
+
|
2489 |
+
_.slideHandler(index, false, true);
|
2490 |
+
return;
|
2491 |
+
|
2492 |
+
}
|
2493 |
+
|
2494 |
+
_.slideHandler(index);
|
2495 |
+
|
2496 |
+
};
|
2497 |
+
|
2498 |
+
Slick.prototype.slideHandler = function(index, sync, dontAnimate) {
|
2499 |
+
|
2500 |
+
var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,
|
2501 |
+
_ = this, navTarget;
|
2502 |
+
|
2503 |
+
sync = sync || false;
|
2504 |
+
|
2505 |
+
if (_.animating === true && _.options.waitForAnimate === true) {
|
2506 |
+
return;
|
2507 |
+
}
|
2508 |
+
|
2509 |
+
if (_.options.fade === true && _.currentSlide === index) {
|
2510 |
+
return;
|
2511 |
+
}
|
2512 |
+
|
2513 |
+
if (sync === false) {
|
2514 |
+
_.asNavFor(index);
|
2515 |
+
}
|
2516 |
+
|
2517 |
+
targetSlide = index;
|
2518 |
+
targetLeft = _.getLeft(targetSlide);
|
2519 |
+
slideLeft = _.getLeft(_.currentSlide);
|
2520 |
+
|
2521 |
+
_.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;
|
2522 |
+
|
2523 |
+
if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
|
2524 |
+
if (_.options.fade === false) {
|
2525 |
+
targetSlide = _.currentSlide;
|
2526 |
+
if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
|
2527 |
+
_.animateSlide(slideLeft, function() {
|
2528 |
+
_.postSlide(targetSlide);
|
2529 |
+
});
|
2530 |
+
} else {
|
2531 |
+
_.postSlide(targetSlide);
|
2532 |
+
}
|
2533 |
+
}
|
2534 |
+
return;
|
2535 |
+
} else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
|
2536 |
+
if (_.options.fade === false) {
|
2537 |
+
targetSlide = _.currentSlide;
|
2538 |
+
if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
|
2539 |
+
_.animateSlide(slideLeft, function() {
|
2540 |
+
_.postSlide(targetSlide);
|
2541 |
+
});
|
2542 |
+
} else {
|
2543 |
+
_.postSlide(targetSlide);
|
2544 |
+
}
|
2545 |
+
}
|
2546 |
+
return;
|
2547 |
+
}
|
2548 |
+
|
2549 |
+
if ( _.options.autoplay ) {
|
2550 |
+
clearInterval(_.autoPlayTimer);
|
2551 |
+
}
|
2552 |
+
|
2553 |
+
if (targetSlide < 0) {
|
2554 |
+
if (_.slideCount % _.options.slidesToScroll !== 0) {
|
2555 |
+
animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
|
2556 |
+
} else {
|
2557 |
+
animSlide = _.slideCount + targetSlide;
|
2558 |
+
}
|
2559 |
+
} else if (targetSlide >= _.slideCount) {
|
2560 |
+
if (_.slideCount % _.options.slidesToScroll !== 0) {
|
2561 |
+
animSlide = 0;
|
2562 |
+
} else {
|
2563 |
+
animSlide = targetSlide - _.slideCount;
|
2564 |
+
}
|
2565 |
+
} else {
|
2566 |
+
animSlide = targetSlide;
|
2567 |
+
}
|
2568 |
+
|
2569 |
+
_.animating = true;
|
2570 |
+
|
2571 |
+
_.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);
|
2572 |
+
|
2573 |
+
oldSlide = _.currentSlide;
|
2574 |
+
_.currentSlide = animSlide;
|
2575 |
+
|
2576 |
+
_.setSlideClasses(_.currentSlide);
|
2577 |
+
|
2578 |
+
if ( _.options.asNavFor ) {
|
2579 |
+
|
2580 |
+
navTarget = _.getNavTarget();
|
2581 |
+
navTarget = navTarget.slick('getSlick');
|
2582 |
+
|
2583 |
+
if ( navTarget.slideCount <= navTarget.options.slidesToShow ) {
|
2584 |
+
navTarget.setSlideClasses(_.currentSlide);
|
2585 |
+
}
|
2586 |
+
|
2587 |
+
}
|
2588 |
+
|
2589 |
+
_.updateDots();
|
2590 |
+
_.updateArrows();
|
2591 |
+
|
2592 |
+
if (_.options.fade === true) {
|
2593 |
+
if (dontAnimate !== true) {
|
2594 |
+
|
2595 |
+
_.fadeSlideOut(oldSlide);
|
2596 |
+
|
2597 |
+
_.fadeSlide(animSlide, function() {
|
2598 |
+
_.postSlide(animSlide);
|
2599 |
+
});
|
2600 |
+
|
2601 |
+
} else {
|
2602 |
+
_.postSlide(animSlide);
|
2603 |
+
}
|
2604 |
+
_.animateHeight();
|
2605 |
+
return;
|
2606 |
+
}
|
2607 |
+
|
2608 |
+
if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
|
2609 |
+
_.animateSlide(targetLeft, function() {
|
2610 |
+
_.postSlide(animSlide);
|
2611 |
+
});
|
2612 |
+
} else {
|
2613 |
+
_.postSlide(animSlide);
|
2614 |
+
}
|
2615 |
+
|
2616 |
+
};
|
2617 |
+
|
2618 |
+
Slick.prototype.startLoad = function() {
|
2619 |
+
|
2620 |
+
var _ = this;
|
2621 |
+
|
2622 |
+
if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
|
2623 |
+
|
2624 |
+
_.$prevArrow.hide();
|
2625 |
+
_.$nextArrow.hide();
|
2626 |
+
|
2627 |
+
}
|
2628 |
+
|
2629 |
+
if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
|
2630 |
+
|
2631 |
+
_.$dots.hide();
|
2632 |
+
|
2633 |
+
}
|
2634 |
+
|
2635 |
+
_.$slider.addClass('slick-loading');
|
2636 |
+
|
2637 |
+
};
|
2638 |
+
|
2639 |
+
Slick.prototype.swipeDirection = function() {
|
2640 |
+
|
2641 |
+
var xDist, yDist, r, swipeAngle, _ = this;
|
2642 |
+
|
2643 |
+
xDist = _.touchObject.startX - _.touchObject.curX;
|
2644 |
+
yDist = _.touchObject.startY - _.touchObject.curY;
|
2645 |
+
r = Math.atan2(yDist, xDist);
|
2646 |
+
|
2647 |
+
swipeAngle = Math.round(r * 180 / Math.PI);
|
2648 |
+
if (swipeAngle < 0) {
|
2649 |
+
swipeAngle = 360 - Math.abs(swipeAngle);
|
2650 |
+
}
|
2651 |
+
|
2652 |
+
if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
|
2653 |
+
return (_.options.rtl === false ? 'left' : 'right');
|
2654 |
+
}
|
2655 |
+
if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
|
2656 |
+
return (_.options.rtl === false ? 'left' : 'right');
|
2657 |
+
}
|
2658 |
+
if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
|
2659 |
+
return (_.options.rtl === false ? 'right' : 'left');
|
2660 |
+
}
|
2661 |
+
if (_.options.verticalSwiping === true) {
|
2662 |
+
if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
|
2663 |
+
return 'down';
|
2664 |
+
} else {
|
2665 |
+
return 'up';
|
2666 |
+
}
|
2667 |
+
}
|
2668 |
+
|
2669 |
+
return 'vertical';
|
2670 |
+
|
2671 |
+
};
|
2672 |
+
|
2673 |
+
Slick.prototype.swipeEnd = function(event) {
|
2674 |
+
|
2675 |
+
var _ = this,
|
2676 |
+
slideCount,
|
2677 |
+
direction;
|
2678 |
+
|
2679 |
+
_.dragging = false;
|
2680 |
+
_.swiping = false;
|
2681 |
+
|
2682 |
+
if (_.scrolling) {
|
2683 |
+
_.scrolling = false;
|
2684 |
+
return false;
|
2685 |
+
}
|
2686 |
+
|
2687 |
+
_.interrupted = false;
|
2688 |
+
_.shouldClick = ( _.touchObject.swipeLength > 10 ) ? false : true;
|
2689 |
+
|
2690 |
+
if ( _.touchObject.curX === undefined ) {
|
2691 |
+
return false;
|
2692 |
+
}
|
2693 |
+
|
2694 |
+
if ( _.touchObject.edgeHit === true ) {
|
2695 |
+
_.$slider.trigger('edge', [_, _.swipeDirection() ]);
|
2696 |
+
}
|
2697 |
+
|
2698 |
+
if ( _.touchObject.swipeLength >= _.touchObject.minSwipe ) {
|
2699 |
+
|
2700 |
+
direction = _.swipeDirection();
|
2701 |
+
|
2702 |
+
switch ( direction ) {
|
2703 |
+
|
2704 |
+
case 'left':
|
2705 |
+
case 'down':
|
2706 |
+
|
2707 |
+
slideCount =
|
2708 |
+
_.options.swipeToSlide ?
|
2709 |
+
_.checkNavigable( _.currentSlide + _.getSlideCount() ) :
|
2710 |
+
_.currentSlide + _.getSlideCount();
|
2711 |
+
|
2712 |
+
_.currentDirection = 0;
|
2713 |
+
|
2714 |
+
break;
|
2715 |
+
|
2716 |
+
case 'right':
|
2717 |
+
case 'up':
|
2718 |
+
|
2719 |
+
slideCount =
|
2720 |
+
_.options.swipeToSlide ?
|
2721 |
+
_.checkNavigable( _.currentSlide - _.getSlideCount() ) :
|
2722 |
+
_.currentSlide - _.getSlideCount();
|
2723 |
+
|
2724 |
+
_.currentDirection = 1;
|
2725 |
+
|
2726 |
+
break;
|
2727 |
+
|
2728 |
+
default:
|
2729 |
+
|
2730 |
+
|
2731 |
+
}
|
2732 |
+
|
2733 |
+
if( direction != 'vertical' ) {
|
2734 |
+
|
2735 |
+
_.slideHandler( slideCount );
|
2736 |
+
_.touchObject = {};
|
2737 |
+
_.$slider.trigger('swipe', [_, direction ]);
|
2738 |
+
|
2739 |
+
}
|
2740 |
+
|
2741 |
+
} else {
|
2742 |
+
|
2743 |
+
if ( _.touchObject.startX !== _.touchObject.curX ) {
|
2744 |
+
|
2745 |
+
_.slideHandler( _.currentSlide );
|
2746 |
+
_.touchObject = {};
|
2747 |
+
|
2748 |
+
}
|
2749 |
+
|
2750 |
+
}
|
2751 |
+
|
2752 |
+
};
|
2753 |
+
|
2754 |
+
Slick.prototype.swipeHandler = function(event) {
|
2755 |
+
|
2756 |
+
var _ = this;
|
2757 |
+
|
2758 |
+
if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {
|
2759 |
+
return;
|
2760 |
+
} else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {
|
2761 |
+
return;
|
2762 |
+
}
|
2763 |
+
|
2764 |
+
_.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
|
2765 |
+
event.originalEvent.touches.length : 1;
|
2766 |
+
|
2767 |
+
_.touchObject.minSwipe = _.listWidth / _.options
|
2768 |
+
.touchThreshold;
|
2769 |
+
|
2770 |
+
if (_.options.verticalSwiping === true) {
|
2771 |
+
_.touchObject.minSwipe = _.listHeight / _.options
|
2772 |
+
.touchThreshold;
|
2773 |
+
}
|
2774 |
+
|
2775 |
+
switch (event.data.action) {
|
2776 |
+
|
2777 |
+
case 'start':
|
2778 |
+
_.swipeStart(event);
|
2779 |
+
break;
|
2780 |
+
|
2781 |
+
case 'move':
|
2782 |
+
_.swipeMove(event);
|
2783 |
+
break;
|
2784 |
+
|
2785 |
+
case 'end':
|
2786 |
+
_.swipeEnd(event);
|
2787 |
+
break;
|
2788 |
+
|
2789 |
+
}
|
2790 |
+
|
2791 |
+
};
|
2792 |
+
|
2793 |
+
Slick.prototype.swipeMove = function(event) {
|
2794 |
+
|
2795 |
+
var _ = this,
|
2796 |
+
edgeWasHit = false,
|
2797 |
+
curLeft, swipeDirection, swipeLength, positionOffset, touches, verticalSwipeLength;
|
2798 |
+
|
2799 |
+
touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;
|
2800 |
+
|
2801 |
+
if (!_.dragging || _.scrolling || touches && touches.length !== 1) {
|
2802 |
+
return false;
|
2803 |
+
}
|
2804 |
+
|
2805 |
+
curLeft = _.getLeft(_.currentSlide);
|
2806 |
+
|
2807 |
+
_.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
|
2808 |
+
_.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;
|
2809 |
+
|
2810 |
+
_.touchObject.swipeLength = Math.round(Math.sqrt(
|
2811 |
+
Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));
|
2812 |
+
|
2813 |
+
verticalSwipeLength = Math.round(Math.sqrt(
|
2814 |
+
Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));
|
2815 |
+
|
2816 |
+
if (!_.options.verticalSwiping && !_.swiping && verticalSwipeLength > 4) {
|
2817 |
+
_.scrolling = true;
|
2818 |
+
return false;
|
2819 |
+
}
|
2820 |
+
|
2821 |
+
if (_.options.verticalSwiping === true) {
|
2822 |
+
_.touchObject.swipeLength = verticalSwipeLength;
|
2823 |
+
}
|
2824 |
+
|
2825 |
+
swipeDirection = _.swipeDirection();
|
2826 |
+
|
2827 |
+
if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
|
2828 |
+
_.swiping = true;
|
2829 |
+
event.preventDefault();
|
2830 |
+
}
|
2831 |
+
|
2832 |
+
positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);
|
2833 |
+
if (_.options.verticalSwiping === true) {
|
2834 |
+
positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;
|
2835 |
+
}
|
2836 |
+
|
2837 |
+
|
2838 |
+
swipeLength = _.touchObject.swipeLength;
|
2839 |
+
|
2840 |
+
_.touchObject.edgeHit = false;
|
2841 |
+
|
2842 |
+
if (_.options.infinite === false) {
|
2843 |
+
if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {
|
2844 |
+
swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
|
2845 |
+
_.touchObject.edgeHit = true;
|
2846 |
+
}
|
2847 |
+
}
|
2848 |
+
|
2849 |
+
if (_.options.vertical === false) {
|
2850 |
+
_.swipeLeft = curLeft + swipeLength * positionOffset;
|
2851 |
+
} else {
|
2852 |
+
_.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
|
2853 |
+
}
|
2854 |
+
if (_.options.verticalSwiping === true) {
|
2855 |
+
_.swipeLeft = curLeft + swipeLength * positionOffset;
|
2856 |
+
}
|
2857 |
+
|
2858 |
+
if (_.options.fade === true || _.options.touchMove === false) {
|
2859 |
+
return false;
|
2860 |
+
}
|
2861 |
+
|
2862 |
+
if (_.animating === true) {
|
2863 |
+
_.swipeLeft = null;
|
2864 |
+
return false;
|
2865 |
+
}
|
2866 |
+
|
2867 |
+
_.setCSS(_.swipeLeft);
|
2868 |
+
|
2869 |
+
};
|
2870 |
+
|
2871 |
+
Slick.prototype.swipeStart = function(event) {
|
2872 |
+
|
2873 |
+
var _ = this,
|
2874 |
+
touches;
|
2875 |
+
|
2876 |
+
_.interrupted = true;
|
2877 |
+
|
2878 |
+
if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
|
2879 |
+
_.touchObject = {};
|
2880 |
+
return false;
|
2881 |
+
}
|
2882 |
+
|
2883 |
+
if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
|
2884 |
+
touches = event.originalEvent.touches[0];
|
2885 |
+
}
|
2886 |
+
|
2887 |
+
_.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
|
2888 |
+
_.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;
|
2889 |
+
|
2890 |
+
_.dragging = true;
|
2891 |
+
|
2892 |
+
};
|
2893 |
+
|
2894 |
+
Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() {
|
2895 |
+
|
2896 |
+
var _ = this;
|
2897 |
+
|
2898 |
+
if (_.$slidesCache !== null) {
|
2899 |
+
|
2900 |
+
_.unload();
|
2901 |
+
|
2902 |
+
_.$slideTrack.children(this.options.slide).detach();
|
2903 |
+
|
2904 |
+
_.$slidesCache.appendTo(_.$slideTrack);
|
2905 |
+
|
2906 |
+
_.reinit();
|
2907 |
+
|
2908 |
+
}
|
2909 |
+
|
2910 |
+
};
|
2911 |
+
|
2912 |
+
Slick.prototype.unload = function() {
|
2913 |
+
|
2914 |
+
var _ = this;
|
2915 |
+
|
2916 |
+
$('.slick-cloned', _.$slider).remove();
|
2917 |
+
|
2918 |
+
if (_.$dots) {
|
2919 |
+
_.$dots.remove();
|
2920 |
+
}
|
2921 |
+
|
2922 |
+
if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {
|
2923 |
+
_.$prevArrow.remove();
|
2924 |
+
}
|
2925 |
+
|
2926 |
+
if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {
|
2927 |
+
_.$nextArrow.remove();
|
2928 |
+
}
|
2929 |
+
|
2930 |
+
_.$slides
|
2931 |
+
.removeClass('slick-slide slick-active slick-visible slick-current')
|
2932 |
+
.attr('aria-hidden', 'true')
|
2933 |
+
.css('width', '');
|
2934 |
+
|
2935 |
+
};
|
2936 |
+
|
2937 |
+
Slick.prototype.unslick = function(fromBreakpoint) {
|
2938 |
+
|
2939 |
+
var _ = this;
|
2940 |
+
_.$slider.trigger('unslick', [_, fromBreakpoint]);
|
2941 |
+
_.destroy();
|
2942 |
+
|
2943 |
+
};
|
2944 |
+
|
2945 |
+
Slick.prototype.updateArrows = function() {
|
2946 |
+
|
2947 |
+
var _ = this,
|
2948 |
+
centerOffset;
|
2949 |
+
|
2950 |
+
centerOffset = Math.floor(_.options.slidesToShow / 2);
|
2951 |
+
|
2952 |
+
if ( _.options.arrows === true &&
|
2953 |
+
_.slideCount > _.options.slidesToShow &&
|
2954 |
+
!_.options.infinite ) {
|
2955 |
+
|
2956 |
+
_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
|
2957 |
+
_.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
|
2958 |
+
|
2959 |
+
if (_.currentSlide === 0) {
|
2960 |
+
|
2961 |
+
_.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
|
2962 |
+
_.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
|
2963 |
+
|
2964 |
+
} else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {
|
2965 |
+
|
2966 |
+
_.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
|
2967 |
+
_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
|
2968 |
+
|
2969 |
+
} else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {
|
2970 |
+
|
2971 |
+
_.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
|
2972 |
+
_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
|
2973 |
+
|
2974 |
+
}
|
2975 |
+
|
2976 |
+
}
|
2977 |
+
|
2978 |
+
};
|
2979 |
+
|
2980 |
+
Slick.prototype.updateDots = function() {
|
2981 |
+
|
2982 |
+
var _ = this;
|
2983 |
+
|
2984 |
+
if (_.$dots !== null) {
|
2985 |
+
|
2986 |
+
_.$dots
|
2987 |
+
.find('li')
|
2988 |
+
.removeClass('slick-active')
|
2989 |
+
.end();
|
2990 |
+
|
2991 |
+
_.$dots
|
2992 |
+
.find('li')
|
2993 |
+
.eq(Math.floor(_.currentSlide / _.options.slidesToScroll))
|
2994 |
+
.addClass('slick-active');
|
2995 |
+
|
2996 |
+
}
|
2997 |
+
|
2998 |
+
};
|
2999 |
+
|
3000 |
+
Slick.prototype.visibility = function() {
|
3001 |
+
|
3002 |
+
var _ = this;
|
3003 |
+
|
3004 |
+
if ( _.options.autoplay ) {
|
3005 |
+
|
3006 |
+
if ( document[_.hidden] ) {
|
3007 |
+
|
3008 |
+
_.interrupted = true;
|
3009 |
+
|
3010 |
+
} else {
|
3011 |
+
|
3012 |
+
_.interrupted = false;
|
3013 |
+
|
3014 |
+
}
|
3015 |
+
|
3016 |
+
}
|
3017 |
+
|
3018 |
+
};
|
3019 |
+
|
3020 |
+
$.fn.slick = function() {
|
3021 |
+
var _ = this,
|
3022 |
+
opt = arguments[0],
|
3023 |
+
args = Array.prototype.slice.call(arguments, 1),
|
3024 |
+
l = _.length,
|
3025 |
+
i,
|
3026 |
+
ret;
|
3027 |
+
for (i = 0; i < l; i++) {
|
3028 |
+
if (typeof opt == 'object' || typeof opt == 'undefined')
|
3029 |
+
_[i].slick = new Slick(_[i], opt);
|
3030 |
+
else
|
3031 |
+
ret = _[i].slick[opt].apply(_[i].slick, args);
|
3032 |
+
if (typeof ret != 'undefined') return ret;
|
3033 |
+
}
|
3034 |
+
return _;
|
3035 |
+
};
|
3036 |
+
|
3037 |
+
}));
|
public/js/slick.min.js
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
_ _ _ _
|
3 |
+
___| (_) ___| | __ (_)___
|
4 |
+
/ __| | |/ __| |/ / | / __|
|
5 |
+
\__ \ | | (__| < _ | \__ \
|
6 |
+
|___/_|_|\___|_|\_(_)/ |___/
|
7 |
+
|__/
|
8 |
+
|
9 |
+
Version: 1.9.0
|
10 |
+
Author: Ken Wheeler
|
11 |
+
Website: http://kenwheeler.github.io
|
12 |
+
Docs: http://kenwheeler.github.io/slick
|
13 |
+
Repo: http://github.com/kenwheeler/slick
|
14 |
+
Issues: http://github.com/kenwheeler/slick/issues
|
15 |
+
|
16 |
+
*/
|
17 |
+
(function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)})(function(i){"use strict";var e=window.Slick||{};e=function(){function e(e,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(e),appendDots:i(e),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(e),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(e).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,"undefined"!=typeof document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=t++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}var t=0;return e}(),e.prototype.activateADA=function(){var i=this;i.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(t<0||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):o===!0?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&i.options.adaptiveHeight===!0&&i.options.vertical===!1){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),s.options.rtl===!0&&s.options.vertical===!1&&(e=-e),s.transformsEnabled===!1?s.options.vertical===!1?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):s.cssTransitions===!1?(s.options.rtl===!0&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),s.options.vertical===!1?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),s.options.vertical===!1?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this,o=t.getNavTarget();null!==o&&"object"==typeof o&&o.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};e.options.fade===!1?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,e.options.fade===!1?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(i.options.infinite===!1&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1===0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;e.options.arrows===!0&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),e.options.infinite!==!0&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(o.options.dots===!0&&o.slideCount>o.options.slidesToShow){for(o.$slider.addClass("slick-dotted"),t=i("<ul />").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("<li />").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),e.options.centerMode!==!0&&e.options.swipeToSlide!==!0||(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.options.draggable===!0&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.options.rows>0){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i<s;i++){var d=document.createElement("div");for(e=0;e<l.options.rows;e++){var a=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,d=r.$slider.width(),a=window.innerWidth||i(window).width();if("window"===r.respondTo?n=a:"slider"===r.respondTo?n=d:"min"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(r.originalSettings.mobileFirst===!1?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),e===!0&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),e===!0&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,e===!0&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||l===!1||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n,r=this,l=i(e.currentTarget);switch(l.is("a")&&e.preventDefault(),l.is("li")||(l=l.closest("li")),n=r.slideCount%r.options.slidesToScroll!==0,o=n?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,e.data.message){case"previous":s=0===o?r.options.slidesToScroll:r.options.slidesToShow-o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-s,!1,t);break;case"next":s=0===o?r.options.slidesToScroll:o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+s,!1,t);break;case"index":var d=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(d),!1,t),l.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t,o=this;if(e=o.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var s in e){if(i<e[s]){i=t;break}t=e[s]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(i("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",i.proxy(e.interrupt,e,!0)).off("mouseleave.slick",i.proxy(e.interrupt,e,!1)),e.options.accessibility===!0&&e.$dots.off("keydown.slick",e.keyHandler)),e.$slider.off("focus.slick blur.slick"),e.options.arrows===!0&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),e.options.accessibility===!0&&(e.$prevArrow&&e.$prevArrow.off("keydown.slick",e.keyHandler),e.$nextArrow&&e.$nextArrow.off("keydown.slick",e.keyHandler))),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),e.options.accessibility===!0&&e.$list.off("keydown.slick",e.keyHandler),e.options.focusOnSelect===!0&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>0&&(i=e.$slides.children().children(),i.removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){var e=this;e.shouldClick===!1&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$slider.removeClass("slick-dotted"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",e.options.fade===!1?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;t.cssTransitions===!1?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;e.cssTransitions===!1?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick","*",function(t){var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&o.is(":focus")&&(e.focussed=!0,e.autoPlay())},0)}).on("blur.slick","*",function(t){i(this);e.options.pauseOnFocus&&(e.focussed=!1,e.autoPlay())})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){var i=this;return i.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(i.options.infinite===!0)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(i.options.centerMode===!0)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s,n=this,r=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),n.options.infinite===!0?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,n.options.vertical===!0&&n.options.centerMode===!0&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),r=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!==0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,r=(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,r=n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,r=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,r=0),n.options.centerMode===!0&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:n.options.centerMode===!0&&n.options.infinite===!0?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:n.options.centerMode===!0&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=n.options.vertical===!1?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,n.options.variableWidth===!0&&(o=n.slideCount<=n.options.slidesToShow||n.options.infinite===!1?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=n.options.rtl===!0?o[0]?(n.$slideTrack.width()-o[0].offsetLeft-o.width())*-1:0:o[0]?o[0].offsetLeft*-1:0,n.options.centerMode===!0&&(o=n.slideCount<=n.options.slidesToShow||n.options.infinite===!1?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=n.options.rtl===!0?o[0]?(n.$slideTrack.width()-o[0].offsetLeft-o.width())*-1:0:o[0]?o[0].offsetLeft*-1:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){var e=this;return e.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(e.options.infinite===!1?i=e.slideCount:(t=e.options.slidesToScroll*-1,o=e.options.slidesToScroll*-1,i=2*e.slideCount);t<i;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o,s,n=this;return s=n.options.centerMode===!0?Math.floor(n.$list.width()/2):0,o=n.swipeLeft*-1+s,n.options.swipeToSlide===!0?(n.$slideTrack.find(".slick-slide").each(function(e,s){var r,l,d;if(r=i(s).outerWidth(),l=s.offsetLeft,n.options.centerMode!==!0&&(l+=r/2),d=l+r,o<d)return t=s,!1}),e=Math.abs(i(t).attr("data-slick-index")-n.currentSlide)||1):n.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){var t=this;t.changeSlide({data:{message:"index",index:parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger("init",[t]),t.options.accessibility===!0&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this,t=Math.ceil(e.slideCount/e.options.slidesToShow),o=e.getNavigableIndexes().filter(function(i){return i>=0&&i<e.slideCount});e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){var s=o.indexOf(t);if(i(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+t,tabindex:-1}),s!==-1){var n="slick-slide-control"+e.instanceUid+s;i("#"+n).length&&i(this).attr({"aria-describedby":n})}}),e.$dots.attr("role","tablist").find("li").each(function(s){var n=o[s];i(this).attr({role:"presentation"}),i(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+e.instanceUid+s,"aria-controls":"slick-slide"+e.instanceUid+n,"aria-label":s+1+" of "+t,"aria-selected":null,tabindex:"-1"})}).eq(e.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var s=e.currentSlide,n=s+e.options.slidesToShow;s<n;s++)e.options.focusOnChange?e.$slides.eq(s).attr({tabindex:"0"}):e.$slides.eq(s).removeAttr("tabindex");e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;i.options.arrows===!0&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide),i.options.accessibility===!0&&(i.$prevArrow.on("keydown.slick",i.keyHandler),i.$nextArrow.on("keydown.slick",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;e.options.dots===!0&&e.slideCount>e.options.slidesToShow&&(i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),e.options.accessibility===!0&&e.$dots.on("keydown.slick",e.keyHandler)),e.options.dots===!0&&e.options.pauseOnDotsHover===!0&&e.slideCount>e.options.slidesToShow&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.interrupt,e,!0)).on("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"},e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),e.options.accessibility===!0&&e.$list.on("keydown.slick",e.keyHandler),e.options.focusOnSelect===!0&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(e.setPosition)},e.prototype.initUI=function(){var i=this;i.options.arrows===!0&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),i.options.dots===!0&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&e.options.accessibility===!0?e.changeSlide({data:{message:e.options.rtl===!0?"next":"previous"}}):39===i.keyCode&&e.options.accessibility===!0&&e.changeSlide({data:{message:e.options.rtl===!0?"previous":"next"}}))},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=i(this).attr("data-srcset"),s=i(this).attr("data-sizes")||r.$slider.attr("data-sizes"),n=document.createElement("img");n.onload=function(){e.animate({opacity:0},100,function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),r.$slider.trigger("lazyLoaded",[r,e,t])})},n.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),r.$slider.trigger("lazyLoadError",[r,e,t])},n.src=t})}var t,o,s,n,r=this;if(r.options.centerMode===!0?r.options.infinite===!0?(s=r.currentSlide+(r.options.slidesToShow/2+1),n=s+r.options.slidesToShow+2):(s=Math.max(0,r.currentSlide-(r.options.slidesToShow/2+1)),n=2+(r.options.slidesToShow/2+1)+r.currentSlide):(s=r.options.infinite?r.options.slidesToShow+r.currentSlide:r.currentSlide,n=Math.ceil(s+r.options.slidesToShow),r.options.fade===!0&&(s>0&&s--,n<=r.slideCount&&n++)),t=r.$slider.find(".slick-slide").slice(s,n),"anticipated"===r.options.lazyLoad)for(var l=s-1,d=n,a=r.$slider.find(".slick-slide"),c=0;c<r.options.slidesToScroll;c++)l<0&&(l=r.slideCount-1),t=t.add(a.eq(l)),t=t.add(a.eq(d)),l--,d++;e(t),r.slideCount<=r.options.slidesToShow?(o=r.$slider.find(".slick-slide"),e(o)):r.currentSlide>=r.slideCount-r.options.slidesToShow?(o=r.$slider.find(".slick-cloned").slice(0,r.options.slidesToShow),e(o)):0===r.currentSlide&&(o=r.$slider.find(".slick-cloned").slice(r.options.slidesToShow*-1),e(o))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){var i=this;i.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(e){var t=this;if(!t.unslicked&&(t.$slider.trigger("afterChange",[t,e]),t.animating=!1,t.slideCount>t.options.slidesToShow&&t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),t.options.accessibility===!0&&(t.initADA(),t.options.focusOnChange))){var o=i(t.$slides.get(t.currentSlide));o.attr("tabindex",0).focus()}},e.prototype.prev=e.prototype.slickPrev=function(){var i=this;i.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n,r,l=this,d=i("img[data-lazy]",l.$slider);d.length?(t=d.first(),o=t.attr("data-lazy"),s=t.attr("data-srcset"),n=t.attr("data-sizes")||l.$slider.attr("data-sizes"),r=document.createElement("img"),r.onload=function(){s&&(t.attr("srcset",s),n&&t.attr("sizes",n)),t.attr("src",o).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),l.options.adaptiveHeight===!0&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,t,o]),l.progressiveLazyLoad()},r.onerror=function(){e<3?setTimeout(function(){l.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,t,o]),l.progressiveLazyLoad())},r.src=o):l.$slider.trigger("allImagesLoaded",[l])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){s.respondTo=s.options.respondTo||"window";for(e in n)if(o=s.breakpoints.length-1,n.hasOwnProperty(e)){for(t=n[e].breakpoint;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),e.options.focusOnSelect===!0&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;return"boolean"==typeof i?(e=i,i=e===!0?0:o.slideCount-1):i=e===!0?--i:i,!(o.slideCount<1||i<0||i>o.slideCount-1)&&(o.unload(),t===!0?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,void o.reinit())},e.prototype.setCSS=function(i){var e,t,o=this,s={};o.options.rtl===!0&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,o.transformsEnabled===!1?o.$slideTrack.css(s):(s={},o.cssTransitions===!1?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;i.options.vertical===!1?i.options.centerMode===!0&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),i.options.centerMode===!0&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),i.options.vertical===!1&&i.options.variableWidth===!1?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):i.options.variableWidth===!0?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();i.options.variableWidth===!1&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,t.options.rtl===!0?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&i.options.adaptiveHeight===!0&&i.options.vertical===!1){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if("object"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n="multiple"):"string"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],"responsive"===arguments[0]&&"array"===i.type(arguments[1])?n="responsive":"undefined"!=typeof arguments[1]&&(n="single")),"single"===n)r.options[o]=s;else if("multiple"===n)i.each(o,function(i,e){r.options[i]=e});else if("responsive"===n)for(t in s)if("array"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),i.options.fade===!1?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=i.options.vertical===!0?"top":"left",
|
18 |
+
"top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||i.options.useCSS===!0&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&i.animType!==!1&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&i.animType!==!1},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;if(t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),n.options.centerMode===!0){var r=n.options.slidesToShow%2===0?1:0;e=Math.floor(n.options.slidesToShow/2),n.options.infinite===!0&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e+r,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1+r,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")}else i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=n.options.infinite===!0?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(s.options.fade===!0&&(s.options.centerMode=!1),s.options.infinite===!0&&s.options.fade===!1&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=s.options.centerMode===!0?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;e<o+s.slideCount;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.interrupt=function(i){var e=this;i||e.autoPlay(),e.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));return s||(s=0),t.slideCount<=t.options.slidesToShow?void t.slideHandler(s,!1,!0):void t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d=null,a=this;if(e=e||!1,!(a.animating===!0&&a.options.waitForAnimate===!0||a.options.fade===!0&&a.currentSlide===i))return e===!1&&a.asNavFor(i),o=i,d=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,a.options.infinite===!1&&a.options.centerMode===!1&&(i<0||i>a.getDotCount()*a.options.slidesToScroll)?void(a.options.fade===!1&&(o=a.currentSlide,t!==!0&&a.slideCount>a.options.slidesToShow?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o))):a.options.infinite===!1&&a.options.centerMode===!0&&(i<0||i>a.slideCount-a.options.slidesToScroll)?void(a.options.fade===!1&&(o=a.currentSlide,t!==!0&&a.slideCount>a.options.slidesToShow?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o))):(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=o<0?a.slideCount%a.options.slidesToScroll!==0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!==0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&(l=a.getNavTarget(),l=l.slick("getSlick"),l.slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide)),a.updateDots(),a.updateArrows(),a.options.fade===!0?(t!==!0?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight()):void(t!==!0&&a.slideCount>a.options.slidesToShow?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s)))},e.prototype.startLoad=function(){var i=this;i.options.arrows===!0&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),i.options.dots===!0&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),o=Math.round(180*t/Math.PI),o<0&&(o=360-Math.abs(o)),o<=45&&o>=0?s.options.rtl===!1?"left":"right":o<=360&&o>=315?s.options.rtl===!1?"left":"right":o>=135&&o<=225?s.options.rtl===!1?"right":"left":s.options.verticalSwiping===!0?o>=35&&o<=135?"down":"up":"vertical"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1,!1;if(o.interrupted=!1,o.shouldClick=!(o.touchObject.swipeLength>10),void 0===o.touchObject.curX)return!1;if(o.touchObject.edgeHit===!0&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(e.options.swipe===!1||"ontouchend"in document&&e.options.swipe===!1||e.options.draggable===!1&&i.type.indexOf("mouse")!==-1))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,e.options.verticalSwiping===!0&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r,l=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!l.dragging||l.scrolling||n&&1!==n.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,l.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),r=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&r>4?(l.scrolling=!0,!1):(l.options.verticalSwiping===!0&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(l.options.rtl===!1?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),l.options.verticalSwiping===!0&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,l.options.infinite===!1&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),l.options.vertical===!1?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,l.options.verticalSwiping===!0&&(l.swipeLeft=e+o*s),l.options.fade!==!0&&l.options.touchMove!==!1&&(l.animating===!0?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;return t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow?(t.touchObject={},!1):(void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,void(t.dragging=!0))},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i,e=this;i=Math.floor(e.options.slidesToShow/2),e.options.arrows===!0&&e.slideCount>e.options.slidesToShow&&!e.options.infinite&&(e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),e.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===e.currentSlide?(e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):e.currentSlide>=e.slideCount-e.options.slidesToShow&&e.options.centerMode===!1?(e.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):e.currentSlide>=e.slideCount-1&&e.options.centerMode===!0&&(e.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;i<r;i++)if("object"==typeof s||"undefined"==typeof s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),"undefined"!=typeof t)return t;return o}});
|
public/js/wp-carousel-free-public.js
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ($) {
|
2 |
+
'use strict';
|
3 |
+
jQuery('body').find('.wpcp-carousel-section.wpcp-standard').each(function () {
|
4 |
+
|
5 |
+
var carousel_id = $(this).attr('id');
|
6 |
+
var _this = $(this);
|
7 |
+
|
8 |
+
if (jQuery().slick) {
|
9 |
+
|
10 |
+
jQuery('#' + carousel_id).slick({
|
11 |
+
prevArrow: '<div class="slick-prev"><i class="fa fa-angle-left"></i></div>',
|
12 |
+
nextArrow: '<div class="slick-next"><i class="fa fa-angle-right"></i></div>',
|
13 |
+
lazyLoad: 'ondemand',
|
14 |
+
});
|
15 |
+
}
|
16 |
+
});
|
17 |
+
})(jQuery);
|
public/shortcode-deprecated.php
ADDED
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Registering shortcode.
|
4 |
+
*
|
5 |
+
* @package WP Carousel
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! function_exists( 'wp_carousel_free_shortcode' ) ) {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Shortcode main function.
|
12 |
+
*
|
13 |
+
* @param mixed $attr The attributes of the shortcode.
|
14 |
+
* @return statement
|
15 |
+
*/
|
16 |
+
function wp_carousel_free_shortcode( $attr ) {
|
17 |
+
$post = get_post();
|
18 |
+
|
19 |
+
static $instance = 0;
|
20 |
+
$instance ++;
|
21 |
+
|
22 |
+
if ( ! empty( $attr['ids'] ) ) {
|
23 |
+
if ( empty( $attr['orderby'] ) ) {
|
24 |
+
$attr['orderby'] = 'post__in';
|
25 |
+
}
|
26 |
+
$attr['include'] = $attr['ids'];
|
27 |
+
}
|
28 |
+
|
29 |
+
$output = apply_filters( 'sp_wcfgallery_shortcode', '', $attr );
|
30 |
+
if ( '' != $output ) {
|
31 |
+
return $output;
|
32 |
+
}
|
33 |
+
|
34 |
+
if ( isset( $attr['orderby'] ) ) {
|
35 |
+
$attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );
|
36 |
+
if ( ! $attr['orderby'] ) {
|
37 |
+
unset( $attr['orderby'] );
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
extract(
|
42 |
+
shortcode_atts(
|
43 |
+
array(
|
44 |
+
'ids' => '',
|
45 |
+
'items' => '5',
|
46 |
+
'items_desktop' => '4',
|
47 |
+
'items_desktop_small' => '3',
|
48 |
+
'items_tablet' => '2',
|
49 |
+
'items_mobile' => '1',
|
50 |
+
'bullets' => 'false',
|
51 |
+
'bullets_mobile' => 'false',
|
52 |
+
'nav' => 'true',
|
53 |
+
'nav_mobile' => 'true',
|
54 |
+
'auto_play' => 'true',
|
55 |
+
'autoplay_speed' => '3000',
|
56 |
+
'speed' => '600',
|
57 |
+
'infinite' => 'true',
|
58 |
+
'pause_on_hover' => 'true',
|
59 |
+
'swipe' => 'true',
|
60 |
+
'draggable' => 'true',
|
61 |
+
'size' => 'medium',
|
62 |
+
'include' => '',
|
63 |
+
'exclude' => '',
|
64 |
+
), $attr, 'gallery'
|
65 |
+
)
|
66 |
+
);
|
67 |
+
|
68 |
+
// helper function to return shortcode regex match on instance occurring on page or post.
|
69 |
+
if ( ! function_exists( 'get_match' ) ) {
|
70 |
+
/**
|
71 |
+
* Find and match gallery shortcode
|
72 |
+
*
|
73 |
+
* @param mix $regex The regular expression.
|
74 |
+
* @param mix $content The regular expression content.
|
75 |
+
* @param mix $instance The regular expression match.
|
76 |
+
* @return statement
|
77 |
+
*/
|
78 |
+
function get_match( $regex, $content, $instance ) {
|
79 |
+
preg_match_all( $regex, $content, $matches );
|
80 |
+
|
81 |
+
return $matches[1][ $instance ];
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
// Extract the shortcode arguments from the $page or $post.
|
86 |
+
$shortcode_args = shortcode_parse_atts( get_match( '/\[wcfgallery\s(.*)\]/isU', $post->post_content, $instance - 1 ) );
|
87 |
+
|
88 |
+
// get the ids specified in the shortcode call.
|
89 |
+
if ( is_array( $ids ) ) {
|
90 |
+
$ids = $shortcode_args['ids'];
|
91 |
+
}
|
92 |
+
|
93 |
+
$id = uniqid();
|
94 |
+
$order = 'DESC';
|
95 |
+
$orderby = 'title';
|
96 |
+
|
97 |
+
if ( 'RAND' == $order ) {
|
98 |
+
$orderby = 'none';
|
99 |
+
}
|
100 |
+
|
101 |
+
if ( ! empty( $ids ) ) {
|
102 |
+
$_attachments = get_posts(
|
103 |
+
array(
|
104 |
+
'include' => $ids,
|
105 |
+
'post_status' => 'inherit',
|
106 |
+
'post_type' => 'attachment',
|
107 |
+
'post_mime_type' => 'image',
|
108 |
+
'order' => $order,
|
109 |
+
'orderby' => $orderby,
|
110 |
+
)
|
111 |
+
);
|
112 |
+
|
113 |
+
$attachments = array();
|
114 |
+
foreach ( $_attachments as $key => $val ) {
|
115 |
+
$attachments[ $val->ID ] = $_attachments[ $key ];
|
116 |
+
}
|
117 |
+
} elseif ( ! empty( $exclude ) ) {
|
118 |
+
$attachments = get_children(
|
119 |
+
array(
|
120 |
+
'post_parent' => $id,
|
121 |
+
'exclude' => $exclude,
|
122 |
+
'post_status' => 'inherit',
|
123 |
+
'post_type' => 'attachment',
|
124 |
+
'post_mime_type' => 'image',
|
125 |
+
'order' => $order,
|
126 |
+
'orderby' => $orderby,
|
127 |
+
)
|
128 |
+
);
|
129 |
+
}
|
130 |
+
|
131 |
+
if ( empty( $attachments ) ) {
|
132 |
+
return '';
|
133 |
+
}
|
134 |
+
|
135 |
+
if ( is_feed() ) {
|
136 |
+
$output = "\n";
|
137 |
+
foreach ( $attachments as $att_id => $attachment ) {
|
138 |
+
$output .= wp_get_attachment_link( $att_id, $size, true ) . "\n";
|
139 |
+
}
|
140 |
+
|
141 |
+
return $output;
|
142 |
+
}
|
143 |
+
|
144 |
+
$gallery_style = $gallery_div = '';
|
145 |
+
|
146 |
+
// Carousel Configurations.
|
147 |
+
wp_enqueue_script( 'wpcf-slick' );
|
148 |
+
wp_enqueue_script( 'wpcf-slick-config' );
|
149 |
+
$wpcp_slick_options = 'data-slick=\'{ "accessibility": true, "arrows":' . $nav . ', "autoplay":' . $auto_play . ', "autoplaySpeed":' . $autoplay_speed . ', "dots":' . $bullets . ', "infinite":' . $infinite . ', "speed":' . $speed . ', "pauseOnHover":' . $pause_on_hover . ', "slidesToShow":' . $items . ', "responsive":[ { "breakpoint":1200, "settings": { "slidesToShow":' . $items_desktop . ' } }, { "breakpoint":980, "settings":{ "slidesToShow":' . $items_desktop_small . ' } }, { "breakpoint":736, "settings": { "slidesToShow":' . $items_tablet . ' } }, {"breakpoint":480, "settings":{ "slidesToShow":' . $items_mobile . ', "arrows":' . $nav_mobile . ', "dots":' . $bullets_mobile . ' } } ], "rows":1, "swipe":' . $swipe . ', "draggable":' . $draggable . ' }\' ';
|
150 |
+
|
151 |
+
$gallery_div = "
|
152 |
+
<div id='wordpress-carousel-free-$id' class='wpcp-carousel-section wpcp-standard nav-vertical-center' $wpcp_slick_options>";
|
153 |
+
|
154 |
+
$output = apply_filters( 'gallery_style', $gallery_style . $gallery_div );
|
155 |
+
|
156 |
+
foreach ( $attachments as $attach_id => $attachment ) {
|
157 |
+
$wcf_image_url = wp_get_attachment_image_src( $attach_id, $size, false );
|
158 |
+
$wcf_image_title = $attachment->post_title;
|
159 |
+
|
160 |
+
$output .= "
|
161 |
+
<div class='wpcp-single-item'>
|
162 |
+
<img src='$wcf_image_url[0]' alt='$wcf_image_title' />
|
163 |
+
</div>";
|
164 |
+
}
|
165 |
+
|
166 |
+
$output .= "
|
167 |
+
</div>\n";
|
168 |
+
|
169 |
+
return $output;
|
170 |
+
}
|
171 |
+
|
172 |
+
add_shortcode( 'wcfgallery', 'wp_carousel_free_shortcode' );
|
173 |
+
}
|
public/templates/image-carousel.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The image carousel template.
|
4 |
+
*
|
5 |
+
* @package WP_Carousel_Free
|
6 |
+
* @subpackage WP_Carousel_Free/public/templates
|
7 |
+
*/
|
8 |
+
|
9 |
+
// If this file is called directly, abort.
|
10 |
+
if ( ! defined( 'WPINC' ) ) {
|
11 |
+
die;
|
12 |
+
}
|
13 |
+
|
14 |
+
$gallery_ids = $upload_data['wpcp_gallery'];
|
15 |
+
$the_image_title_at = isset( $shortcode_data['wpcp_logo_link_nofollow'] ) ? $shortcode_data['wpcp_logo_link_nofollow'] : '';
|
16 |
+
$image_link_nofollow = true == $the_image_title_at ? ' rel="nofollow"' : '';
|
17 |
+
if ( empty( $gallery_ids ) ) {
|
18 |
+
return;
|
19 |
+
}
|
20 |
+
echo '<div class="wpcp-carousel-wrapper wpcp-wrapper-' . $post_id . '">';
|
21 |
+
if ( $section_title ) {
|
22 |
+
echo '<h2 class="sp-wpcpro-section-title">' . get_the_title( $post_id ) . '</h2>';
|
23 |
+
}
|
24 |
+
echo '<div id="sp-wp-carousel-free-id-' . $post_id . '" class="' . $carousel_classes . '" ' . $wpcp_slick_options . '>';
|
25 |
+
$attachments = explode( ',', $gallery_ids );
|
26 |
+
( ( 'rand' == $image_orderby ) ? shuffle( $attachments ) : '' );
|
27 |
+
if ( is_array( $attachments ) || is_object( $attachments ) ) :
|
28 |
+
foreach ( $attachments as $attachment ) {
|
29 |
+
$image_data = get_post( $attachment );
|
30 |
+
$image_title = $image_data->post_title;
|
31 |
+
$image_alt_titles = $image_data->_wp_attachment_image_alt;
|
32 |
+
$image_alt_title = ! empty( $image_alt_titles ) ? $image_alt_titles : $image_title;
|
33 |
+
$image_url = wp_get_attachment_image_src( $attachment, $image_sizes );
|
34 |
+
$the_image_title_attr = ' title="' . $image_title . '"';
|
35 |
+
$image_title_attr = 'true' === $show_image_title_attr ? $the_image_title_attr : '';
|
36 |
+
$image_src = $image_url[0];
|
37 |
+
$image = sprintf( '<img src="%1$s"%2$s alt="%3$s">', $image_src, $image_title_attr, $image_alt_title );
|
38 |
+
// Single Item.
|
39 |
+
echo '<div class="wpcp-single-item">';
|
40 |
+
echo sprintf( '<div class="wpcp-slide-image">%1$s</div>', $image );
|
41 |
+
echo '</div>';
|
42 |
+
} // End foreach.
|
43 |
+
endif;
|
44 |
+
echo '</div>';
|
45 |
+
echo '</div>'; // Carousel Wrapper.
|
public/templates/post-carousel.php
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The image carousel template.
|
4 |
+
*
|
5 |
+
* @package WP_Carousel_Free
|
6 |
+
* @subpackage WP_Carousel_Free/public/templates
|
7 |
+
*/
|
8 |
+
|
9 |
+
// If this file is called directly, abort.
|
10 |
+
if ( ! defined( 'WPINC' ) ) {
|
11 |
+
die;
|
12 |
+
}
|
13 |
+
|
14 |
+
|
15 |
+
$number_of_total_posts = ( isset( $upload_data['number_of_total_posts'] ) ? $upload_data['number_of_total_posts'] : '' );
|
16 |
+
|
17 |
+
$show_post_content = $shortcode_data['wpcp_post_content_show'];
|
18 |
+
$show_post_date = $shortcode_data['wpcp_post_date_show'];
|
19 |
+
$show_post_author = $shortcode_data['wpcp_post_author_show'];
|
20 |
+
$args = array(
|
21 |
+
'post_type' => 'post',
|
22 |
+
'post_status' => 'publish',
|
23 |
+
'order' => $post_order,
|
24 |
+
'orderby' => $post_order_by,
|
25 |
+
'ignore_sticky_posts' => 1,
|
26 |
+
'posts_per_page' => $number_of_total_posts,
|
27 |
+
);
|
28 |
+
|
29 |
+
// Carousel Wrapper Start.
|
30 |
+
echo '<div class="wpcp-carousel-wrapper wpcp-wrapper-' . $post_id . '">';
|
31 |
+
if ( $section_title ) {
|
32 |
+
echo '<h2 class="sp-wpcpro-section-title">' . get_the_title( $post_id ) . '</h2>';
|
33 |
+
}
|
34 |
+
echo '<div id="sp-wp-carousel-free-id-' . $post_id . '" class="' . $carousel_classes . '" ' . $wpcp_slick_options . '>';
|
35 |
+
$post_query = new WP_Query( $args );
|
36 |
+
if ( $post_query->have_posts() ) {
|
37 |
+
while ( $post_query->have_posts() ) :
|
38 |
+
$post_query->the_post();
|
39 |
+
$image = '';
|
40 |
+
if ( has_post_thumbnail( $post_query->post->ID ) && $show_slide_image ) {
|
41 |
+
$image_id = get_post_thumbnail_id();
|
42 |
+
$image_url = wp_get_attachment_image_src( $image_id, $image_sizes );
|
43 |
+
$image_alt_text = get_post_meta( $image_id, '_wp_attachment_image_alt', true );
|
44 |
+
$the_image_title_attr = ' title="' . the_title_attribute( 'echo=0' ) . '"';
|
45 |
+
$image_title_attr = ( 'true' === $show_image_title_attr ) ? $the_image_title_attr : '';
|
46 |
+
|
47 |
+
$post_thumb = sprintf( '<img class="wpcp-post-thumb" src="%1$s"%2$s alt="%3$s">', $image_url[0], $image_title_attr, $image_alt_text );
|
48 |
+
|
49 |
+
$image = sprintf( '<div class="wpcp-slide-image"><a href="%2$s">%1$s</a></div>', $post_thumb, get_the_permalink() );
|
50 |
+
|
51 |
+
} // End of Has post thumbnail.
|
52 |
+
|
53 |
+
// Post Title.
|
54 |
+
$title = sprintf( '<h2 class="wpcp-post-title"><a href="%1$s">%2$s</a></h2>', get_the_permalink(), get_the_title() );
|
55 |
+
$wpcp_post_title = ( $show_img_title && ! empty( get_the_title() ) ) ? $title : '';
|
56 |
+
|
57 |
+
// The Post Author.
|
58 |
+
$the_post_author_name = sprintf( '<li><a href="%1$s">%2$s%3$s</a></li>', get_author_posts_url( get_the_author_meta( 'ID' ) ), __( ' By ', 'wp-carousel-free' ), get_the_author() );
|
59 |
+
$post_author_name = $show_post_author ? $the_post_author_name : '';
|
60 |
+
|
61 |
+
// The Post Date.
|
62 |
+
$post_update_date = sprintf( '<time class="updated wpcp-hidden" datetime="%1$s">%2$s</time>', get_the_modified_date( 'c' ), get_the_modified_date() );
|
63 |
+
$wpcp_post_date = sprintf( '<li><time class="entry-date published updated" datetime="%1$s">%2$s%3$s</time></li>', get_the_date( 'c' ), __( 'On ', 'wp-carousel-free' ), get_the_date() );
|
64 |
+
$post_date = $show_post_date ? $wpcp_post_date : '';
|
65 |
+
|
66 |
+
// The Post Meta.
|
67 |
+
$wpcp_post_meta = '';
|
68 |
+
if ( $show_post_date || $show_post_author ) {
|
69 |
+
$wpcp_post_meta = sprintf( '<ul class="wpcp-post-meta">%1$s%2$s</ul>', $post_author_name, $post_date );
|
70 |
+
}
|
71 |
+
|
72 |
+
// Post Content.
|
73 |
+
$wpcp_post_content = sprintf( '<p>%1$s</p>', get_the_excerpt() );
|
74 |
+
|
75 |
+
$all_captions = '';
|
76 |
+
if ( $show_img_title || $show_post_content || ! empty( $wpcp_post_meta ) ) {
|
77 |
+
$all_captions = '<div class="wpcp-all-captions">' . $wpcp_post_title . ( $show_post_content ? $wpcp_post_content : '' ) . $wpcp_post_meta . '</div>';
|
78 |
+
}
|
79 |
+
|
80 |
+
if ( $image || $all_captions ) {
|
81 |
+
echo '<div class="wpcp-single-item">';
|
82 |
+
echo $image . $all_captions;
|
83 |
+
echo '</div>';
|
84 |
+
}
|
85 |
+
endwhile;
|
86 |
+
wp_reset_postdata();
|
87 |
+
} else {
|
88 |
+
echo '<h2 class="wpcp-no-post-found" >' . esc_html__( 'No posts found', 'wp-carousel-free' ) . '</h2>';
|
89 |
+
}
|
90 |
+
echo '</div>';
|
91 |
+
echo '</div>'; // Carousel Wrapper.
|
public/templates/product-carousel.php
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The image carousel template.
|
4 |
+
*
|
5 |
+
* @package WP_Carousel_Free
|
6 |
+
* @subpackage WP_Carousel_Free/public/templates
|
7 |
+
*/
|
8 |
+
|
9 |
+
// If this file is called directly, abort.
|
10 |
+
if ( ! defined( 'WPINC' ) ) {
|
11 |
+
die;
|
12 |
+
}
|
13 |
+
if ( ! class_exists( 'WooCommerce' ) ) {
|
14 |
+
return;
|
15 |
+
}
|
16 |
+
|
17 |
+
$number_of_total_products = $upload_data['wpcp_total_products'];
|
18 |
+
|
19 |
+
// $show_product_image = $shortcode_data['show_image'];
|
20 |
+
$show_product_name = $shortcode_data['wpcp_product_name'];
|
21 |
+
$show_product_price = $shortcode_data['wpcp_product_price'];
|
22 |
+
$show_product_rating = $shortcode_data['wpcp_product_rating'];
|
23 |
+
$show_product_cart = $shortcode_data['wpcp_product_cart'];
|
24 |
+
$default_args = array(
|
25 |
+
'post_type' => 'product',
|
26 |
+
'post_status' => 'publish',
|
27 |
+
'ignore_sticky_posts' => 1,
|
28 |
+
'posts_per_page' => $number_of_total_products,
|
29 |
+
'order' => $post_order,
|
30 |
+
'orderby' => $post_order_by,
|
31 |
+
'meta_query' => array(
|
32 |
+
array(
|
33 |
+
'key' => '_stock_status',
|
34 |
+
'value' => 'outofstock',
|
35 |
+
'compare' => 'NOT IN',
|
36 |
+
),
|
37 |
+
),
|
38 |
+
);
|
39 |
+
$product_query = new WP_Query( $default_args );
|
40 |
+
|
41 |
+
// Carousel Wrapper Start.
|
42 |
+
echo '<div class="wpcp-carousel-wrapper wpcp-wrapper-' . $post_id . '">';
|
43 |
+
if ( $section_title ) {
|
44 |
+
echo '<h2 class="sp-wpcpro-section-title">' . get_the_title( $post_id ) . '</h2>';
|
45 |
+
}
|
46 |
+
echo '<div id="sp-wp-carousel-free-id-' . $post_id . '" class="' . $carousel_classes . '" ' . $wpcp_slick_options . '>';
|
47 |
+
if ( $product_query->have_posts() ) {
|
48 |
+
while ( $product_query->have_posts() ) :
|
49 |
+
$product_query->the_post();
|
50 |
+
global $product, $woocommerce;
|
51 |
+
echo '<div class="wpcp-single-item">';
|
52 |
+
|
53 |
+
$product_thumb_id = get_post_thumbnail_id();
|
54 |
+
$product_thumb_alt_text = get_post_meta( $product_thumb_id, '_wp_attachment_image_alt', true );
|
55 |
+
$image_url = wp_get_attachment_image_src( $product_thumb_id, $image_sizes );
|
56 |
+
$the_image_title_attr = ' title="' . get_the_title() . '"';
|
57 |
+
$image_title_attr = 'true' == $show_image_title_attr ? $the_image_title_attr : '';
|
58 |
+
|
59 |
+
// Product Thumbnail.
|
60 |
+
$wpcp_product_image = '';
|
61 |
+
if ( ! empty( $image_url[0] ) && $show_slide_image ) {
|
62 |
+
$wpcp_product_thumb = sprintf( '<img class="wpcp-product-image" src="%1$s"%2$s alt="%3$s" />', $image_url[0], $image_title_attr, $product_thumb_alt_text );
|
63 |
+
|
64 |
+
$wpcp_product_image = sprintf( '<div class="wpcp-slide-image"><a href="%1$s">%2$s</a></div>', get_the_permalink(), $wpcp_product_thumb );
|
65 |
+
}
|
66 |
+
|
67 |
+
// Product name.
|
68 |
+
$wpcp_product_name = sprintf( '<h2 class="wpcp-product-title"><a href="%1$s">%2$s</a></h2>', get_the_permalink(), get_the_title() );
|
69 |
+
|
70 |
+
$price_html = $product->get_price_html();
|
71 |
+
if ( $price_html ) {
|
72 |
+
$wpcp_product_price = sprintf( '<div class="wpcp-product-price">%1$s</div>', $price_html );
|
73 |
+
}
|
74 |
+
|
75 |
+
// Product rating.
|
76 |
+
$av_rating = $product->get_average_rating();
|
77 |
+
$average_rating = ( $av_rating / 5 ) * 100;
|
78 |
+
if ( $average_rating > 0 ) {
|
79 |
+
$wpcp_product_rating = sprintf( '<div class="wpcp-product-rating woocommerce"><div class="woocommerce-product-rating"><div class="star-rating" title="%1$s %2$s %3$s"><span style="width:%4$s"></span></div></div></div>', __( 'Rated ', 'wp-carousel-free' ), $av_rating, __( ' out of 5', 'wp-carousel-free' ), $average_rating . '%' );
|
80 |
+
}
|
81 |
+
|
82 |
+
// Add to cart button.
|
83 |
+
$wpcp_cart = apply_filters( 'wpcp_filter_product_cart', do_shortcode( '[add_to_cart id="' . get_the_ID() . '" show_price="false" style="none"]' ) );
|
84 |
+
$wpcp_cart_button = sprintf( '<div class="wpcp-cart-button">%1$s</div>', $wpcp_cart );
|
85 |
+
|
86 |
+
if ( $show_product_name || $show_product_rating || $show_product_price || $show_product_cart ) {
|
87 |
+
$wpcp_product_details = '<div class="wpcp-all-captions">' . ( ( $show_product_name ) && isset( $wpcp_product_name ) ? $wpcp_product_name : '' ) . ( $show_product_price && isset( $wpcp_product_price ) ? $wpcp_product_price : '' ) . ( $show_product_rating && isset( $wpcp_product_rating ) ? $wpcp_product_rating : '' ) . ( $show_product_cart ? $wpcp_cart_button : '' ) . '</div>';
|
88 |
+
}
|
89 |
+
echo $wpcp_product_image . $wpcp_product_details;
|
90 |
+
echo '</div>';
|
91 |
+
|
92 |
+
endwhile;
|
93 |
+
wp_reset_postdata();
|
94 |
+
} else {
|
95 |
+
$outline .= '<h2 class="sp-not-found-any-post" >' . esc_html__( 'No products found', 'wp-carousel-free' ) . '</h2>';
|
96 |
+
}
|
97 |
+
echo '</div>
|
98 |
+
</div>'; // Carousel Wrapper.
|
readme.txt
CHANGED
@@ -1,304 +1,395 @@
|
|
1 |
-
=== WordPress Carousel ===
|
2 |
-
Contributors: shapedplugin
|
3 |
-
Donate link: http://shapedplugin.com/donate
|
4 |
-
Tags: carousel,
|
5 |
-
Requires at least: 4.3
|
6 |
-
Tested up to:
|
7 |
-
License: GPLv2 or later
|
8 |
-
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
== Description ==
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
**
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
*
|
34 |
-
|
35 |
-
*
|
36 |
-
|
37 |
-
*
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
*
|
52 |
-
*
|
53 |
-
*
|
54 |
-
*
|
55 |
-
*
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
*
|
61 |
-
*
|
62 |
-
*
|
63 |
-
*
|
64 |
-
*
|
65 |
-
*
|
66 |
-
*
|
67 |
-
*
|
68 |
-
*
|
69 |
-
*
|
70 |
-
*
|
71 |
-
*
|
72 |
-
*
|
73 |
-
*
|
74 |
-
*
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
*
|
91 |
-
* Show
|
92 |
-
*
|
93 |
-
*
|
94 |
-
* **
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
*
|
101 |
-
*
|
102 |
-
*
|
103 |
-
*
|
104 |
-
*
|
105 |
-
*
|
106 |
-
*
|
107 |
-
*
|
108 |
-
*
|
109 |
-
*
|
110 |
-
*
|
111 |
-
*
|
112 |
-
*
|
113 |
-
* Show/hide
|
114 |
-
*
|
115 |
-
*
|
116 |
-
*
|
117 |
-
*
|
118 |
-
*
|
119 |
-
*
|
120 |
-
*
|
121 |
-
*
|
122 |
-
*
|
123 |
-
*
|
124 |
-
*
|
125 |
-
*
|
126 |
-
*
|
127 |
-
*
|
128 |
-
*
|
129 |
-
*
|
130 |
-
*
|
131 |
-
*
|
132 |
-
*
|
133 |
-
*
|
134 |
-
*
|
135 |
-
|
136 |
-
**
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
*
|
156 |
-
*
|
157 |
-
*
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
*
|
173 |
-
*
|
174 |
-
*
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
*
|
182 |
-
*
|
183 |
-
*
|
184 |
-
*
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
=
|
263 |
-
|
264 |
-
|
265 |
-
=
|
266 |
-
|
267 |
-
|
268 |
-
=
|
269 |
-
|
270 |
-
|
271 |
-
=
|
272 |
-
|
273 |
-
|
274 |
-
=
|
275 |
-
|
276 |
-
|
277 |
-
=
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
304 |
* First Release
|
1 |
+
=== WordPress Carousel ===
|
2 |
+
Contributors: shapedplugin
|
3 |
+
Donate link: http://shapedplugin.com/donate
|
4 |
+
Tags: wordpress carousel, best carousel plugin, image carousel, image slider, post carousel, custom post carousel, custom taxonomy carousel, woocommerce product carousel, content carousel, video carousel, video slider, video lightbox, youtube carousel, video gallery, carousel, slider, responsive slider, responsive carousel, carousel slider, ticker carousel, center mode carousel, slide anything, image gallery, image lightbox, wordpress image gallery, photo gallery, gallery slider, wordpress gallery plugin, gallery, post slider, vimeo slider, self hosted video carousel, content slider, wordpress slider, featured content slider, html slider, horizontal carousel slider, posts content slider, product carousel, woocommerce slider, woocommerce product slider
|
5 |
+
Requires at least: 4.3
|
6 |
+
Tested up to: 5.1
|
7 |
+
License: GPLv2 or later
|
8 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
+
|
10 |
+
|
11 |
+
The Most Powerful and User-friendly WordPress Carousel Plugin. Create beautiful carousels in minutes using Images, Posts, WooCommerce Products etc.
|
12 |
+
|
13 |
+
|
14 |
+
== Description ==
|
15 |
+
|
16 |
+
[youtube https://www.youtube.com/watch?v=hCeKn8jmxn4]
|
17 |
+
|
18 |
+
[__Live Demo__](https://wordpresscarousel.com/) | [__Video Tutorials__](https://www.youtube.com/shapedplugin/) | [__Documentation__](https://shapedplugin.com/docs/docs/wordpress-carousel/) | [__PRO Features »__](https://wordpresscarousel.com/#feature)
|
19 |
+
|
20 |
+
|
21 |
+
= Overview =
|
22 |
+
|
23 |
+
**WordPress Carousel** is the most powerful and user-friendly WordPress Carousel plugin to create beautiful carousels with **Images, Posts, WooCommerce Products etc.** This plugin will allow you simply select images from WordPress media library, drag and drop them into place and also supports WordPress posts and WooCommerce products. It's fully responsive, highly customizable and works smoothly on iPhone, iPad, Android, Firefox, Chrome, Safari, Opera and Edge.
|
24 |
+
|
25 |
+
We believe that you shouldn't be a coder or hire a developer to create a carousel for your WordPress site. That’s why we built the **WordPress Carousel** plugin that’s both **EASY and POWERFUL.**
|
26 |
+
|
27 |
+
= WordPress Carousel 2.0 =
|
28 |
+
|
29 |
+
**WordPress Carousel 2.0** has completely been rebuilt and this provides you now many improvements and new amazing features.
|
30 |
+
|
31 |
+
= You'll be able to display =
|
32 |
+
|
33 |
+
* **Image Carousel** – Create beautiful image carousels with uploading images via WordPress regular media gallery. Easily drag and drop image slides.
|
34 |
+
|
35 |
+
* **Post Carousel** – Display WordPress latest posts in the carousel with post title, image, excerpt, date, author etc.
|
36 |
+
|
37 |
+
* **WooCommerce Product Carousel** – Display latest WooCommerce products carousel. Show/hide the product name, image, price, rating, add to cart button etc.
|
38 |
+
|
39 |
+
|
40 |
+
= Key Feature List =
|
41 |
+
|
42 |
+
* Fully Responsive and Touch-friendly.
|
43 |
+
* Lightweight, Fast & Powerful.
|
44 |
+
* **Shortcode Generator.**
|
45 |
+
* Extremely User-friendly Admin Panel.
|
46 |
+
* **Create Carousel using images from media gallery, posts, products etc.**
|
47 |
+
* **Drag and drop image slides Re-ordering.**
|
48 |
+
* **Multiple Carousels.** (Create unlimited carousels into same page)
|
49 |
+
* **Multisite Supported.**
|
50 |
+
* Set border for image slide.
|
51 |
+
* AutoPlay on/off.
|
52 |
+
* AutoPlay Speed Control.
|
53 |
+
* Stop on hover carousel.
|
54 |
+
* Infinite looping for the carousel.
|
55 |
+
* Show/hide Navigation and Pagination dots.
|
56 |
+
* Navigation & Pagination dots color.
|
57 |
+
* Unlimited color and styling options.
|
58 |
+
* Control carousel columns on different devices.
|
59 |
+
* Display random order.
|
60 |
+
* Unique settings for each carousel.
|
61 |
+
* Touch Swipe options.
|
62 |
+
* Mouse Draggable enable or disable.
|
63 |
+
* Multilingual Ready.
|
64 |
+
* RTL Supported.
|
65 |
+
* Widget Supported.
|
66 |
+
* Compatible with any theme.
|
67 |
+
* Advanced Settings to enqueue or dequeue Scripts/CSS.
|
68 |
+
* Custom CSS field to override styles.
|
69 |
+
* Developer friendly & easy to customize.
|
70 |
+
* SEO friendly & optimized for speed.
|
71 |
+
* Support all modern browsers: IE, Firefox, Chrome, Safari, Opera, Edge etc.
|
72 |
+
* Documentation and Video Tutorials.
|
73 |
+
* **Fast and Active Support.**
|
74 |
+
* And much more options.
|
75 |
+
|
76 |
+
|
77 |
+
= For fast support, features request, and bug reporting =
|
78 |
+
|
79 |
+
>Ask us at [__Support Forum.__](https://shapedplugin.com/support-forum/)
|
80 |
+
|
81 |
+
|
82 |
+
= WordPress Carousel Pro =
|
83 |
+
|
84 |
+
[__WordPress Carousel Pro__](https://wordpresscarousel.com/) is the most powerful and user-friendly multi-purpose WordPress Carousel plugin to create beautiful carousels with **images, Posts, WooCommerce Products, Contents (Images, Text, HTML, Shortcodes), Video** etc. The plugin has own image and content management system and also supports **Posts, Pages, Custom Post Type, Taxonomy, Custom Taxonomy, Custom Contents, YouTube, Vimeo, Dailymotion, mp4, WebM, Self-hosted Video with Lightbox.** It's fully responsive, highly customizable and works smoothly on iPhone, iPad, Android, Firefox, Chrome, Safari, Opera and Edge.
|
85 |
+
|
86 |
+
It’s even easier to put images of different height together so the width is dynamic with fixed height so that your site looks pretty. The plugin vastly improves user experience and lets you create different types of beautiful carousels easily and quickly.
|
87 |
+
|
88 |
+
= Popular Carousel Types =
|
89 |
+
|
90 |
+
* **Image Carousel** - WordPress Carousel Pro allows you to create beautiful image carousels for your site in minutes! Upload images via WordPress regular media gallery, create a gallery to make carousel.
|
91 |
+
* **Post Carousel** - Display posts from multiple Categories, Tags, Formats, or Types: Latest, Taxonomies, Specific etc. Show the standard post contents: title, image, excerpt, read more, category, date, author, tags, comments etc.
|
92 |
+
* **Product Carousel** - Filter by different product types. (e.g. latest, categories, specific products etc.). Show/hide the product name, image, price, excerpt, read more, rating, add to cart button etc.
|
93 |
+
* **Content Carousel (Slide Anything)** - Slide anything you want based on your WordPress site. (e.g. images, text, HTML, shortcodes, any custom contents etc.) You can sort slide content by drag and drop easily.
|
94 |
+
* **Video Carousel** - Show videos from multiple sources: YouTube, Vimeo, Dailymotion, mp4, WebM, and even self-hosted video with Lightbox. A customizable video icon will place over the video thumb.
|
95 |
+
|
96 |
+
|
97 |
+
|
98 |
+
= WordPress Carousel Pro Features =
|
99 |
+
|
100 |
+
* [__All Sample Carousels__](https://wordpresscarousel.com/) (Live Demo in action).
|
101 |
+
* Fully Responsive and Touch-friendly.
|
102 |
+
* Advanced Shortcode Generator.
|
103 |
+
* **Slide Anything. (e.g. Image, Post, Product, Content, Video, Text, HTML, Shortcodes etc.)**
|
104 |
+
* **Display posts from multiple Categories, Tags, Formats, or Types. (e.g. Latest, Taxonomies, Specific etc.).**
|
105 |
+
* Add Unlimited Carousels. (e.g. post, page, custom template, widget or anywhere you want.)
|
106 |
+
* **840+ Google Fonts** (Advanced Typography).
|
107 |
+
* Enable/Disable option for Google Font loading.
|
108 |
+
* **100+ Advanced Styling and Visual Customization options.**
|
109 |
+
* Drag & Drop ordering Image, Content, Video.
|
110 |
+
* **Image Internal and External Links.**
|
111 |
+
* **Image Carousel (with caption and description.)**
|
112 |
+
* **Image Content Position (Bottom, Right, and Overlay).**
|
113 |
+
* Show/hide image caption and description.
|
114 |
+
* Slide border and inner padding.
|
115 |
+
* **Lightbox functionality for images.**
|
116 |
+
* Lightbox images group by the view.
|
117 |
+
* Smart lazy-loading option for images.
|
118 |
+
* GrayScale effect for images.
|
119 |
+
* Soft and Hard cropping option for image.
|
120 |
+
* Set equal or fixed height with CSS for images.
|
121 |
+
* Variable width option in the carousel.
|
122 |
+
* Image Title Attribute option.
|
123 |
+
* **Post Carousel.**
|
124 |
+
* Show the standard post contents or select which content you want to display. (Title, image, excerpt, read more, category, date, author, tags, comments etc.)
|
125 |
+
* Post excerpt and full content display option.
|
126 |
+
* Show Post Content with words limit.
|
127 |
+
* Show/hide read more button.
|
128 |
+
* Read more button text customization option.
|
129 |
+
* **WooCommerce Product Carousel.**
|
130 |
+
* **Product content position** (Bottom, right, overlay)
|
131 |
+
* **Filter by different product types. (e.g. latest, categories, specific products etc.).**
|
132 |
+
* Show/hide the standard product contents. (Product name, image, price, excerpt, read more, rating, add to cart etc.).
|
133 |
+
* Limit product description.
|
134 |
+
* Post order (Ascending & Descending) and order by ID, date, random, title, modified etc.
|
135 |
+
* **Content Carousel**
|
136 |
+
* **Slide Anything you want based on your website. (e.g. images, text, HTML, shortcodes, any custom contents etc.)**
|
137 |
+
* **Video Carousel.**
|
138 |
+
* Video icon color customization.
|
139 |
+
* Add video caption and description.
|
140 |
+
* Add custom video thumbnail for the Self-hosted Video.
|
141 |
+
* Custom CSS field to override styles.
|
142 |
+
* Display carousel section title.
|
143 |
+
* Set margin-bottom for the section title.
|
144 |
+
* Scripts Enqueue or Dequeue options to avoid conflicts.
|
145 |
+
* **Carousel Mode (Standard, Ticker and Center Mode).**
|
146 |
+
* AutoPlay on/off.
|
147 |
+
* Control AutoPlay and Pagination speed.
|
148 |
+
* Stop on hover carousel.
|
149 |
+
* Infinite looping for the carousel.
|
150 |
+
* Touch, swipe or tap on Android, iOS or any other touch devices.
|
151 |
+
* Mouse Draggable options.
|
152 |
+
* Adaptive height for the carousel.
|
153 |
+
* Enable or Disable carousel scroll with tab and keyboard.
|
154 |
+
* Set the number of slides to scroll.
|
155 |
+
* Show/hide carousel navigation and pagination dots.
|
156 |
+
* 8+ Different navigation positions.
|
157 |
+
* 6 FontAwesome directional icons.
|
158 |
+
* Hide navigation border and background.
|
159 |
+
* Set carousel pagination dots margin.
|
160 |
+
* Unlimited colors and styling options.
|
161 |
+
* Different types of sliding and hover effects.
|
162 |
+
* Control carousel column on different devices.
|
163 |
+
* Duplicate or clone carousels.
|
164 |
+
* Multisite supported.
|
165 |
+
* Automatic update integration.
|
166 |
+
* Widget ready.
|
167 |
+
* RTL supported.
|
168 |
+
* Compatible with any theme or extension.
|
169 |
+
* Support all browsers: Firefox, Chrome, IE, Safari etc.
|
170 |
+
* SEO friendly & optimized for speed.
|
171 |
+
* Extensive Online docs & Video Tutorials.
|
172 |
+
* **Fast and friendly support.**
|
173 |
+
* Any new features we add in the future (which is often).
|
174 |
+
* [__Full list of PRO features.__](https://shapedplugin.com/plugin/wordpress-carousel-pro/)
|
175 |
+
|
176 |
+
|
177 |
+
= Multilingual Ready =
|
178 |
+
|
179 |
+
* [WPML](https://wpml.org/)
|
180 |
+
* [Polylang](https://wordpress.org/plugins/polylang/)
|
181 |
+
* [qTranslate-x](https://wordpress.org/plugins/qtranslate-x/)
|
182 |
+
* [GTranslate](https://wordpress.org/plugins/gtranslate/)
|
183 |
+
* [Google Language Translator](https://wordpress.org/plugins/google-language-translator/)
|
184 |
+
* [WPGlobus](https://wordpress.org/plugins/wpglobus/)
|
185 |
+
|
186 |
+
= Page Builders Ready =
|
187 |
+
|
188 |
+
* Gutenberg (WordPress 5.0.2)
|
189 |
+
* WPBakery
|
190 |
+
* Elementor
|
191 |
+
* BeaverBuilder
|
192 |
+
* SiteOrgin
|
193 |
+
* DiviBuilder
|
194 |
+
* LayersWP
|
195 |
+
* MotoPress
|
196 |
+
* CornerStone
|
197 |
+
* Themify Builder etc.
|
198 |
+
|
199 |
+
|
200 |
+
**WordPress Carousel Pro - Admin Panel Overview**
|
201 |
+
|
202 |
+
[youtube https://www.youtube.com/watch?v=XMYYgFD7ZIA]
|
203 |
+
|
204 |
+
[__Watch all Tutorials »__](https://www.youtube.com/watch?v=m2XP6GNW0mE&index=2&list=PLoUb-7uG-5jNgTTcnUflIiytxgTWaBEzm)
|
205 |
+
|
206 |
+
= Premium Support and Documentation =
|
207 |
+
|
208 |
+
The premium version of the plugin entitles you to get fast, friendly, and priority support with replies posted within 24 hours (without holidays). Please [__submit__](https://shapedplugin.com/ask-question/) a support ticket here. This will create a support thread in our support portal.
|
209 |
+
|
210 |
+
For documentation and tutorials go to our [__Documentation__](https://shapedplugin.com/docs/docs/wordpress-carousel-pro/).
|
211 |
+
|
212 |
+
= Author =
|
213 |
+
Designed and Developed by [__ShapedPlugin__](https://shapedplugin.com/)
|
214 |
+
|
215 |
+
|
216 |
+
|
217 |
+
== Installation ==
|
218 |
+
|
219 |
+
= MINIMUM REQUIREMENTS =
|
220 |
+
|
221 |
+
* PHP 5.6 or later
|
222 |
+
* MySQL 5.6 or later
|
223 |
+
* WordPress 4.3 or later
|
224 |
+
|
225 |
+
**This section describes how to install the plugin and get it working**
|
226 |
+
|
227 |
+
= AUTOMATIC INSTALLATION (EASIEST WAY) =
|
228 |
+
|
229 |
+
To do an automatic install of WordPress Carousel, log in to your WordPress dashboard, navigate to the Plugins menu and
|
230 |
+
click Add New.
|
231 |
+
In the search field type "WordPress Carousel". Once you have found it you can install it by simply
|
232 |
+
clicking "Install Now" and then "Activate".
|
233 |
+
|
234 |
+
= MANUAL INSTALLATION =
|
235 |
+
|
236 |
+
**Uploading in WordPress Dashboard**
|
237 |
+
|
238 |
+
* Download wp-carousel-free.zip
|
239 |
+
* Navigate to the ‘Add New’ in the plugins dashboard
|
240 |
+
* Navigate to the ‘Upload’ area
|
241 |
+
* Select wp-carousel-free.zip from your computer
|
242 |
+
* Click ‘Install Now’
|
243 |
+
* Activate the plugin in the Plugin dashboard
|
244 |
+
|
245 |
+
**Using FTP**
|
246 |
+
|
247 |
+
* Download wp-carousel-free.zip
|
248 |
+
* Extract the wp-carousel-free directory to your computer
|
249 |
+
* Upload the wp-carousel-free directory to the /wp-content/plugins/ directory
|
250 |
+
* Activate the plugin in the Plugin dashboard
|
251 |
+
|
252 |
+
The WordPress codex contains <a href="https://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation">instructions</a> on how to install a WordPress plugin.
|
253 |
+
|
254 |
+
|
255 |
+
== Frequently Asked Questions ==
|
256 |
+
|
257 |
+
= Who should use WordPress Carousel? =
|
258 |
+
|
259 |
+
**WordPress Carousel** is perfect for photographers, designers, bloggers, different organizations, and small to large businesses. Basically, if you want to create beautiful carousels like, Image Carousel, Post Carousel, and Product Carousel, then you need to use WordPress Carousel.
|
260 |
+
|
261 |
+
|
262 |
+
= What types of carousel you can create using WordPress Carousel? =
|
263 |
+
You can create three (3) types of carousel using **WordPress Carousel** such as: **Image Carousel, Post Carousel, and Product Carousel.** And with the [__Premium Version__](http://shapedplugin.com/plugin/wordpress-carousel-pro/), you can create also **Content Carousel** and **Video Carousel**.
|
264 |
+
|
265 |
+
= Do I need to have coding skills to use WordPress Carousel? =
|
266 |
+
No. You don’t need any coding skill. No more pain writing any shortcode attributes to display carousel in your site. With just a few clicks, you can amazingly create unlimited Image, Post, and Product Carousels.
|
267 |
+
|
268 |
+
= Is WordPress Carousel responsive? =
|
269 |
+
Yes, WordPress Carousel is fully responsive, mobile and touch-friendly.
|
270 |
+
|
271 |
+
= Can I add WordPress Carousel anywhere on my website?=
|
272 |
+
Yes, you can add Logo Carousel inside your blog posts, pages, widgets, and anywhere else on your WordPress website with a shortcode or PHP function.
|
273 |
+
|
274 |
+
= Can I have multiple carousels with the separate setting?
|
275 |
+
Yes. You can have an unlimited carousel with each separate setting in the page, post, template, widget or anywhere you like.
|
276 |
+
|
277 |
+
= Will WordPress Carousel work with my theme? =
|
278 |
+
WordPress Carousel works with any WordPress theme if themes are developed according to WordPress standard.
|
279 |
+
|
280 |
+
= How can I get support if the plugin is not working? =
|
281 |
+
If you face any problem with our plugin or something is not working as it should, first follow the preliminary steps:
|
282 |
+
Test the plugin with a WordPress default theme, to be sure that the error is not caused by the theme you are currently using.
|
283 |
+
|
284 |
+
Deactivate all plugins you are using and check if the problem is still occurring.
|
285 |
+
|
286 |
+
If none of the previously listed actions helps you solve the problem, then, submit a ticket in the forum and describe your problem accurately, specify WordPress and plugin versions you are using and any other information that might help us solve your problem as quickly as possible.
|
287 |
+
|
288 |
+
Pro version users [__Support Forum__](https://shapedplugin.com/support/) and Free or Lite Version [__Support Forum__](https://shapedplugin.com/support-forum/).
|
289 |
+
|
290 |
+
= Where can I report bugs? =
|
291 |
+
If you find a bug, please report it in our active support forum. You will be replied once the issue is resolved.
|
292 |
+
|
293 |
+
= I’d like access to more features. How can I get them? =
|
294 |
+
You can get access to more features when you purchase a license of the plugin. Purchasing a license of [__WordPress Carousel Pro__](https://shapedplugin.com/plugin/wordpress-carousel-pro/) gets you to access the full version of WordPress Carousel, automatic lifetime updates, and support.
|
295 |
+
|
296 |
+
=Is WordPress Carousel Multilingual Ready?=
|
297 |
+
Yes, WordPress Carousel is 100% translation ready and tested with [WPML](https://wpml.org/), [Polylang](https://wordpress.org/plugins/polylang/), [qTranslate-x](https://wordpress.org/plugins/qtranslate-x/), [GTranslate](https://wordpress.org/plugins/gtranslate/), [Google Language Translator](https://wordpress.org/plugins/google-language-translator/), [WPGlobus](https://wordpress.org/plugins/wpglobus/) etc.
|
298 |
+
|
299 |
+
= Is WordPress Carousel compatible with WordPress multisite? =
|
300 |
+
Yes, WordPress Carousel works perfectly with WordPress multi-site network.
|
301 |
+
|
302 |
+
= How to use ‘WordPress Carousel’ in WordPress 5.0 Gutenberg Block Editor =
|
303 |
+
Adding a **WordPress Carousel (Image Carousel, Post Carousel, Product Carousel)** using the WordPress 5.0 **Block Editor** is pretty straight-forward. You can paste the generated shortcode into a ‘Paragraph Block’ or use the ‘Shortcode Block’. It works nicely as classic editor.
|
304 |
+
|
305 |
+
= Do you Like this Plugin and want to encourage us for improvement? =
|
306 |
+
Please give the plugin [__5 stars__](https://wordpress.org/support/plugin/wp-carousel-free/reviews/?filter=5#new-post) rating and your precious appreciation will help us to make it much great in the future.
|
307 |
+
|
308 |
+
Thank you!
|
309 |
+
|
310 |
+
|
311 |
+
|
312 |
+
== Screenshots ==
|
313 |
+
|
314 |
+
1. Live Demo.
|
315 |
+
2. Carousel Settings.
|
316 |
+
3. General Settings (Image Carousel).
|
317 |
+
4. Style Settings.
|
318 |
+
5. Post Carousel.
|
319 |
+
6. Product Carousel.
|
320 |
+
7. All Carousels.
|
321 |
+
8. Advanced Settings.
|
322 |
+
9. Custom CSS.
|
323 |
+
10. Drag & Drop Image Re-order.
|
324 |
+
|
325 |
+
|
326 |
+
|
327 |
+
== Changelog ==
|
328 |
+
|
329 |
+
= 2.0.1 =
|
330 |
+
* Fix: WordPress 5.1 compatible issue.
|
331 |
+
|
332 |
+
= 2.0.0 =
|
333 |
+
* New: Admin Dashboard Panel.
|
334 |
+
* New: Shortcode Generator.
|
335 |
+
* New: Drag and drop image slides Re-ordering.
|
336 |
+
* New: Post Carousel.
|
337 |
+
* New: WooCommerce Product Carousel.
|
338 |
+
* New: Multilingual Ready.
|
339 |
+
* New: Multisite Supported.
|
340 |
+
* New: Widget Supported.
|
341 |
+
* New: Carousel Section Title.
|
342 |
+
* New: Choose available sizes.
|
343 |
+
* New: Custom CSS options.
|
344 |
+
* New: Advanced Settings (Enqueue/Dequeue).
|
345 |
+
* New: Image Title Attribute.
|
346 |
+
* New: Slider border option.
|
347 |
+
* New: Navigation and Pagination hide on mobile option.
|
348 |
+
* New: Price, Rating, Add to Cart show and hide option for Product Carousel.
|
349 |
+
|
350 |
+
= 1.4.9 =
|
351 |
+
* Fix: Image size issue.
|
352 |
+
|
353 |
+
= 1.4.8 =
|
354 |
+
* Fix: Carousel position issue.
|
355 |
+
|
356 |
+
= 1.4.7 =
|
357 |
+
* Fix: Image max-width issue.
|
358 |
+
|
359 |
+
= 1.4.6 =
|
360 |
+
* Help page updated.
|
361 |
+
|
362 |
+
= 1.4.5 =
|
363 |
+
* Loading broken issue fixed.
|
364 |
+
|
365 |
+
= 1.4.4 =
|
366 |
+
* Multiple carousel on same page issue fixed
|
367 |
+
|
368 |
+
= 1.4.3 =
|
369 |
+
* Add infinite loop
|
370 |
+
* Display items limit option
|
371 |
+
* Bullets on/off
|
372 |
+
* Navigation on/off
|
373 |
+
* AutoPlay on/off
|
374 |
+
* Small desktop, Tablet, Mobile items limit option
|
375 |
+
|
376 |
+
= 1.4.2 =
|
377 |
+
* Fixed conflict issue for some themes
|
378 |
+
|
379 |
+
= 1.4.1 =
|
380 |
+
* PHP code cleaning
|
381 |
+
|
382 |
+
= 1.4 =
|
383 |
+
* Fixed navigation css issue
|
384 |
+
|
385 |
+
= 1.3 =
|
386 |
+
* Fixed navigation issue
|
387 |
+
|
388 |
+
= 1.2 =
|
389 |
+
* Fixed error
|
390 |
+
|
391 |
+
= 1.1 =
|
392 |
+
* Fixed autoPlay
|
393 |
+
|
394 |
+
= 1.0 =
|
395 |
* First Release
|
wp-carousel-free.php
CHANGED
@@ -1,293 +1,334 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
*
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
*
|
20 |
-
*/
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
function
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* A carousel plugin for WordPress.
|
4 |
+
*
|
5 |
+
* @link https://shapedplugin.com/
|
6 |
+
* @since 2.0.0
|
7 |
+
* @package WP_Carousel_Free
|
8 |
+
*
|
9 |
+
* @wordpress-plugin
|
10 |
+
* Plugin Name: WordPress Carousel
|
11 |
+
* Plugin URI: https://shapedplugin.com/plugin/wordpress-carousel-pro/
|
12 |
+
* Description: The Most Powerful and User-friendly WordPress Carousel Plugin. Create beautiful carousels in minutes using Images, Posts, WooCommerce Products etc.
|
13 |
+
* Version: 2.0.1
|
14 |
+
* Author: ShapedPlugin
|
15 |
+
* Author URI: https://shapedplugin.com/
|
16 |
+
* License: GPL-2.0+
|
17 |
+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
18 |
+
* Text Domain: wp-carousel-free
|
19 |
+
* Domain Path: /languages
|
20 |
+
*/
|
21 |
+
|
22 |
+
// If this file is called directly, abort.
|
23 |
+
if ( ! defined( 'WPINC' ) ) {
|
24 |
+
die;
|
25 |
+
}
|
26 |
+
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Main class of the plugin
|
30 |
+
*
|
31 |
+
* @package WP_Carousel_Free
|
32 |
+
* @author Shamim Mia <shamhagh@gmail.com>
|
33 |
+
*/
|
34 |
+
class SP_WP_Carousel_Free {
|
35 |
+
|
36 |
+
|
37 |
+
/**
|
38 |
+
* The loader that's responsible for maintaining and registering all hooks that power
|
39 |
+
* the plugin.
|
40 |
+
*
|
41 |
+
* @since 2.0.0
|
42 |
+
* @access protected
|
43 |
+
* @var WP_Carousel_Free_Loader $loader Maintains and registers all hooks for the plugin.
|
44 |
+
*/
|
45 |
+
public $loader;
|
46 |
+
|
47 |
+
/**
|
48 |
+
* The unique identifier of this plugin.
|
49 |
+
*
|
50 |
+
* @since 2.0.0
|
51 |
+
* @access protected
|
52 |
+
* @var string $plugin_name The string used to uniquely identify this plugin.
|
53 |
+
*/
|
54 |
+
protected $plugin_name;
|
55 |
+
|
56 |
+
/**
|
57 |
+
* The current version of the plugin.
|
58 |
+
*
|
59 |
+
* @since 2.0.0
|
60 |
+
* @access protected
|
61 |
+
* @var string $version The current version of the plugin.
|
62 |
+
*/
|
63 |
+
protected $version;
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Plugin textdomain.
|
67 |
+
*
|
68 |
+
* @since 2.0.0
|
69 |
+
*
|
70 |
+
* @var string
|
71 |
+
*/
|
72 |
+
public $domain = 'wp-carousel-free';
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Minimum PHP version required
|
76 |
+
*
|
77 |
+
* @since 2.0.0
|
78 |
+
* @var string
|
79 |
+
*/
|
80 |
+
private $min_php = '5.4.0';
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Plugin file.
|
84 |
+
*
|
85 |
+
* @var string
|
86 |
+
*/
|
87 |
+
private $file = __FILE__;
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Holds class object
|
91 |
+
*
|
92 |
+
* @var object
|
93 |
+
* @since 2.0.0
|
94 |
+
*/
|
95 |
+
private static $instance;
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Initialize the SP_WP_Carousel_Free() class
|
99 |
+
*
|
100 |
+
* @since 2.0.0
|
101 |
+
* @return object
|
102 |
+
*/
|
103 |
+
public static function init() {
|
104 |
+
if ( ! isset( self::$instance ) && ! ( self::$instance instanceof SP_WP_Carousel_Free ) ) {
|
105 |
+
self::$instance = new SP_WP_Carousel_Free();
|
106 |
+
self::$instance->setup();
|
107 |
+
}
|
108 |
+
return self::$instance;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Define the core functionality of the plugin.
|
113 |
+
*
|
114 |
+
* Set the plugin name and the plugin version that can be used throughout the plugin.
|
115 |
+
* Load the dependencies, define the locale, and set the hooks for the admin area and
|
116 |
+
* the public-facing side of the site.
|
117 |
+
*
|
118 |
+
* @since 2.0.0
|
119 |
+
*/
|
120 |
+
public function setup() {
|
121 |
+
$this->plugin_name = 'wp-carousel-free';
|
122 |
+
$this->version = '2.0.1';
|
123 |
+
$this->define_constants();
|
124 |
+
$this->includes();
|
125 |
+
$this->load_dependencies();
|
126 |
+
$this->set_locale();
|
127 |
+
$this->define_common_hooks();
|
128 |
+
$this->define_admin_hooks();
|
129 |
+
$this->define_public_hooks();
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Define plugin constants.
|
134 |
+
*
|
135 |
+
* @since 2.0.0
|
136 |
+
* @return void
|
137 |
+
*/
|
138 |
+
private function define_constants() {
|
139 |
+
$this->define( 'WPCAROUSELF_BASENAME', plugin_basename( __FILE__ ) );
|
140 |
+
$this->define( 'WPCAROUSELF_VERSION', $this->version );
|
141 |
+
$this->define( 'WPCAROUSELF_PATH', plugin_dir_path( __FILE__ ) );
|
142 |
+
$this->define( 'WPCAROUSELF_INCLUDES', WPCAROUSELF_PATH . '/includes' );
|
143 |
+
$this->define( 'WPCAROUSELF_URL', plugin_dir_url( __FILE__ ) );
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Define constant if not already set.
|
148 |
+
*
|
149 |
+
* @param string $name Constant name.
|
150 |
+
* @param string|bool $value Constant Value.
|
151 |
+
*/
|
152 |
+
private function define( $name, $value ) {
|
153 |
+
if ( ! defined( $name ) ) {
|
154 |
+
define( $name, $value );
|
155 |
+
}
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Included required files.
|
160 |
+
*
|
161 |
+
* @since 2.0.0
|
162 |
+
* @return void
|
163 |
+
*/
|
164 |
+
public function includes() {
|
165 |
+
|
166 |
+
require_once WPCAROUSELF_INCLUDES . '/class-wp-carousel-free-loader.php';
|
167 |
+
require_once WPCAROUSELF_INCLUDES . '/class-wp-carousel-free-post-types.php';
|
168 |
+
require_once WPCAROUSELF_PATH . '/admin/views/meta-box/sp-framework.php';
|
169 |
+
require_once WPCAROUSELF_INCLUDES . '/class-wp-carousel-free-shortcode.php';
|
170 |
+
require_once WPCAROUSELF_PATH . '/public/shortcode-deprecated.php';
|
171 |
+
require_once WPCAROUSELF_INCLUDES . '/class-wp-carousel-free-i18n.php';
|
172 |
+
require_once WPCAROUSELF_PATH . '/public/class-wp-carousel-free-public.php';
|
173 |
+
// if ( is_admin() ) {
|
174 |
+
require_once WPCAROUSELF_PATH . '/admin/class-wp-carousel-free-admin.php';
|
175 |
+
require_once WPCAROUSELF_PATH . '/admin/views/tmce-button.php';
|
176 |
+
require_once WPCAROUSELF_PATH . '/admin/views/help.php';
|
177 |
+
require_once WPCAROUSELF_PATH . '/admin/views/premium.php';
|
178 |
+
// }
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Load the required dependencies for this plugin.
|
183 |
+
*
|
184 |
+
* Include the following files that make up the plugin:
|
185 |
+
*
|
186 |
+
* - WP_Carousel_Free_Loader. Orchestrates the hooks of the plugin.
|
187 |
+
* - WP_Carousel_Free_I18n. Defines internationalization functionality.
|
188 |
+
* - WP_Carousel_Free_Admin. Defines all hooks for the admin area.
|
189 |
+
* - WP_Carousel_Free_Public. Defines all hooks for the public side of the site.
|
190 |
+
*
|
191 |
+
* Create an instance of the loader which will be used to register the hooks
|
192 |
+
* with WordPress.
|
193 |
+
*
|
194 |
+
* @since 2.0.0
|
195 |
+
* @access private
|
196 |
+
*/
|
197 |
+
private function load_dependencies() {
|
198 |
+
$this->loader = new WP_Carousel_Free_Loader();
|
199 |
+
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Define the locale for this plugin for internationalization.
|
204 |
+
*
|
205 |
+
* Uses the WP_Carousel_Free_I18n class in order to set the domain and to register the hook
|
206 |
+
* with WordPress.
|
207 |
+
*
|
208 |
+
* @since 2.0.0
|
209 |
+
* @access private
|
210 |
+
*/
|
211 |
+
private function set_locale() {
|
212 |
+
$plugin_i18n = new WP_Carousel_Free_I18n();
|
213 |
+
$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Register common hooks.
|
218 |
+
*
|
219 |
+
* @since 2.0.0
|
220 |
+
* @access private
|
221 |
+
*/
|
222 |
+
private function define_common_hooks() {
|
223 |
+
$plugin_cpt = new WP_Carousel_Free_Post_Type( $this->get_plugin_name(), $this->get_version() );
|
224 |
+
$this->loader->add_action( 'init', $plugin_cpt, 'wp_carousel_post_type', 11 );
|
225 |
+
}
|
226 |
+
|
227 |
+
/**
|
228 |
+
* Register all of the hooks related to the admin area functionality
|
229 |
+
* of the plugin.
|
230 |
+
*
|
231 |
+
* @since 2.0.0
|
232 |
+
* @access private
|
233 |
+
*/
|
234 |
+
private function define_admin_hooks() {
|
235 |
+
|
236 |
+
$plugin_admin = new WP_Carousel_Free_Admin( $this->get_plugin_name(), $this->get_version() );
|
237 |
+
|
238 |
+
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_admin_styles' );
|
239 |
+
$this->loader->add_filter( 'post_updated_messages', $plugin_admin, 'wpcp_carousel_updated_messages', 10, 2 );
|
240 |
+
$this->loader->add_filter( 'manage_sp_wp_carousel_posts_columns', $plugin_admin, 'filter_carousel_admin_column' );
|
241 |
+
$this->loader->add_action(
|
242 |
+
'manage_sp_wp_carousel_posts_custom_column', $plugin_admin,
|
243 |
+
'display_carousel_admin_fields', 10, 2
|
244 |
+
);
|
245 |
+
$this->loader->add_filter( 'plugin_action_links', $plugin_admin, 'add_plugin_action_links', 10, 2 );
|
246 |
+
$this->loader->add_filter( 'plugin_row_meta', $plugin_admin, 'plugin_row_meta', 10, 2 );
|
247 |
+
$this->loader->add_filter( 'admin_footer_text', $plugin_admin, 'sp_wpcp_review_text', 10, 2 );
|
248 |
+
$this->loader->add_action( 'activated_plugin', $plugin_admin, 'sp_wpcf_redirect_after_activation', 10, 2 );
|
249 |
+
|
250 |
+
// Help Page.
|
251 |
+
$help_page = new WP_Carousel_Free_Help( $this->get_plugin_name(), $this->get_version() );
|
252 |
+
$this->loader->add_action( 'admin_menu', $help_page, 'help_admin_menu', 40 );
|
253 |
+
|
254 |
+
// Premium Page.
|
255 |
+
$upgrade_page = new WP_Carousel_Free_Upgrade( $this->get_plugin_name(), $this->get_version() );
|
256 |
+
$this->loader->add_action( 'admin_menu', $upgrade_page, 'upgrade_admin_menu', 35 );
|
257 |
+
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Register all of the hooks related to the public-facing functionality
|
262 |
+
* of the plugin.
|
263 |
+
*
|
264 |
+
* @since 2.0.0
|
265 |
+
* @access private
|
266 |
+
*/
|
267 |
+
private function define_public_hooks() {
|
268 |
+
|
269 |
+
$plugin_public = new WP_Carousel_Free_Public( $this->get_plugin_name(), $this->get_version() );
|
270 |
+
|
271 |
+
$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
|
272 |
+
$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
|
273 |
+
|
274 |
+
$plugin_shortcode = new WP_Carousel_Free_Shortcode( $this->get_plugin_name(), $this->get_version() );
|
275 |
+
$this->loader->add_shortcode( 'sp_wpcarousel', $plugin_shortcode, 'sp_wp_carousel_shortcode' );
|
276 |
+
|
277 |
+
}
|
278 |
+
|
279 |
+
/**
|
280 |
+
* The name of the plugin used to uniquely identify it within the context of
|
281 |
+
* WordPress and to define internationalization functionality.
|
282 |
+
*
|
283 |
+
* @since 2.0.0
|
284 |
+
* @return string The name of the plugin.
|
285 |
+
*/
|
286 |
+
public function get_plugin_name() {
|
287 |
+
return $this->plugin_name;
|
288 |
+
}
|
289 |
+
|
290 |
+
/**
|
291 |
+
* Retrieve the version number of the plugin.
|
292 |
+
*
|
293 |
+
* @since 2.0.0
|
294 |
+
* @return string The version number of the plugin.
|
295 |
+
*/
|
296 |
+
public function get_version() {
|
297 |
+
return $this->version;
|
298 |
+
}
|
299 |
+
|
300 |
+
/**
|
301 |
+
* The reference to the class that orchestrates the hooks with the plugin.
|
302 |
+
*
|
303 |
+
* @since 2.0.0
|
304 |
+
* @return WP_Carousel_Free_Loader Orchestrates the hooks of the plugin.
|
305 |
+
*/
|
306 |
+
public function get_loader() {
|
307 |
+
return $this->loader;
|
308 |
+
}
|
309 |
+
|
310 |
+
/**
|
311 |
+
* Run the loader to execute all of the hooks with WordPress.
|
312 |
+
*
|
313 |
+
* @since 2.0.0
|
314 |
+
*/
|
315 |
+
public function run() {
|
316 |
+
$this->loader->run();
|
317 |
+
}
|
318 |
+
|
319 |
+
} // SP_WP_Carousel_Free
|
320 |
+
|
321 |
+
/**
|
322 |
+
* Main instance of WP Carousel Free
|
323 |
+
*
|
324 |
+
* Returns the main instance of the WP Carousel Free.
|
325 |
+
*
|
326 |
+
* @since 2.0.0
|
327 |
+
* @return void
|
328 |
+
*/
|
329 |
+
function sp_wpcf() {
|
330 |
+
$plugin = SP_WP_Carousel_Free::init();
|
331 |
+
$plugin->loader->run();
|
332 |
+
}
|
333 |
+
// Launch it out .
|
334 |
+
sp_wpcf();
|