Version Description
Oct 10, 2020 = * New: Swipe to slide option. * Improved: Load dynamic CSS on header. * Fix: Preloader 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.1.12 |
Comparing to | |
See all releases |
Code changes from version 2.1.11 to 2.1.12
- admin/views/metabox-config.php +12 -0
- includes/class-wp-carosuel-free-updates.php +2 -2
- includes/class-wp-carousel-free-shortcode.php +184 -182
- public/class-wp-carousel-free-public.php +16 -0
- public/css/wp-carousel-free-public.css +27 -0
- public/css/wp-carousel-free-public.min.css +1 -1
- public/dynamic-style.php +4 -36
- public/js/preloader.js +8 -8
- public/js/preloader.min.js +1 -1
- readme.txt +6 -1
- wp-carousel-free.php +322 -305
admin/views/metabox-config.php
CHANGED
@@ -444,6 +444,18 @@ SP_WPCF::createSection(
|
|
444 |
'true',
|
445 |
),
|
446 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
447 |
),
|
448 |
)
|
449 |
); // Carousel settings section end.
|
444 |
'true',
|
445 |
),
|
446 |
),
|
447 |
+
array(
|
448 |
+
'id' => 'carousel_swipetoslide',
|
449 |
+
'type' => 'switcher',
|
450 |
+
'title' => __( 'Swipe to Slide', 'wp-carousel-free' ),
|
451 |
+
'subtitle' => __( 'Allow users to drag or swipe directly to a slide irrespective of slidesToScroll.', 'wp-carousel-free' ),
|
452 |
+
'default' => false,
|
453 |
+
'dependency' => array(
|
454 |
+
'slider_swipe',
|
455 |
+
'==',
|
456 |
+
'true',
|
457 |
+
),
|
458 |
+
),
|
459 |
),
|
460 |
)
|
461 |
); // Carousel settings section end.
|
includes/class-wp-carosuel-free-updates.php
CHANGED
@@ -57,8 +57,8 @@ class WP_Carousel_Free_Updates {
|
|
57 |
$installed_version = get_option( 'wp_carousel_free_version' );
|
58 |
|
59 |
if ( false === $installed_version ) {
|
60 |
-
update_option( 'wp_carousel_free_version',
|
61 |
-
update_option( 'wp_carousel_free_db_version',
|
62 |
}
|
63 |
|
64 |
if ( version_compare( $installed_version, WPCAROUSELF_VERSION, '<' ) ) {
|
57 |
$installed_version = get_option( 'wp_carousel_free_version' );
|
58 |
|
59 |
if ( false === $installed_version ) {
|
60 |
+
update_option( 'wp_carousel_free_version', WPCAROUSELF_VERSION );
|
61 |
+
update_option( 'wp_carousel_free_db_version', WPCAROUSELF_VERSION );
|
62 |
}
|
63 |
|
64 |
if ( version_compare( $installed_version, WPCAROUSELF_VERSION, '<' ) ) {
|
includes/class-wp-carousel-free-shortcode.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*
|
6 |
* A class definition that define main carousel shortcode of the plugin.
|
7 |
*
|
8 |
-
* @link
|
9 |
-
* @since
|
10 |
*
|
11 |
* @package WP_Carousel_Free
|
12 |
* @subpackage WP_Carousel_Free/includes
|
@@ -22,184 +22,186 @@
|
|
22 |
* @subpackage WP_Carousel_Free/includes
|
23 |
* @author Shamim Mia <shamhagh@gmail.com>
|
24 |
*/
|
25 |
-
class WP_Carousel_Free_Shortcode
|
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 |
}
|
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
|
22 |
* @subpackage WP_Carousel_Free/includes
|
23 |
* @author Shamim Mia <shamhagh@gmail.com>
|
24 |
*/
|
25 |
+
class WP_Carousel_Free_Shortcode
|
26 |
+
{
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Holds the class object.
|
30 |
+
*
|
31 |
+
* @since 2.0.0
|
32 |
+
* @var object
|
33 |
+
*/
|
34 |
+
public static $instance;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Undocumented variable
|
38 |
+
*
|
39 |
+
* @var string $post_id The post id of the carousel shortcode.
|
40 |
+
*/
|
41 |
+
public $post_id;
|
42 |
+
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Allows for accessing single instance of class. Class should only be constructed once per call.
|
46 |
+
*
|
47 |
+
* @since 2.0.0
|
48 |
+
* @static
|
49 |
+
* @return WP_Carousel_Free_Shortcode Shortcode instance.
|
50 |
+
*/
|
51 |
+
public static function instance()
|
52 |
+
{
|
53 |
+
if (is_null(self::$instance) ) {
|
54 |
+
self::$instance = new self();
|
55 |
+
}
|
56 |
+
return self::$instance;
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* A shortcode for rendering the carousel.
|
61 |
+
*
|
62 |
+
* @param integer $attributes The ID the shortcode.
|
63 |
+
* @return void
|
64 |
+
*/
|
65 |
+
public function sp_wp_carousel_shortcode( $attributes )
|
66 |
+
{
|
67 |
+
if (empty($attributes['id']) ) {
|
68 |
+
return;
|
69 |
+
}
|
70 |
+
|
71 |
+
$post_id = intval($attributes['id']);
|
72 |
+
|
73 |
+
// Video Carousel.
|
74 |
+
$upload_data = get_post_meta($post_id, 'sp_wpcp_upload_options', true);
|
75 |
+
if (empty($upload_data) ) {
|
76 |
+
return;
|
77 |
+
}
|
78 |
+
$carousel_type = isset($upload_data['wpcp_carousel_type']) ? $upload_data['wpcp_carousel_type'] : '';
|
79 |
+
|
80 |
+
$shortcode_data = get_post_meta($post_id, 'sp_wpcp_shortcode_options', true);
|
81 |
+
|
82 |
+
// Image Carousel.
|
83 |
+
$image_orderby = isset($shortcode_data['wpcp_image_order_by']) ? $shortcode_data['wpcp_image_order_by'] : '';
|
84 |
+
$show_slide_image = isset($shortcode_data['show_image']) ? $shortcode_data['show_image'] : '';
|
85 |
+
$show_img_title = isset($shortcode_data['wpcp_post_title']) ? $shortcode_data['wpcp_post_title'] : '';
|
86 |
+
|
87 |
+
$_image_title_att = isset($shortcode_data['_image_title_attr']) ? $shortcode_data['_image_title_attr'] : '';
|
88 |
+
$show_image_title_attr = ( true == $_image_title_att ) ? 'true' : 'false';
|
89 |
+
$image_sizes = isset($shortcode_data['wpcp_image_sizes']) ? $shortcode_data['wpcp_image_sizes'] : '';
|
90 |
+
|
91 |
+
// Carousel Column.
|
92 |
+
$column_number = isset($shortcode_data['wpcp_number_of_columns']) ? $shortcode_data['wpcp_number_of_columns'] : '';
|
93 |
+
$old_column_lg_desktop = isset($column_number['column1']) ? $column_number['column1'] : '5';
|
94 |
+
$column_lg_desktop = isset($column_number['lg_desktop']) && ! empty($column_number['lg_desktop']) ? $column_number['lg_desktop'] : $old_column_lg_desktop;
|
95 |
+
$old_column_desktop = isset($column_number['column2']) ? $column_number['column2'] : '4';
|
96 |
+
$column_desktop = isset($column_number['desktop']) && ! empty($column_number['desktop']) ? $column_number['desktop'] : $old_column_desktop;
|
97 |
+
$old_column_sm_desktop = isset($column_number['column3']) ? $column_number['column3'] : '3';
|
98 |
+
$column_sm_desktop = isset($column_number['laptop']) && ! empty($column_number['laptop']) ? $column_number['laptop'] : $old_column_sm_desktop;
|
99 |
+
$old_column_tablet = isset($column_number['column4']) ? $column_number['column4'] : '2';
|
100 |
+
$column_tablet = isset($column_number['tablet']) && ! empty($column_number['tablet']) ? $column_number['tablet'] : $old_column_tablet;
|
101 |
+
$old_column_mobile = isset($column_number['column5']) ? $column_number['column5'] : '1';
|
102 |
+
$column_mobile = isset($column_number['mobile']) && ! empty($column_number['mobile']) ? $column_number['mobile'] : $old_column_mobile;
|
103 |
+
|
104 |
+
// Carousel Settings.
|
105 |
+
$preloader = isset($shortcode_data['wpcp_preloader']) ? $shortcode_data['wpcp_preloader'] : true;
|
106 |
+
$auto_play = $shortcode_data['wpcp_carousel_auto_play'] ? 'true' : 'false';
|
107 |
+
$old_autoplay_speed = isset($shortcode_data['carousel_auto_play_speed']) && is_numeric($shortcode_data['carousel_auto_play_speed']) ? $shortcode_data['carousel_auto_play_speed'] : '3000';
|
108 |
+
$autoplay_speed = isset($shortcode_data['carousel_auto_play_speed']['all']) && ! empty($shortcode_data['carousel_auto_play_speed']['all']) ? $shortcode_data['carousel_auto_play_speed']['all'] : $old_autoplay_speed;
|
109 |
+
$old_speed = isset($shortcode_data['standard_carousel_scroll_speed']) && is_numeric($shortcode_data['standard_carousel_scroll_speed']) ? $shortcode_data['standard_carousel_scroll_speed'] : '600';
|
110 |
+
$speed = isset($shortcode_data['standard_carousel_scroll_speed']['all']) && ! empty($shortcode_data['standard_carousel_scroll_speed']['all']) ? $shortcode_data['standard_carousel_scroll_speed']['all'] : $old_speed;
|
111 |
+
$infinite = $shortcode_data['carousel_infinite'] ? 'true' : 'false';
|
112 |
+
$pause_on_hover = $shortcode_data['carousel_pause_on_hover'] ? 'true' : 'false';
|
113 |
+
$draggable = $shortcode_data['slider_draggable'] ? 'true' : 'false';
|
114 |
+
$swipe = $shortcode_data['slider_swipe'] ? 'true' : 'false';
|
115 |
+
$is_swipetoslide = isset($shortcode_data['carousel_swipetoslide']) ? $shortcode_data['carousel_swipetoslide'] : true;
|
116 |
+
$swipetoslide = $is_swipetoslide ? 'true' : 'false';
|
117 |
+
|
118 |
+
$post_order_by = ( isset($shortcode_data['wpcp_post_order_by']) ? $shortcode_data['wpcp_post_order_by'] : '' );
|
119 |
+
$post_order = ( isset($shortcode_data['wpcp_post_order']) ? $shortcode_data['wpcp_post_order'] : '' );
|
120 |
+
|
121 |
+
$wpcp_dots = isset($shortcode_data['wpcp_pagination']) ? $shortcode_data['wpcp_pagination'] : '';
|
122 |
+
switch ( $wpcp_dots ) {
|
123 |
+
case 'show':
|
124 |
+
$dots = 'true';
|
125 |
+
$dots_mobile = 'true';
|
126 |
+
break;
|
127 |
+
case 'hide':
|
128 |
+
$dots = 'false';
|
129 |
+
$dots_mobile = 'false';
|
130 |
+
break;
|
131 |
+
case 'hide_mobile':
|
132 |
+
$dots = 'true';
|
133 |
+
$dots_mobile = 'false';
|
134 |
+
break;
|
135 |
+
}
|
136 |
+
$wpcp_arrows = isset($shortcode_data['wpcp_navigation']) ? $shortcode_data['wpcp_navigation'] : 'show';
|
137 |
+
switch ( $wpcp_arrows ) {
|
138 |
+
case 'show':
|
139 |
+
$arrows = 'true';
|
140 |
+
$arrows_mobile = 'true';
|
141 |
+
break;
|
142 |
+
case 'hide':
|
143 |
+
$arrows = 'false';
|
144 |
+
$arrows_mobile = 'false';
|
145 |
+
break;
|
146 |
+
case 'hide_mobile':
|
147 |
+
$arrows = 'true';
|
148 |
+
$arrows_mobile = 'false';
|
149 |
+
break;
|
150 |
+
}
|
151 |
+
|
152 |
+
// Carousel Classes.
|
153 |
+
$carousel_classes = 'wpcp-carousel-section sp-wpcp-' . $post_id . ' nav-vertical-center';
|
154 |
+
if ('image-carousel' === $carousel_type ) {
|
155 |
+
$carousel_classes .= ' wpcp-image-carousel';
|
156 |
+
} elseif ('post-carousel' === $carousel_type ) {
|
157 |
+
$carousel_classes .= ' wpcp-post-carousel';
|
158 |
+
} elseif ('product-carousel' === $carousel_type ) {
|
159 |
+
$carousel_classes .= ' wpcp-product-carousel';
|
160 |
+
}
|
161 |
+
|
162 |
+
// Carousel Configurations.
|
163 |
+
if (wpcf_get_option('wpcp_slick_js', true) ) {
|
164 |
+
wp_enqueue_script('wpcf-slick');
|
165 |
+
}
|
166 |
+
wp_enqueue_script('wpcf-slick-config');
|
167 |
+
|
168 |
+
// Preloader classes.
|
169 |
+
if ($preloader ) {
|
170 |
+
wp_enqueue_script('wpcp-preloader');
|
171 |
+
$carousel_classes .= ' wpcp-preloader';
|
172 |
+
}
|
173 |
+
|
174 |
+
$carousel_classes .= ' wpcp-standard';
|
175 |
+
$wpcp_slick_options = 'data-slick=\'{ "accessibility":true, "arrows":' . $arrows . ', "autoplay":' . $auto_play . ', "autoplaySpeed":' . $autoplay_speed . ', "dots":' . $dots . ', "infinite":' . $infinite . ', "speed":' . $speed . ', "pauseOnHover":' . $pause_on_hover . ', "slidesToShow":' . $column_lg_desktop . ', "responsive":[ { "breakpoint":1200, "settings": { "slidesToShow":' . $column_desktop . ' } }, { "breakpoint":980, "settings":{ "slidesToShow":' . $column_sm_desktop . ' } }, { "breakpoint":736, "settings": { "slidesToShow":' . $column_tablet . ' } }, {"breakpoint":480, "settings":{ "slidesToShow":' . $column_mobile . ', "arrows": ' . $arrows_mobile . ', "dots": ' . $dots_mobile . ' } } ], "swipe": ' . $swipe . ', "draggable": ' . $draggable . ', "swipeToSlide":' . $swipetoslide . ' }\' ';
|
176 |
+
|
177 |
+
if ('image-carousel' === $carousel_type ) {
|
178 |
+
ob_start();
|
179 |
+
echo $the_wpcf_dynamic_css;
|
180 |
+
include WPCAROUSELF_PATH . '/public/templates/image-carousel.php';
|
181 |
+
$html = ob_get_contents();
|
182 |
+
ob_end_clean();
|
183 |
+
|
184 |
+
return apply_filters('sp_wpcp_image_carousel', $html, $post_id);
|
185 |
+
}
|
186 |
+
if ('post-carousel' === $carousel_type ) {
|
187 |
+
ob_start();
|
188 |
+
echo $the_wpcf_dynamic_css;
|
189 |
+
include WPCAROUSELF_PATH . '/public/templates/post-carousel.php';
|
190 |
+
$html = ob_get_contents();
|
191 |
+
ob_end_clean();
|
192 |
+
|
193 |
+
return apply_filters('sp_wpcp_post_carousel', $html, $post_id);
|
194 |
+
}
|
195 |
+
if ('product-carousel' === $carousel_type ) {
|
196 |
+
ob_start();
|
197 |
+
echo $the_wpcf_dynamic_css;
|
198 |
+
include WPCAROUSELF_PATH . '/public/templates/product-carousel.php';
|
199 |
+
$html = ob_get_contents();
|
200 |
+
ob_end_clean();
|
201 |
+
|
202 |
+
return apply_filters('sp_wpcp_product_carousel', $html, $post_id);
|
203 |
+
}
|
204 |
+
|
205 |
+
return '';
|
206 |
+
}
|
207 |
}
|
public/class-wp-carousel-free-public.php
CHANGED
@@ -58,6 +58,22 @@ class WP_Carousel_Free_Public {
|
|
58 |
wp_enqueue_style( $this->plugin_name . '-fontawesome', WPCAROUSELF_URL . 'public/css/font-awesome.min.css', array(), $this->version, 'all' );
|
59 |
}
|
60 |
wp_enqueue_style( $this->plugin_name, WPCAROUSELF_URL . 'public/css/wp-carousel-free-public' . $this->suffix . '.css', array(), $this->version, 'all' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
}
|
62 |
|
63 |
/**
|
58 |
wp_enqueue_style( $this->plugin_name . '-fontawesome', WPCAROUSELF_URL . 'public/css/font-awesome.min.css', array(), $this->version, 'all' );
|
59 |
}
|
60 |
wp_enqueue_style( $this->plugin_name, WPCAROUSELF_URL . 'public/css/wp-carousel-free-public' . $this->suffix . '.css', array(), $this->version, 'all' );
|
61 |
+
|
62 |
+
$wpc_posts = new WP_Query(
|
63 |
+
array(
|
64 |
+
'post_type' => 'sp_wp_carousel',
|
65 |
+
'posts_per_page' => 500,
|
66 |
+
'fields' => 'ids',
|
67 |
+
)
|
68 |
+
);
|
69 |
+
|
70 |
+
$carousel_ids = $wpc_posts->posts;
|
71 |
+
$the_wpcf_dynamic_css = '';
|
72 |
+
|
73 |
+
foreach ( $carousel_ids as $carousel_id ) {
|
74 |
+
include WPCAROUSELF_PATH . '/public/dynamic-style.php';
|
75 |
+
}
|
76 |
+
wp_add_inline_style( $this->plugin_name, $the_wpcf_dynamic_css );
|
77 |
}
|
78 |
|
79 |
/**
|
public/css/wp-carousel-free-public.css
CHANGED
@@ -1,3 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/*--------------------------------------------------------------
|
2 |
## Image Carousel
|
3 |
--------------------------------------------------------------*/
|
1 |
+
/*--------------------------------------------------------------
|
2 |
+
## Preloader
|
3 |
+
--------------------------------------------------------------*/
|
4 |
+
.wpcp-carousel-section.wpcp-standard:not(.wpcp-preloader) {
|
5 |
+
display: none;
|
6 |
+
}
|
7 |
+
.wpcp-carousel-section.wpcp-standard.slick-initialized:not(.wpcp-preloader) {
|
8 |
+
display: block;
|
9 |
+
}
|
10 |
+
.wpcp-carousel-wrapper {
|
11 |
+
position: relative;
|
12 |
+
}
|
13 |
+
.wpcp-carousel-section.wpcp-preloader {
|
14 |
+
opacity: 0;
|
15 |
+
}
|
16 |
+
.wpcp-carousel-preloader {
|
17 |
+
position: absolute;
|
18 |
+
left: 0;
|
19 |
+
top: 0;
|
20 |
+
height: 100%;
|
21 |
+
width: 100%;
|
22 |
+
text-align: center;
|
23 |
+
display: flex;
|
24 |
+
align-items: center;
|
25 |
+
justify-content: center;
|
26 |
+
}
|
27 |
+
|
28 |
/*--------------------------------------------------------------
|
29 |
## Image Carousel
|
30 |
--------------------------------------------------------------*/
|
public/css/wp-carousel-free-public.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.sp-wpcp-wrapper{margin-bottom:0}.wpcp-carousel-section.wpcp-standard,.wpcp-carousel-section.wpcp-standard .slick-list{overflow:hidden}.wpcp-carousel-section.wpcp-standard{overflow:hidden;padding-right:2px}.wpcp-carousel-section.wpcp-standard.slick-initialized{position:relative}.wpcp-carousel-section .wpcp-single-item{overflow:hidden;display:inline-block;vertical-align:middle;float:none}.wpcp-all-captions li{list-style:none;margin:0}.wpcp-carousel-section p,.wpcp-carousel-section ul,.wpcp-image-carousel .wpcp-single-item .wpcp-all-captions h2{margin:0}.wpcp-carousel-section.wpcp-video-carousel .wpcp-single-item .wpcp-slide-image{position:relative}.wpcp-carousel-section.wpcp-content-carousel .wpcp-single-item{padding-left:15px;padding-right:15px}.wpcp-carousel-section .wpcp-single-item img{margin:0 auto;max-width:100%;height:auto;box-shadow:none}.wpcp-carousel-section.wpcp-image-carousel .wpcp-single-item .wpcp-all-captions{padding:10px 20px 15px}.wpcp-carousel-section .wpcp-single-item .wpcp-all-captions .wpcp-image-description{margin:6px 0 0}.wpcp-carousel-section .wpcp-single-item .wpcp-slide-image a:focus{outline:0}.wpcp-carousel-section .slick-slide:focus{outline:0}.wpcp-carousel-section.slick-initialized .slick-slide{margin-right:20px;float:none;display:inline-block;vertical-align:middle}.wpcp-carousel-section .slick-list{margin-right:-20px}.wpcp-carousel-section .wpcp-all-captions a,.wpcp-carousel-section a,.wpcp-carousel-section a:hover{text-decoration:none}.wpcp-post-carousel .wpcp-single-item .wpcp-all-captions{padding:15px 20px 0;overflow:hidden}.wpcp-post-carousel .wpcp-single-item .wpcp-all-captions h2{font-size:16px;font-weight:600;margin:0 0 10px}.wpcp-single-item h2 a{color:#444;text-decoration:none}.wpcp-post-carousel .wpcp-single-item .wpcp-all-captions .post-categories{margin:0 0 7px;padding:0;display:block}.wpcp-post-carousel .wpcp-all-captions p{margin-bottom:15px}.wpcp_readmore{border:1px solid;display:inline-block;background:#22afba;margin:0 0 14px;line-height:32px;padding:5px 14px;font-weight:600}.wpcp_readmore,.wpcp_readmore:focus,.wpcp_readmore:hover{color:#fff}.wpcp-single-item .wpcp-all-captions .wpcp-post-meta{margin:0 0 20px;padding:0}.wpcp-post-carousel .wpcp-post-meta li{display:inline-block;margin-right:5px}.wpcp-post-carousel .wpcp-post-meta li:last-child{margin-right:0}.wpcp-post-meta li,.wpcp-post-meta li a{color:#999}.wpcp-carousel-section.detail-on-right .wpcp-single-item .wpcp-all-captions,.wpcp-carousel-section.detail-on-right .wpcp-single-item .wpcp-slide-image{float:left;width:50%;box-sizing:border-box}.wpcp-carousel-section.detail-with-overlay .wpcp-all-captions{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;justify-content:center;height:100%}.wpcp-carousel-section.detail-with-overlay.overlay-lower .wpcp-all-captions{top:auto;display:block;height:auto}.wpcp-carousel-section.detail-with-overlay.overlay-on-hover .wpcp-all-captions{visibility:hidden;opacity:0;transition:visibility .3s linear,opacity .3s linear}.wpcp-carousel-section.detail-with-overlay.overlay-on-hover .wpcp-single-item:hover .wpcp-all-captions{visibility:visible;opacity:1}.wpcp-carousel-section.detail-with-overlay .wpcp-single-item{position:relative}.wpcp-carousel-section .wpcp-single-item:focus{outline:0}.wpcp-product-carousel .wpcp-single-item .wpcp-all-captions{padding:15px 20px 0;overflow:hidden;text-align:center}.wpcp-product-carousel .wpcp-single-item .wpcp-product-title{margin:0;font-size:16px;line-height:23px;font-weight:600}.wpcp-product-price{margin-top:5px}.wpcp-carousel-section.wpcp-product-carousel .wpcp-cart-button{margin-top:12px}.wpcp-carousel-section.wpcp-product-carousel .wpcp-cart-button a.button{background:#ebebeb;color:#545454;border:1px solid #d1d1d1;font-weight:500;padding:0 20px;line-height:38px;display:inline-block;font-size:14px}.wpcp-carousel-section.wpcp-product-carousel .wpcp-all-captions .wpcp-cart-button a.add_to_cart_button.added{display:none}.wpcp-carousel-section.wpcp-product-carousel .wpcp-all-captions .wpcp-cart-button .added_to_cart{font-size:100%;margin:0;line-height:38px;cursor:pointer;position:relative;text-decoration:none;overflow:visible;padding:0 20px;font-weight:600;border-radius:3px;left:auto;color:#515151;background-color:#ebe9eb;border:0;display:inline-block;background-image:none;box-shadow:none;text-shadow:none;border:1px solid}.wpcp-carousel-section.wpcp-product-carousel .wpcp-all-captions .wpcp-cart-button a.button:hover{background:#3f3f3f;border-color:#d1d1d1;color:#fff}.wpcp-carousel-section.wpcp-product-carousel .wpcp-all-captions .wpcp-cart-button .wc-forward::after{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-style:normal;font-variant:normal;font-weight:400;line-height:1;vertical-align:-.125em;font:normal normal normal 14px/1 FontAwesome;font-weight:900;line-height:inherit;vertical-align:baseline;content:"\f178";margin-left:.5407911001em}.wpcp-carousel-section .woocommerce-product-rating .star-rating{margin:4px auto;float:none}.wpcp-product-price span{font-weight:700;font-size:14px}.wpcp-carousel-section .slick-next:after,.wpcp-carousel-section .slick-next:before,.wpcp-carousel-section .slick-prev:after,.wpcp-carousel-section .slick-prev:before{display:none}.wpcp-carousel-section .slick-prev{left:0}.wpcp-carousel-section .slick-next{right:0}.wpcp-carousel-section .slick-next,.wpcp-carousel-section .slick-prev{width:30px;height:30px;line-height:30px;position:absolute;z-index:22;left:auto;top:auto;font-size:30px
|
1 |
+
.wpcp-carousel-section.wpcp-standard:not(.wpcp-preloader){display:none}.wpcp-carousel-section.wpcp-standard.slick-initialized:not(.wpcp-preloader){display:block}.wpcp-carousel-wrapper{position:relative}.wpcp-carousel-section.wpcp-preloader{opacity:0}.wpcp-carousel-preloader{position:absolute;left:0;top:0;height:100%;width:100%;text-align:center;display:flex;align-items:center;justify-content:center}.sp-wpcp-wrapper{margin-bottom:0}.wpcp-carousel-section.wpcp-standard,.wpcp-carousel-section.wpcp-standard .slick-list{overflow:hidden}.wpcp-carousel-section.wpcp-standard{overflow:hidden;padding-right:2px}.wpcp-carousel-section.wpcp-standard.slick-initialized{position:relative}.wpcp-carousel-section .wpcp-single-item{overflow:hidden;display:inline-block;vertical-align:middle;float:none}.wpcp-all-captions li{list-style:none;margin:0}.wpcp-carousel-section p,.wpcp-carousel-section ul,.wpcp-image-carousel .wpcp-single-item .wpcp-all-captions h2{margin:0}.wpcp-carousel-section.wpcp-video-carousel .wpcp-single-item .wpcp-slide-image{position:relative}.wpcp-carousel-section.wpcp-content-carousel .wpcp-single-item{padding-left:15px;padding-right:15px}.wpcp-carousel-section .wpcp-single-item img{margin:0 auto;max-width:100%;height:auto;box-shadow:none}.wpcp-carousel-section.wpcp-image-carousel .wpcp-single-item .wpcp-all-captions{padding:10px 20px 15px}.wpcp-carousel-section .wpcp-single-item .wpcp-all-captions .wpcp-image-description{margin:6px 0 0}.wpcp-carousel-section .wpcp-single-item .wpcp-slide-image a:focus{outline:0}.wpcp-carousel-section .slick-slide:focus{outline:0}.wpcp-carousel-section.slick-initialized .slick-slide{margin-right:20px;float:none;display:inline-block;vertical-align:middle}.wpcp-carousel-section .slick-list{margin-right:-20px}.wpcp-carousel-section .wpcp-all-captions a,.wpcp-carousel-section a,.wpcp-carousel-section a:hover{text-decoration:none}.wpcp-post-carousel .wpcp-single-item .wpcp-all-captions{padding:15px 20px 0;overflow:hidden}.wpcp-post-carousel .wpcp-single-item .wpcp-all-captions h2{font-size:16px;font-weight:600;margin:0 0 10px}.wpcp-single-item h2 a{color:#444;text-decoration:none}.wpcp-post-carousel .wpcp-single-item .wpcp-all-captions .post-categories{margin:0 0 7px;padding:0;display:block}.wpcp-post-carousel .wpcp-all-captions p{margin-bottom:15px}.wpcp_readmore{border:1px solid;display:inline-block;background:#22afba;margin:0 0 14px;line-height:32px;padding:5px 14px;font-weight:600}.wpcp_readmore,.wpcp_readmore:focus,.wpcp_readmore:hover{color:#fff}.wpcp-single-item .wpcp-all-captions .wpcp-post-meta{margin:0 0 20px;padding:0}.wpcp-post-carousel .wpcp-post-meta li{display:inline-block;margin-right:5px}.wpcp-post-carousel .wpcp-post-meta li:last-child{margin-right:0}.wpcp-post-meta li,.wpcp-post-meta li a{color:#999}.wpcp-carousel-section.detail-on-right .wpcp-single-item .wpcp-all-captions,.wpcp-carousel-section.detail-on-right .wpcp-single-item .wpcp-slide-image{float:left;width:50%;box-sizing:border-box}.wpcp-carousel-section.detail-with-overlay .wpcp-all-captions{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;justify-content:center;height:100%}.wpcp-carousel-section.detail-with-overlay.overlay-lower .wpcp-all-captions{top:auto;display:block;height:auto}.wpcp-carousel-section.detail-with-overlay.overlay-on-hover .wpcp-all-captions{visibility:hidden;opacity:0;transition:visibility .3s linear,opacity .3s linear}.wpcp-carousel-section.detail-with-overlay.overlay-on-hover .wpcp-single-item:hover .wpcp-all-captions{visibility:visible;opacity:1}.wpcp-carousel-section.detail-with-overlay .wpcp-single-item{position:relative}.wpcp-carousel-section .wpcp-single-item:focus{outline:0}.wpcp-product-carousel .wpcp-single-item .wpcp-all-captions{padding:15px 20px 0;overflow:hidden;text-align:center}.wpcp-product-carousel .wpcp-single-item .wpcp-product-title{margin:0;font-size:16px;line-height:23px;font-weight:600}.wpcp-product-price{margin-top:5px}.wpcp-carousel-section.wpcp-product-carousel .wpcp-cart-button{margin-top:12px}.wpcp-carousel-section.wpcp-product-carousel .wpcp-cart-button a.button{background:#ebebeb;color:#545454;border:1px solid #d1d1d1;font-weight:500;padding:0 20px;line-height:38px;display:inline-block;font-size:14px}.wpcp-carousel-section.wpcp-product-carousel .wpcp-all-captions .wpcp-cart-button a.add_to_cart_button.added{display:none}.wpcp-carousel-section.wpcp-product-carousel .wpcp-all-captions .wpcp-cart-button .added_to_cart{font-size:100%;margin:0;line-height:38px;cursor:pointer;position:relative;text-decoration:none;overflow:visible;padding:0 20px;font-weight:600;border-radius:3px;left:auto;color:#515151;background-color:#ebe9eb;border:0;display:inline-block;background-image:none;box-shadow:none;text-shadow:none;border:1px solid}.wpcp-carousel-section.wpcp-product-carousel .wpcp-all-captions .wpcp-cart-button a.button:hover{background:#3f3f3f;border-color:#d1d1d1;color:#fff}.wpcp-carousel-section.wpcp-product-carousel .wpcp-all-captions .wpcp-cart-button .wc-forward::after{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-style:normal;font-variant:normal;font-weight:400;line-height:1;vertical-align:-.125em;font:normal normal normal 14px/1 FontAwesome;font-weight:900;line-height:inherit;vertical-align:baseline;content:"\f178";margin-left:.5407911001em}.wpcp-carousel-section .woocommerce-product-rating .star-rating{margin:4px auto;float:none}.wpcp-product-price span{font-weight:700;font-size:14px}.wpcp-carousel-section .slick-next:after,.wpcp-carousel-section .slick-next:before,.wpcp-carousel-section .slick-prev:after,.wpcp-carousel-section .slick-prev:before{display:none}.wpcp-carousel-section .slick-prev{left:0}.wpcp-carousel-section .slick-next{right:0}.wpcp-carousel-section .slick-next,.wpcp-carousel-section .slick-prev{width:30px;height:30px;line-height:30px;position:absolute;z-index:22;left:auto;top:auto;font-size:30px;transition:ease all .3s;margin-top:-15px;cursor:pointer}.wpcp-carousel-section.nav-vertical-center{padding:0 25px}.wpcp-carousel-section .slick-next,.wpcp-carousel-section .slick-next i,.wpcp-carousel-section .slick-prev,.wpcp-carousel-section .slick-prev i{line-height:28px;font-family:fontawesome;color:#000}.wpcp-carousel-section.nav-vertical-center .slick-next,.wpcp-carousel-section.nav-vertical-center .slick-prev{top:50%}.wpcp-carousel-section.nav-vertical-center .slick-prev{left:0}.wpcp-carousel-section.nav-vertical-center .slick-next,.wpcp-carousel-section.nav-vertical-center .slick-prev{margin-top:-15px}.wpcp-carousel-section.nav-vertical-center.slick-dotted .slick-next,.wpcp-carousel-section.nav-vertical-center.slick-dotted .slick-prev{margin-top:-35px}.wpcp-carousel-section.nav-vertical-center .slick-next{right:0;text-align:right}.wpcp-carousel-section ul.slick-dots{list-style:none;padding:0!important;margin:0;text-align:center;margin-top:18px;position:relative}.wpcp-carousel-section ul.slick-dots li{display:inline;margin:0}.wpcp-carousel-section ul.slick-dots li button{background-color:#ccc;border:0 solid;border-radius:50%;font-size:0;margin:3px;overflow:hidden;padding:0;text-indent:-999px;width:12px;height:12px;cursor:pointer}.wpcp-carousel-section ul.slick-dots,.wpcp-carousel-section ul.slick-dots li,.wpcp-carousel-section ul.slick-dots li button{line-height:1!important}.wpcp-carousel-section ul.slick-dots li button:focus{outline:0}.wpcp-carousel-section ul.slick-dots li.slick-active button{background-color:#666}
|
public/dynamic-style.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* The style file for the WP Carousel
|
4 |
*
|
5 |
* @since 3.0.0
|
6 |
* @package WP Carousel
|
@@ -22,6 +22,8 @@ if ( $section_title ) {
|
|
22 |
$slide_border = isset( $shortcode_data['wpcp_slide_border'] ) ? $shortcode_data['wpcp_slide_border'] : '';
|
23 |
$old_slide_border_width = isset( $slide_border['width'] ) && ! empty( $slide_border['width'] ) ? $slide_border['width'] : '1';
|
24 |
$slide_border_width = isset( $shortcode_data['wpcp_slide_border']['all'] ) && ! empty( $shortcode_data['wpcp_slide_border']['all'] ) ? $shortcode_data['wpcp_slide_border']['all'] : $old_slide_border_width;
|
|
|
|
|
25 |
|
26 |
// Product Image Border.
|
27 |
$image_border_width = isset( $shortcode_data['wpcp_product_image_border']['all'] ) && ! empty( $shortcode_data['wpcp_product_image_border']['all'] ) ? $shortcode_data['wpcp_product_image_border']['all'] : $old_slide_border_width;
|
@@ -36,38 +38,7 @@ if ( 'product-carousel' == $carousel_type ) {
|
|
36 |
}';
|
37 |
} else {
|
38 |
$wpcp_product_css = '#sp-wp-carousel-free-id-' . $post_id . '.sp-wpcp-' . $post_id . ' .wpcp-single-item {
|
39 |
-
border: ' . $slide_border_width . 'px ' . $
|
40 |
-
}';
|
41 |
-
}
|
42 |
-
|
43 |
-
// Preloader.
|
44 |
-
if ( $preloader ) {
|
45 |
-
$preloader_dynamic_style = '
|
46 |
-
.wpcp-carousel-wrapper.wpcp-wrapper-' . $post_id . '{
|
47 |
-
position: relative;
|
48 |
-
}
|
49 |
-
#sp-wp-carousel-free-id-' . $post_id . '{
|
50 |
-
opacity: 0;
|
51 |
-
}
|
52 |
-
#wpcp-preloader-' . $post_id . '{
|
53 |
-
position: absolute;
|
54 |
-
left: 0;
|
55 |
-
top: 0;
|
56 |
-
height: 100%;
|
57 |
-
width: 100%;
|
58 |
-
text-align: center;
|
59 |
-
display: flex;
|
60 |
-
align-items: center;
|
61 |
-
justify-content: center;
|
62 |
-
}
|
63 |
-
';
|
64 |
-
} else {
|
65 |
-
$preloader_dynamic_style = '
|
66 |
-
.wpcp-carousel-section.wpcp-standard {
|
67 |
-
display: none;
|
68 |
-
}
|
69 |
-
.wpcp-carousel-section.wpcp-standard.slick-initialized {
|
70 |
-
display: block;
|
71 |
}';
|
72 |
}
|
73 |
|
@@ -112,12 +83,10 @@ if ( 'hide' !== $wpcp_dots ) {
|
|
112 |
/**
|
113 |
* The Dynamic Style CSS.
|
114 |
*/
|
115 |
-
$the_wpcf_dynamic_css = '<style>';
|
116 |
$the_wpcf_dynamic_css .= $wpcp_product_css;
|
117 |
$the_wpcf_dynamic_css .= $section_title_dynamic_css;
|
118 |
$the_wpcf_dynamic_css .= $nav_dynamic_style;
|
119 |
$the_wpcf_dynamic_css .= $pagination_dynamic_style;
|
120 |
-
$the_wpcf_dynamic_css .= $preloader_dynamic_style;
|
121 |
if ( 'post-carousel' === $carousel_type ) {
|
122 |
$the_wpcf_dynamic_css .= '
|
123 |
.wpcp-carousel-wrapper #sp-wp-carousel-free-id-' . $post_id . '.wpcp-post-carousel .wpcp-single-item {
|
@@ -134,4 +103,3 @@ if ( 'hide_mobile' === $wpcp_arrows ) {
|
|
134 |
}';
|
135 |
}
|
136 |
$the_wpcf_dynamic_css .= $custom_css;
|
137 |
-
$the_wpcf_dynamic_css .= '</style>';
|
1 |
<?php
|
2 |
/**
|
3 |
+
* The style file for the WP Carousel.
|
4 |
*
|
5 |
* @since 3.0.0
|
6 |
* @package WP Carousel
|
22 |
$slide_border = isset( $shortcode_data['wpcp_slide_border'] ) ? $shortcode_data['wpcp_slide_border'] : '';
|
23 |
$old_slide_border_width = isset( $slide_border['width'] ) && ! empty( $slide_border['width'] ) ? $slide_border['width'] : '1';
|
24 |
$slide_border_width = isset( $shortcode_data['wpcp_slide_border']['all'] ) && ! empty( $shortcode_data['wpcp_slide_border']['all'] ) ? $shortcode_data['wpcp_slide_border']['all'] : $old_slide_border_width;
|
25 |
+
$slide_border_style = isset( $slide_border['style'] ) ? $slide_border['style'] : 'none';
|
26 |
+
$slide_border_color = isset( $slide_border['color'] ) ? $slide_border['color'] : '';
|
27 |
|
28 |
// Product Image Border.
|
29 |
$image_border_width = isset( $shortcode_data['wpcp_product_image_border']['all'] ) && ! empty( $shortcode_data['wpcp_product_image_border']['all'] ) ? $shortcode_data['wpcp_product_image_border']['all'] : $old_slide_border_width;
|
38 |
}';
|
39 |
} else {
|
40 |
$wpcp_product_css = '#sp-wp-carousel-free-id-' . $post_id . '.sp-wpcp-' . $post_id . ' .wpcp-single-item {
|
41 |
+
border: ' . $slide_border_width . 'px ' . $slide_border_style . ' ' . $slide_border_color . ';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
}';
|
43 |
}
|
44 |
|
83 |
/**
|
84 |
* The Dynamic Style CSS.
|
85 |
*/
|
|
|
86 |
$the_wpcf_dynamic_css .= $wpcp_product_css;
|
87 |
$the_wpcf_dynamic_css .= $section_title_dynamic_css;
|
88 |
$the_wpcf_dynamic_css .= $nav_dynamic_style;
|
89 |
$the_wpcf_dynamic_css .= $pagination_dynamic_style;
|
|
|
90 |
if ( 'post-carousel' === $carousel_type ) {
|
91 |
$the_wpcf_dynamic_css .= '
|
92 |
.wpcp-carousel-wrapper #sp-wp-carousel-free-id-' . $post_id . '.wpcp-post-carousel .wpcp-single-item {
|
103 |
}';
|
104 |
}
|
105 |
$the_wpcf_dynamic_css .= $custom_css;
|
|
public/js/preloader.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
;(function ($) {
|
2 |
'use strict'
|
3 |
jQuery('body').find('.wpcp-carousel-section.wpcp-preloader').each(function () {
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
})
|
11 |
})
|
12 |
-
|
|
1 |
;(function ($) {
|
2 |
'use strict'
|
3 |
jQuery('body').find('.wpcp-carousel-section.wpcp-preloader').each(function () {
|
4 |
+
var carousel_id = $(this).attr('id'),
|
5 |
+
parents_class = jQuery('#' + carousel_id).parent('.wpcp-carousel-wrapper'),
|
6 |
+
parents_siblings_id = parents_class.find('.wpcp-carousel-preloader').attr('id');
|
7 |
+
jQuery(window).load(function () {
|
8 |
+
jQuery('#' + parents_siblings_id).animate({ opacity: 0 }, 600).remove();
|
9 |
+
jQuery('#' + carousel_id).animate({ opacity: 1 }, 600)
|
|
|
10 |
})
|
11 |
+
})
|
12 |
+
})(jQuery)
|
public/js/preloader.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function($){"use strict";jQuery("body").find(".wpcp-carousel-section.wpcp-preloader").each(function(){var carousel_id=$(this).attr("id"),parents_class,parents_siblings_id=jQuery("#"+carousel_id).parent(".wpcp-carousel-wrapper").find(".wpcp-carousel-preloader").attr("id");jQuery(window).load(function(){jQuery("#"+parents_siblings_id).animate({opacity:0},600).remove(),jQuery("#"+carousel_id).animate({opacity:1},600)})})}(jQuery);
|
1 |
+
!function($){"use strict";jQuery("body").find(".wpcp-carousel-section.wpcp-preloader").each((function(){var carousel_id=$(this).attr("id"),parents_class,parents_siblings_id=jQuery("#"+carousel_id).parent(".wpcp-carousel-wrapper").find(".wpcp-carousel-preloader").attr("id");jQuery(window).load((function(){jQuery("#"+parents_siblings_id).animate({opacity:0},600).remove(),jQuery("#"+carousel_id).animate({opacity:1},600)}))}))}(jQuery);
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: shapedplugin
|
|
3 |
Donate link: http://shapedplugin.com/donate
|
4 |
Tags: wordpress carousel, best carousel plugin, image carousel, image slider, post carousel, custom post carousel, custom taxonomy carousel, woocommerce product carousel, content carousel, video carousel, video slider, video lightbox, youtube carousel, video gallery, carousel, slider, responsive slider, responsive carousel, carousel slider, ticker carousel, center mode carousel, slide anything, image gallery, image lightbox, wordpress image gallery, photo gallery, gallery slider, wordpress gallery plugin, gallery, post slider, vimeo slider, self hosted video carousel, content slider, wordpress slider, featured content slider, html slider, horizontal carousel slider, posts content slider, product carousel, woocommerce slider, woocommerce product slider
|
5 |
Requires at least: 4.3
|
6 |
-
Tested up to: 5.5
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -326,6 +326,11 @@ Thank you!
|
|
326 |
|
327 |
== Changelog ==
|
328 |
|
|
|
|
|
|
|
|
|
|
|
329 |
= 2.1.11 – Aug 14, 2020 =
|
330 |
* Fix: WordPress 5.5 compatibility issue.
|
331 |
* Fix: Undefined variable: outline issue.
|
3 |
Donate link: http://shapedplugin.com/donate
|
4 |
Tags: wordpress carousel, best carousel plugin, image carousel, image slider, post carousel, custom post carousel, custom taxonomy carousel, woocommerce product carousel, content carousel, video carousel, video slider, video lightbox, youtube carousel, video gallery, carousel, slider, responsive slider, responsive carousel, carousel slider, ticker carousel, center mode carousel, slide anything, image gallery, image lightbox, wordpress image gallery, photo gallery, gallery slider, wordpress gallery plugin, gallery, post slider, vimeo slider, self hosted video carousel, content slider, wordpress slider, featured content slider, html slider, horizontal carousel slider, posts content slider, product carousel, woocommerce slider, woocommerce product slider
|
5 |
Requires at least: 4.3
|
6 |
+
Tested up to: 5.5.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
326 |
|
327 |
== Changelog ==
|
328 |
|
329 |
+
= 2.1.12 – Oct 10, 2020 =
|
330 |
+
* New: Swipe to slide option.
|
331 |
+
* Improved: Load dynamic CSS on header.
|
332 |
+
* Fix: Preloader issue.
|
333 |
+
|
334 |
= 2.1.11 – Aug 14, 2020 =
|
335 |
* Fix: WordPress 5.5 compatibility issue.
|
336 |
* Fix: Undefined variable: outline issue.
|
wp-carousel-free.php
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
/**
|
3 |
* A carousel plugin for WordPress.
|
4 |
*
|
5 |
-
* @link
|
6 |
-
* @since
|
7 |
-
* @package
|
8 |
*
|
9 |
* Plugin Name: WordPress Carousel
|
10 |
* Plugin URI: https://shapedplugin.com/plugin/wordpress-carousel-pro/
|
11 |
* Description: The Most Powerful and User-friendly WordPress Carousel Plugin. Create beautiful carousels in minutes using Images, Posts, WooCommerce Products etc.
|
12 |
-
* Version: 2.1.
|
13 |
* Author: ShapedPlugin
|
14 |
* Author URI: https://shapedplugin.com/
|
15 |
* License: GPL-2.0+
|
@@ -17,320 +17,336 @@
|
|
17 |
* Text Domain: wp-carousel-free
|
18 |
* Domain Path: /languages
|
19 |
* WC requires at least: 3.0
|
20 |
-
* WC tested up to: 4.
|
21 |
*/
|
22 |
|
23 |
// If this file is called directly, abort.
|
24 |
-
if (
|
25 |
-
|
26 |
}
|
27 |
|
28 |
/**
|
29 |
* The code that runs during plugin activation.
|
30 |
* This action is documented in includes/class-wp-carousel-free-activator.php
|
31 |
*/
|
32 |
-
function activate_wp_carousel_free()
|
33 |
-
|
34 |
-
|
|
|
35 |
}
|
36 |
-
register_activation_hook(
|
37 |
|
38 |
|
39 |
/**
|
40 |
* Main class of the plugin
|
41 |
*
|
42 |
* @package WP_Carousel_Free
|
43 |
-
* @author
|
44 |
*/
|
45 |
-
class SP_WP_Carousel_Free
|
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 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
334 |
|
335 |
} // SP_WP_Carousel_Free
|
336 |
|
@@ -339,12 +355,13 @@ class SP_WP_Carousel_Free {
|
|
339 |
*
|
340 |
* Returns the main instance of the WP Carousel Free.
|
341 |
*
|
342 |
-
* @since
|
343 |
* @return void
|
344 |
*/
|
345 |
-
function sp_wpcf()
|
346 |
-
|
347 |
-
|
|
|
348 |
}
|
349 |
// Launch it out .
|
350 |
sp_wpcf();
|
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 |
* Plugin Name: WordPress Carousel
|
10 |
* Plugin URI: https://shapedplugin.com/plugin/wordpress-carousel-pro/
|
11 |
* Description: The Most Powerful and User-friendly WordPress Carousel Plugin. Create beautiful carousels in minutes using Images, Posts, WooCommerce Products etc.
|
12 |
+
* Version: 2.1.12
|
13 |
* Author: ShapedPlugin
|
14 |
* Author URI: https://shapedplugin.com/
|
15 |
* License: GPL-2.0+
|
17 |
* Text Domain: wp-carousel-free
|
18 |
* Domain Path: /languages
|
19 |
* WC requires at least: 3.0
|
20 |
+
* WC tested up to: 4.5.2
|
21 |
*/
|
22 |
|
23 |
// If this file is called directly, abort.
|
24 |
+
if (! defined('WPINC') ) {
|
25 |
+
die;
|
26 |
}
|
27 |
|
28 |
/**
|
29 |
* The code that runs during plugin activation.
|
30 |
* This action is documented in includes/class-wp-carousel-free-activator.php
|
31 |
*/
|
32 |
+
function activate_wp_carousel_free()
|
33 |
+
{
|
34 |
+
include_once WPCAROUSELF_PATH . '/includes/class-wp-carousel-free-activator.php';
|
35 |
+
WP_Carousel_Free_Activator::activate();
|
36 |
}
|
37 |
+
register_activation_hook(__FILE__, 'activate_wp_carousel_free');
|
38 |
|
39 |
|
40 |
/**
|
41 |
* Main class of the plugin
|
42 |
*
|
43 |
* @package WP_Carousel_Free
|
44 |
+
* @author Shamim Mia <shamhagh@gmail.com>
|
45 |
*/
|
46 |
+
class SP_WP_Carousel_Free
|
47 |
+
{
|
48 |
+
|
49 |
+
|
50 |
+
/**
|
51 |
+
* The loader that's responsible for maintaining and registering all hooks that power
|
52 |
+
* the plugin.
|
53 |
+
*
|
54 |
+
* @since 2.0.0
|
55 |
+
* @access protected
|
56 |
+
* @var WP_Carousel_Free_Loader $loader Maintains and registers all hooks for the plugin.
|
57 |
+
*/
|
58 |
+
public $loader;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* The unique identifier of this plugin.
|
62 |
+
*
|
63 |
+
* @since 2.0.0
|
64 |
+
* @access protected
|
65 |
+
* @var string $plugin_name The string used to uniquely identify this plugin.
|
66 |
+
*/
|
67 |
+
protected $plugin_name;
|
68 |
+
|
69 |
+
/**
|
70 |
+
* The current version of the plugin.
|
71 |
+
*
|
72 |
+
* @since 2.0.0
|
73 |
+
* @access protected
|
74 |
+
* @var string $version The current version of the plugin.
|
75 |
+
*/
|
76 |
+
protected $version;
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Plugin textdomain.
|
80 |
+
*
|
81 |
+
* @since 2.0.0
|
82 |
+
*
|
83 |
+
* @var string
|
84 |
+
*/
|
85 |
+
public $domain = 'wp-carousel-free';
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Minimum PHP version required
|
89 |
+
*
|
90 |
+
* @since 2.0.0
|
91 |
+
* @var string
|
92 |
+
*/
|
93 |
+
private $min_php = '5.4.0';
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Plugin file.
|
97 |
+
*
|
98 |
+
* @var string
|
99 |
+
*/
|
100 |
+
private $file = __FILE__;
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Holds class object
|
104 |
+
*
|
105 |
+
* @var object
|
106 |
+
* @since 2.0.0
|
107 |
+
*/
|
108 |
+
private static $instance;
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Initialize the SP_WP_Carousel_Free() class
|
112 |
+
*
|
113 |
+
* @since 2.0.0
|
114 |
+
* @return object
|
115 |
+
*/
|
116 |
+
public static function init()
|
117 |
+
{
|
118 |
+
if (! isset(self::$instance) && ! ( self::$instance instanceof SP_WP_Carousel_Free ) ) {
|
119 |
+
self::$instance = new SP_WP_Carousel_Free();
|
120 |
+
self::$instance->setup();
|
121 |
+
}
|
122 |
+
return self::$instance;
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Define the core functionality of the plugin.
|
127 |
+
*
|
128 |
+
* Set the plugin name and the plugin version that can be used throughout the plugin.
|
129 |
+
* Load the dependencies, define the locale, and set the hooks for the admin area and
|
130 |
+
* the public-facing side of the site.
|
131 |
+
*
|
132 |
+
* @since 2.0.0
|
133 |
+
*/
|
134 |
+
public function setup()
|
135 |
+
{
|
136 |
+
$this->plugin_name = 'wp-carousel-free';
|
137 |
+
$this->version = '2.1.12';
|
138 |
+
$this->define_constants();
|
139 |
+
$this->includes();
|
140 |
+
$this->load_dependencies();
|
141 |
+
$this->set_locale();
|
142 |
+
$this->define_common_hooks();
|
143 |
+
$this->define_admin_hooks();
|
144 |
+
$this->define_public_hooks();
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Define plugin constants.
|
149 |
+
*
|
150 |
+
* @since 2.0.0
|
151 |
+
* @return void
|
152 |
+
*/
|
153 |
+
private function define_constants()
|
154 |
+
{
|
155 |
+
$this->define('WPCAROUSELF_BASENAME', plugin_basename(__FILE__));
|
156 |
+
$this->define('WPCAROUSELF_VERSION', $this->version);
|
157 |
+
$this->define('WPCAROUSELF_PATH', plugin_dir_path(__FILE__));
|
158 |
+
$this->define('WPCAROUSELF_INCLUDES', WPCAROUSELF_PATH . '/includes');
|
159 |
+
$this->define('WPCAROUSELF_URL', plugin_dir_url(__FILE__));
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Define constant if not already set.
|
164 |
+
*
|
165 |
+
* @param string $name Constant name.
|
166 |
+
* @param string|bool $value Constant Value.
|
167 |
+
*/
|
168 |
+
private function define( $name, $value )
|
169 |
+
{
|
170 |
+
if (! defined($name) ) {
|
171 |
+
define($name, $value);
|
172 |
+
}
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* Included required files.
|
177 |
+
*
|
178 |
+
* @since 2.0.0
|
179 |
+
* @return void
|
180 |
+
*/
|
181 |
+
public function includes()
|
182 |
+
{
|
183 |
+
|
184 |
+
include_once WPCAROUSELF_INCLUDES . '/class-wp-carosuel-free-updates.php';
|
185 |
+
include_once WPCAROUSELF_INCLUDES . '/class-wp-carousel-free-loader.php';
|
186 |
+
include_once WPCAROUSELF_INCLUDES . '/class-wp-carousel-free-post-types.php';
|
187 |
+
include_once WPCAROUSELF_PATH . '/admin/views/wpcfree-metabox/classes/setup.class.php';
|
188 |
+
include_once WPCAROUSELF_PATH . '/admin/views/notices/review.php';
|
189 |
+
include_once WPCAROUSELF_PATH . '/admin/views/metabox-config.php';
|
190 |
+
include_once WPCAROUSELF_PATH . '/admin/views/option-config.php';
|
191 |
+
include_once WPCAROUSELF_INCLUDES . '/class-wp-carousel-free-shortcode.php';
|
192 |
+
include_once WPCAROUSELF_PATH . '/public/shortcode-deprecated.php';
|
193 |
+
include_once WPCAROUSELF_INCLUDES . '/class-wp-carousel-free-i18n.php';
|
194 |
+
include_once WPCAROUSELF_PATH . '/public/class-wp-carousel-free-public.php';
|
195 |
+
// if ( is_admin() ) {
|
196 |
+
include_once WPCAROUSELF_PATH . '/admin/class-wp-carousel-free-admin.php';
|
197 |
+
include_once WPCAROUSELF_PATH . '/admin/views/tmce-button.php';
|
198 |
+
include_once WPCAROUSELF_PATH . '/admin/views/help.php';
|
199 |
+
include_once WPCAROUSELF_PATH . '/admin/views/premium.php';
|
200 |
+
// }
|
201 |
+
}
|
202 |
+
|
203 |
+
/**
|
204 |
+
* Load the required dependencies for this plugin.
|
205 |
+
*
|
206 |
+
* Include the following files that make up the plugin:
|
207 |
+
*
|
208 |
+
* - WP_Carousel_Free_Loader. Orchestrates the hooks of the plugin.
|
209 |
+
* - WP_Carousel_Free_I18n. Defines internationalization functionality.
|
210 |
+
* - WP_Carousel_Free_Admin. Defines all hooks for the admin area.
|
211 |
+
* - WP_Carousel_Free_Public. Defines all hooks for the public side of the site.
|
212 |
+
*
|
213 |
+
* Create an instance of the loader which will be used to register the hooks
|
214 |
+
* with WordPress.
|
215 |
+
*
|
216 |
+
* @since 2.0.0
|
217 |
+
* @access private
|
218 |
+
*/
|
219 |
+
private function load_dependencies()
|
220 |
+
{
|
221 |
+
$this->loader = new WP_Carousel_Free_Loader();
|
222 |
+
|
223 |
+
}
|
224 |
+
|
225 |
+
/**
|
226 |
+
* Define the locale for this plugin for internationalization.
|
227 |
+
*
|
228 |
+
* Uses the WP_Carousel_Free_I18n class in order to set the domain and to register the hook
|
229 |
+
* with WordPress.
|
230 |
+
*
|
231 |
+
* @since 2.0.0
|
232 |
+
* @access private
|
233 |
+
*/
|
234 |
+
private function set_locale()
|
235 |
+
{
|
236 |
+
$plugin_i18n = new WP_Carousel_Free_I18n();
|
237 |
+
$this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain');
|
238 |
+
}
|
239 |
+
|
240 |
+
/**
|
241 |
+
* Register common hooks.
|
242 |
+
*
|
243 |
+
* @since 2.0.0
|
244 |
+
* @access private
|
245 |
+
*/
|
246 |
+
private function define_common_hooks()
|
247 |
+
{
|
248 |
+
$plugin_cpt = new WP_Carousel_Free_Post_Type($this->get_plugin_name(), $this->get_version());
|
249 |
+
$plugin_review_notice = new WP_Carousel_Free_Review($this->get_plugin_name(), $this->get_version());
|
250 |
+
|
251 |
+
$this->loader->add_action('init', $plugin_cpt, 'wp_carousel_post_type', 11);
|
252 |
+
$this->loader->add_action('admin_notices', $plugin_review_notice, 'display_admin_notice');
|
253 |
+
$this->loader->add_action('wp_ajax_sp-wpcfree-never-show-review-notice', $plugin_review_notice, 'dismiss_review_notice');
|
254 |
+
}
|
255 |
+
|
256 |
+
/**
|
257 |
+
* Register all of the hooks related to the admin area functionality
|
258 |
+
* of the plugin.
|
259 |
+
*
|
260 |
+
* @since 2.0.0
|
261 |
+
* @access private
|
262 |
+
*/
|
263 |
+
private function define_admin_hooks()
|
264 |
+
{
|
265 |
+
|
266 |
+
$plugin_admin = new WP_Carousel_Free_Admin($this->get_plugin_name(), $this->get_version());
|
267 |
+
|
268 |
+
$this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_admin_styles');
|
269 |
+
$this->loader->add_filter('post_updated_messages', $plugin_admin, 'wpcp_carousel_updated_messages', 10, 2);
|
270 |
+
$this->loader->add_filter('manage_sp_wp_carousel_posts_columns', $plugin_admin, 'filter_carousel_admin_column');
|
271 |
+
$this->loader->add_action('manage_sp_wp_carousel_posts_custom_column', $plugin_admin, 'display_carousel_admin_fields', 10, 2);
|
272 |
+
$this->loader->add_filter('plugin_action_links', $plugin_admin, 'add_plugin_action_links', 10, 2);
|
273 |
+
$this->loader->add_filter('plugin_row_meta', $plugin_admin, 'plugin_row_meta', 10, 2);
|
274 |
+
$this->loader->add_filter('admin_footer_text', $plugin_admin, 'sp_wpcp_review_text', 10, 2);
|
275 |
+
$this->loader->add_action('activated_plugin', $plugin_admin, 'sp_wpcf_redirect_after_activation', 10, 2);
|
276 |
+
|
277 |
+
// Help Page.
|
278 |
+
$help_page = new WP_Carousel_Free_Help($this->get_plugin_name(), $this->get_version());
|
279 |
+
$this->loader->add_action('admin_menu', $help_page, 'help_admin_menu', 40);
|
280 |
+
|
281 |
+
// Premium Page.
|
282 |
+
$upgrade_page = new WP_Carousel_Free_Upgrade($this->get_plugin_name(), $this->get_version());
|
283 |
+
$this->loader->add_action('admin_menu', $upgrade_page, 'upgrade_admin_menu', 35);
|
284 |
+
|
285 |
+
}
|
286 |
+
|
287 |
+
/**
|
288 |
+
* Register all of the hooks related to the public-facing functionality
|
289 |
+
* of the plugin.
|
290 |
+
*
|
291 |
+
* @since 2.0.0
|
292 |
+
* @access private
|
293 |
+
*/
|
294 |
+
private function define_public_hooks()
|
295 |
+
{
|
296 |
+
|
297 |
+
$plugin_public = new WP_Carousel_Free_Public($this->get_plugin_name(), $this->get_version());
|
298 |
+
|
299 |
+
$this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_styles');
|
300 |
+
$this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_scripts');
|
301 |
+
|
302 |
+
$plugin_shortcode = new WP_Carousel_Free_Shortcode($this->get_plugin_name(), $this->get_version());
|
303 |
+
$this->loader->add_shortcode('sp_wpcarousel', $plugin_shortcode, 'sp_wp_carousel_shortcode');
|
304 |
+
|
305 |
+
}
|
306 |
+
|
307 |
+
/**
|
308 |
+
* The name of the plugin used to uniquely identify it within the context of
|
309 |
+
* WordPress and to define internationalization functionality.
|
310 |
+
*
|
311 |
+
* @since 2.0.0
|
312 |
+
* @return string The name of the plugin.
|
313 |
+
*/
|
314 |
+
public function get_plugin_name()
|
315 |
+
{
|
316 |
+
return $this->plugin_name;
|
317 |
+
}
|
318 |
+
|
319 |
+
/**
|
320 |
+
* Retrieve the version number of the plugin.
|
321 |
+
*
|
322 |
+
* @since 2.0.0
|
323 |
+
* @return string The version number of the plugin.
|
324 |
+
*/
|
325 |
+
public function get_version()
|
326 |
+
{
|
327 |
+
return $this->version;
|
328 |
+
}
|
329 |
+
|
330 |
+
/**
|
331 |
+
* The reference to the class that orchestrates the hooks with the plugin.
|
332 |
+
*
|
333 |
+
* @since 2.0.0
|
334 |
+
* @return WP_Carousel_Free_Loader Orchestrates the hooks of the plugin.
|
335 |
+
*/
|
336 |
+
public function get_loader()
|
337 |
+
{
|
338 |
+
return $this->loader;
|
339 |
+
}
|
340 |
+
|
341 |
+
/**
|
342 |
+
* Run the loader to execute all of the hooks with WordPress.
|
343 |
+
*
|
344 |
+
* @since 2.0.0
|
345 |
+
*/
|
346 |
+
public function run()
|
347 |
+
{
|
348 |
+
$this->loader->run();
|
349 |
+
}
|
350 |
|
351 |
} // SP_WP_Carousel_Free
|
352 |
|
355 |
*
|
356 |
* Returns the main instance of the WP Carousel Free.
|
357 |
*
|
358 |
+
* @since 2.0.0
|
359 |
* @return void
|
360 |
*/
|
361 |
+
function sp_wpcf()
|
362 |
+
{
|
363 |
+
$plugin = SP_WP_Carousel_Free::init();
|
364 |
+
$plugin->loader->run();
|
365 |
}
|
366 |
// Launch it out .
|
367 |
sp_wpcf();
|