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

Version Description

Jun 05, 2021 = * New: Carousel direction(Right to Left and Left to Right) option. * Tested: WooCommerce 5.3.0 compatibility.

Download this release

Release Info

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

Code changes from version 2.1.19 to 2.1.20

admin/views/metabox-config.php CHANGED
@@ -397,6 +397,19 @@ SP_WPCF::createSection(
397
  'subtitle' => __( 'On/Off infinite loop mode.', 'wp-carousel-free' ),
398
  'default' => true,
399
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
400
  array(
401
  'type' => 'subheading',
402
  'content' => __( 'Navigation', 'wp-carousel-free' ),
397
  'subtitle' => __( 'On/Off infinite loop mode.', 'wp-carousel-free' ),
398
  'default' => true,
399
  ),
400
+ array(
401
+ 'id' => 'wpcp_carousel_direction',
402
+ 'type' => 'button_set',
403
+ 'title' => __( 'Carousel Direction', 'wp-carousel-pro' ),
404
+ 'subtitle' => __( 'Set carousel direction as you need.', 'wp-carousel-pro' ),
405
+ 'options' => array(
406
+ 'rtl' => __( 'Right to Left', 'wp-carousel-pro' ),
407
+ 'ltr' => __( 'Left to Right', 'wp-carousel-pro' ),
408
+ ),
409
+ 'radio' => true,
410
+ 'default' => 'rtl',
411
+ 'dependency' => array( 'wpcp_carousel_orientation', '==', 'horizontal', true ),
412
+ ),
413
  array(
414
  'type' => 'subheading',
415
  'content' => __( 'Navigation', 'wp-carousel-free' ),
includes/class-wp-carousel-free-shortcode.php CHANGED
@@ -22,186 +22,187 @@
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
- // General Settings.
83
- $section_title = isset( $shortcode_data['section_title'] ) ? $shortcode_data['section_title'] : '';
84
-
85
- // Image Carousel.
86
- $image_orderby = isset($shortcode_data['wpcp_image_order_by']) ? $shortcode_data['wpcp_image_order_by'] : '';
87
- $show_slide_image = isset($shortcode_data['show_image']) ? $shortcode_data['show_image'] : '';
88
- $show_img_title = isset($shortcode_data['wpcp_post_title']) ? $shortcode_data['wpcp_post_title'] : '';
89
-
90
- $_image_title_att = isset($shortcode_data['_image_title_attr']) ? $shortcode_data['_image_title_attr'] : '';
91
- $show_image_title_attr = ( true == $_image_title_att ) ? 'true' : 'false';
92
- $image_sizes = isset($shortcode_data['wpcp_image_sizes']) ? $shortcode_data['wpcp_image_sizes'] : '';
93
-
94
- // Carousel Column.
95
- $column_number = isset($shortcode_data['wpcp_number_of_columns']) ? $shortcode_data['wpcp_number_of_columns'] : '';
96
- $old_column_lg_desktop = isset($column_number['column1']) ? $column_number['column1'] : '5';
97
- $column_lg_desktop = isset($column_number['lg_desktop']) && ! empty($column_number['lg_desktop']) ? $column_number['lg_desktop'] : $old_column_lg_desktop;
98
- $old_column_desktop = isset($column_number['column2']) ? $column_number['column2'] : '4';
99
- $column_desktop = isset($column_number['desktop']) && ! empty($column_number['desktop']) ? $column_number['desktop'] : $old_column_desktop;
100
- $old_column_sm_desktop = isset($column_number['column3']) ? $column_number['column3'] : '3';
101
- $column_sm_desktop = isset($column_number['laptop']) && ! empty($column_number['laptop']) ? $column_number['laptop'] : $old_column_sm_desktop;
102
- $old_column_tablet = isset($column_number['column4']) ? $column_number['column4'] : '2';
103
- $column_tablet = isset($column_number['tablet']) && ! empty($column_number['tablet']) ? $column_number['tablet'] : $old_column_tablet;
104
- $old_column_mobile = isset($column_number['column5']) ? $column_number['column5'] : '1';
105
- $column_mobile = isset($column_number['mobile']) && ! empty($column_number['mobile']) ? $column_number['mobile'] : $old_column_mobile;
106
-
107
- // Carousel Settings.
108
- $preloader = isset($shortcode_data['wpcp_preloader']) ? $shortcode_data['wpcp_preloader'] : true;
109
- $auto_play = $shortcode_data['wpcp_carousel_auto_play'] ? 'true' : 'false';
110
- $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';
111
- $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;
112
- $old_speed = isset($shortcode_data['standard_carousel_scroll_speed']) && is_numeric($shortcode_data['standard_carousel_scroll_speed']) ? $shortcode_data['standard_carousel_scroll_speed'] : '600';
113
- $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;
114
- $infinite = $shortcode_data['carousel_infinite'] ? 'true' : 'false';
115
- $pause_on_hover = $shortcode_data['carousel_pause_on_hover'] ? 'true' : 'false';
116
- $draggable = $shortcode_data['slider_draggable'] ? 'true' : 'false';
117
- $swipe = $shortcode_data['slider_swipe'] ? 'true' : 'false';
118
- $is_swipetoslide = isset($shortcode_data['carousel_swipetoslide']) ? $shortcode_data['carousel_swipetoslide'] : true;
119
- $swipetoslide = $is_swipetoslide ? 'true' : 'false';
120
-
121
- $post_order_by = ( isset($shortcode_data['wpcp_post_order_by']) ? $shortcode_data['wpcp_post_order_by'] : '' );
122
- $post_order = ( isset($shortcode_data['wpcp_post_order']) ? $shortcode_data['wpcp_post_order'] : '' );
123
-
124
- $wpcp_dots = isset($shortcode_data['wpcp_pagination']) ? $shortcode_data['wpcp_pagination'] : '';
125
- switch ( $wpcp_dots ) {
126
- case 'show':
127
- $dots = 'true';
128
- $dots_mobile = 'true';
129
- break;
130
- case 'hide':
131
- $dots = 'false';
132
- $dots_mobile = 'false';
133
- break;
134
- case 'hide_mobile':
135
- $dots = 'true';
136
- $dots_mobile = 'false';
137
- break;
138
- }
139
- $wpcp_arrows = isset($shortcode_data['wpcp_navigation']) ? $shortcode_data['wpcp_navigation'] : 'show';
140
- switch ( $wpcp_arrows ) {
141
- case 'show':
142
- $arrows = 'true';
143
- $arrows_mobile = 'true';
144
- break;
145
- case 'hide':
146
- $arrows = 'false';
147
- $arrows_mobile = 'false';
148
- break;
149
- case 'hide_mobile':
150
- $arrows = 'true';
151
- $arrows_mobile = 'false';
152
- break;
153
- }
154
-
155
- // Carousel Classes.
156
- $carousel_classes = 'wpcp-carousel-section sp-wpcp-' . $post_id . ' nav-vertical-center';
157
- if ('image-carousel' === $carousel_type ) {
158
- $carousel_classes .= ' wpcp-image-carousel';
159
- } elseif ('post-carousel' === $carousel_type ) {
160
- $carousel_classes .= ' wpcp-post-carousel';
161
- } elseif ('product-carousel' === $carousel_type ) {
162
- $carousel_classes .= ' wpcp-product-carousel';
163
- }
164
-
165
- // Carousel Configurations.
166
- if (wpcf_get_option('wpcp_slick_js', true) ) {
167
- wp_enqueue_script('wpcf-slick');
168
- }
169
- wp_enqueue_script('wpcf-slick-config');
170
-
171
- // Preloader classes.
172
- if ($preloader ) {
173
- wp_enqueue_script('wpcp-preloader');
174
- $carousel_classes .= ' wpcp-preloader';
175
- }
176
-
177
- $carousel_classes .= ' wpcp-standard';
178
- $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 . ' }\' ';
179
-
180
- if ('image-carousel' === $carousel_type ) {
181
- ob_start();
182
- include WPCAROUSELF_PATH . '/public/templates/image-carousel.php';
183
- $html = ob_get_contents();
184
- ob_end_clean();
185
-
186
- return apply_filters('sp_wpcp_image_carousel', $html, $post_id);
187
- }
188
- if ('post-carousel' === $carousel_type ) {
189
- ob_start();
190
- include WPCAROUSELF_PATH . '/public/templates/post-carousel.php';
191
- $html = ob_get_contents();
192
- ob_end_clean();
193
-
194
- return apply_filters('sp_wpcp_post_carousel', $html, $post_id);
195
- }
196
- if ('product-carousel' === $carousel_type ) {
197
- ob_start();
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
  }
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
+ if ( is_null( self::$instance ) ) {
53
+ self::$instance = new self();
54
+ }
55
+ return self::$instance;
56
+ }
57
+
58
+ /**
59
+ * A shortcode for rendering the carousel.
60
+ *
61
+ * @param integer $attributes The ID the shortcode.
62
+ * @return void
63
+ */
64
+ public function sp_wp_carousel_shortcode( $attributes ) {
65
+ if ( empty( $attributes['id'] ) ) {
66
+ return;
67
+ }
68
+
69
+ $post_id = intval( $attributes['id'] );
70
+
71
+ // Video Carousel.
72
+ $upload_data = get_post_meta( $post_id, 'sp_wpcp_upload_options', true );
73
+ if ( empty( $upload_data ) ) {
74
+ return;
75
+ }
76
+ $carousel_type = isset( $upload_data['wpcp_carousel_type'] ) ? $upload_data['wpcp_carousel_type'] : '';
77
+
78
+ $shortcode_data = get_post_meta( $post_id, 'sp_wpcp_shortcode_options', true );
79
+
80
+ // General Settings.
81
+ $section_title = isset( $shortcode_data['section_title'] ) ? $shortcode_data['section_title'] : '';
82
+
83
+ // Image Carousel.
84
+ $image_orderby = isset( $shortcode_data['wpcp_image_order_by'] ) ? $shortcode_data['wpcp_image_order_by'] : '';
85
+ $show_slide_image = isset( $shortcode_data['show_image'] ) ? $shortcode_data['show_image'] : '';
86
+ $show_img_title = isset( $shortcode_data['wpcp_post_title'] ) ? $shortcode_data['wpcp_post_title'] : '';
87
+
88
+ $_image_title_att = isset( $shortcode_data['_image_title_attr'] ) ? $shortcode_data['_image_title_attr'] : '';
89
+ $show_image_title_attr = ( true == $_image_title_att ) ? 'true' : 'false';
90
+ $image_sizes = isset( $shortcode_data['wpcp_image_sizes'] ) ? $shortcode_data['wpcp_image_sizes'] : '';
91
+
92
+ // Carousel Column.
93
+ $column_number = isset( $shortcode_data['wpcp_number_of_columns'] ) ? $shortcode_data['wpcp_number_of_columns'] : '';
94
+ $old_column_lg_desktop = isset( $column_number['column1'] ) ? $column_number['column1'] : '5';
95
+ $column_lg_desktop = isset( $column_number['lg_desktop'] ) && ! empty( $column_number['lg_desktop'] ) ? $column_number['lg_desktop'] : $old_column_lg_desktop;
96
+ $old_column_desktop = isset( $column_number['column2'] ) ? $column_number['column2'] : '4';
97
+ $column_desktop = isset( $column_number['desktop'] ) && ! empty( $column_number['desktop'] ) ? $column_number['desktop'] : $old_column_desktop;
98
+ $old_column_sm_desktop = isset( $column_number['column3'] ) ? $column_number['column3'] : '3';
99
+ $column_sm_desktop = isset( $column_number['laptop'] ) && ! empty( $column_number['laptop'] ) ? $column_number['laptop'] : $old_column_sm_desktop;
100
+ $old_column_tablet = isset( $column_number['column4'] ) ? $column_number['column4'] : '2';
101
+ $column_tablet = isset( $column_number['tablet'] ) && ! empty( $column_number['tablet'] ) ? $column_number['tablet'] : $old_column_tablet;
102
+ $old_column_mobile = isset( $column_number['column5'] ) ? $column_number['column5'] : '1';
103
+ $column_mobile = isset( $column_number['mobile'] ) && ! empty( $column_number['mobile'] ) ? $column_number['mobile'] : $old_column_mobile;
104
+
105
+ // Carousel Settings.
106
+ $preloader = isset( $shortcode_data['wpcp_preloader'] ) ? $shortcode_data['wpcp_preloader'] : true;
107
+ $auto_play = $shortcode_data['wpcp_carousel_auto_play'] ? 'true' : 'false';
108
+ $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';
109
+ $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;
110
+ $old_speed = isset( $shortcode_data['standard_carousel_scroll_speed'] ) && is_numeric( $shortcode_data['standard_carousel_scroll_speed'] ) ? $shortcode_data['standard_carousel_scroll_speed'] : '600';
111
+ $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;
112
+ $infinite = $shortcode_data['carousel_infinite'] ? 'true' : 'false';
113
+ $pause_on_hover = $shortcode_data['carousel_pause_on_hover'] ? 'true' : 'false';
114
+ $carousel_direction = isset( $shortcode_data['wpcp_carousel_direction'] ) ? $shortcode_data['wpcp_carousel_direction'] : '';
115
+
116
+ $draggable = $shortcode_data['slider_draggable'] ? 'true' : 'false';
117
+ $swipe = $shortcode_data['slider_swipe'] ? 'true' : 'false';
118
+ $is_swipetoslide = isset( $shortcode_data['carousel_swipetoslide'] ) ? $shortcode_data['carousel_swipetoslide'] : true;
119
+ $swipetoslide = $is_swipetoslide ? 'true' : 'false';
120
+
121
+ $post_order_by = ( isset( $shortcode_data['wpcp_post_order_by'] ) ? $shortcode_data['wpcp_post_order_by'] : '' );
122
+ $post_order = ( isset( $shortcode_data['wpcp_post_order'] ) ? $shortcode_data['wpcp_post_order'] : '' );
123
+
124
+ $wpcp_dots = isset( $shortcode_data['wpcp_pagination'] ) ? $shortcode_data['wpcp_pagination'] : '';
125
+ switch ( $wpcp_dots ) {
126
+ case 'show':
127
+ $dots = 'true';
128
+ $dots_mobile = 'true';
129
+ break;
130
+ case 'hide':
131
+ $dots = 'false';
132
+ $dots_mobile = 'false';
133
+ break;
134
+ case 'hide_mobile':
135
+ $dots = 'true';
136
+ $dots_mobile = 'false';
137
+ break;
138
+ }
139
+ $wpcp_arrows = isset( $shortcode_data['wpcp_navigation'] ) ? $shortcode_data['wpcp_navigation'] : 'show';
140
+ switch ( $wpcp_arrows ) {
141
+ case 'show':
142
+ $arrows = 'true';
143
+ $arrows_mobile = 'true';
144
+ break;
145
+ case 'hide':
146
+ $arrows = 'false';
147
+ $arrows_mobile = 'false';
148
+ break;
149
+ case 'hide_mobile':
150
+ $arrows = 'true';
151
+ $arrows_mobile = 'false';
152
+ break;
153
+ }
154
+
155
+ // Carousel Classes.
156
+ $carousel_classes = 'wpcp-carousel-section sp-wpcp-' . $post_id . ' nav-vertical-center';
157
+ if ( 'image-carousel' === $carousel_type ) {
158
+ $carousel_classes .= ' wpcp-image-carousel';
159
+ } elseif ( 'post-carousel' === $carousel_type ) {
160
+ $carousel_classes .= ' wpcp-post-carousel';
161
+ } elseif ( 'product-carousel' === $carousel_type ) {
162
+ $carousel_classes .= ' wpcp-product-carousel';
163
+ }
164
+
165
+ // Carousel Configurations.
166
+ if ( wpcf_get_option( 'wpcp_slick_js', true ) ) {
167
+ wp_enqueue_script( 'wpcf-slick' );
168
+ }
169
+ wp_enqueue_script( 'wpcf-slick-config' );
170
+
171
+ // Preloader classes.
172
+ if ( $preloader ) {
173
+ wp_enqueue_script( 'wpcp-preloader' );
174
+ $carousel_classes .= ' wpcp-preloader';
175
+ }
176
+
177
+ $rtl = ( 'ltr' === $carousel_direction ) ? 'true' : 'false';
178
+ $carousel_classes .= ' wpcp-standard';
179
+ $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 . ' } } ], "rtl":' . $rtl . ', "swipe": ' . $swipe . ', "draggable": ' . $draggable . ', "swipeToSlide":' . $swipetoslide . ' }\' ';
180
+
181
+ if ( 'image-carousel' === $carousel_type ) {
182
+ ob_start();
183
+ include WPCAROUSELF_PATH . '/public/templates/image-carousel.php';
184
+ $html = ob_get_contents();
185
+ ob_end_clean();
186
+
187
+ return apply_filters( 'sp_wpcp_image_carousel', $html, $post_id );
188
+ }
189
+ if ( 'post-carousel' === $carousel_type ) {
190
+ ob_start();
191
+ include WPCAROUSELF_PATH . '/public/templates/post-carousel.php';
192
+ $html = ob_get_contents();
193
+ ob_end_clean();
194
+
195
+ return apply_filters( 'sp_wpcp_post_carousel', $html, $post_id );
196
+ }
197
+ if ( 'product-carousel' === $carousel_type ) {
198
+ ob_start();
199
+ include WPCAROUSELF_PATH . '/public/templates/product-carousel.php';
200
+ $html = ob_get_contents();
201
+ ob_end_clean();
202
+
203
+ return apply_filters( 'sp_wpcp_product_carousel', $html, $post_id );
204
+ }
205
+
206
+ return '';
207
+ }
208
  }
public/shortcode-deprecated.php CHANGED
@@ -146,7 +146,8 @@ if ( ! function_exists( 'wp_carousel_free_shortcode' ) ) {
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>";
146
  // Carousel Configurations.
147
  wp_enqueue_script( 'wpcf-slick' );
148
  wp_enqueue_script( 'wpcf-slick-config' );
149
+ $rtl = ( 'ltr' === $carousel_direction ) ? 'true' : 'false';
150
+ $wpcp_slick_options = 'data-slick=\'{ "accessibility": true, "arrows":' . $nav . ', "autoplay":' . $auto_play . ', "autoplaySpeed":' . $autoplay_speed . ', "dots":' . $bullets . ', "infinite":' . $infinite . ', "speed":' . $speed . ', "pauseOnHover":' . $pause_on_hover . ', "slidesToShow":' . $items . ', "responsive":[ { "breakpoint":1200, "settings": { "slidesToShow":' . $items_desktop . ' } }, { "breakpoint":980, "settings":{ "slidesToShow":' . $items_desktop_small . ' } }, { "breakpoint":736, "settings": { "slidesToShow":' . $items_tablet . ' } }, {"breakpoint":480, "settings":{ "slidesToShow":' . $items_mobile . ', "arrows":' . $nav_mobile . ', "dots":' . $bullets_mobile . ' } } ], "rows":1, "rtl":' . $rtl . ', "swipe":' . $swipe . ', "draggable":' . $draggable . ' }\' ';
151
 
152
  $gallery_div = "
153
  <div id='wordpress-carousel-free-$id' class='wpcp-carousel-section wpcp-standard nav-vertical-center' $wpcp_slick_options>";
public/templates/image-carousel.php CHANGED
@@ -24,7 +24,8 @@ if ( $section_title ) {
24
  if ( $preloader ) {
25
  require WPCAROUSELF_PATH . '/public/templates/preloader.php';
26
  }
27
- echo '<div id="sp-wp-carousel-free-id-' . $post_id . '" class="' . $carousel_classes . '" ' . $wpcp_slick_options . ' dir="ltr">';
 
28
  $attachments = explode( ',', $gallery_ids );
29
  ( ( 'rand' == $image_orderby ) ? shuffle( $attachments ) : '' );
30
  if ( is_array( $attachments ) || is_object( $attachments ) ) :
24
  if ( $preloader ) {
25
  require WPCAROUSELF_PATH . '/public/templates/preloader.php';
26
  }
27
+ $the_rtl = ( 'ltr' === $carousel_direction ) ? ' dir="rtl"' : ' dir="ltr"';
28
+ echo '<div id="sp-wp-carousel-free-id-' . $post_id . '" class="' . $carousel_classes . '" ' . $wpcp_slick_options . ' ' . $the_rtl . '>';
29
  $attachments = explode( ',', $gallery_ids );
30
  ( ( 'rand' == $image_orderby ) ? shuffle( $attachments ) : '' );
31
  if ( is_array( $attachments ) || is_object( $attachments ) ) :
public/templates/post-carousel.php CHANGED
@@ -33,7 +33,8 @@ $show_post_author = $shortcode_data['wpcp_post_author_show'];
33
  if ( $preloader ) {
34
  require WPCAROUSELF_PATH . '/public/templates/preloader.php';
35
  }
36
- echo '<div id="sp-wp-carousel-free-id-' . $post_id . '" class="' . $carousel_classes . '" ' . $wpcp_slick_options . ' dir="ltr">';
 
37
  $post_query = new WP_Query( $args );
38
  if ( $post_query->have_posts() ) {
39
  while ( $post_query->have_posts() ) :
@@ -53,7 +54,7 @@ $show_post_author = $shortcode_data['wpcp_post_author_show'];
53
  } // End of Has post thumbnail.
54
 
55
  // Post Title.
56
- $wpcp_title = sprintf( '<h2 class="wpcp-post-title"><a href="%1$s">%2$s</a></h2>', get_the_permalink(), get_the_title() );
57
  $wpcp_post_title = ( $show_img_title && ! empty( get_the_title() ) ) ? $wpcp_title : '';
58
 
59
  // The Post Author.
33
  if ( $preloader ) {
34
  require WPCAROUSELF_PATH . '/public/templates/preloader.php';
35
  }
36
+ $the_rtl = ( 'ltr' === $carousel_direction ) ? ' dir="rtl"' : ' dir="ltr"';
37
+ echo '<div id="sp-wp-carousel-free-id-' . $post_id . '" class="' . $carousel_classes . '" ' . $wpcp_slick_options . ' ' . $the_rtl . '>';
38
  $post_query = new WP_Query( $args );
39
  if ( $post_query->have_posts() ) {
40
  while ( $post_query->have_posts() ) :
54
  } // End of Has post thumbnail.
55
 
56
  // Post Title.
57
+ $wpcp_title = sprintf( '<h2 class="wpcp-post-title"><a href="%1$s">%2$s</a></h2>', get_the_permalink(), get_the_title() );
58
  $wpcp_post_title = ( $show_img_title && ! empty( get_the_title() ) ) ? $wpcp_title : '';
59
 
60
  // The Post Author.
public/templates/product-carousel.php CHANGED
@@ -46,7 +46,8 @@ $show_product_cart = $shortcode_data['wpcp_product_cart'];
46
  if ( $preloader ) {
47
  require WPCAROUSELF_PATH . '/public/templates/preloader.php';
48
  }
49
- echo '<div id="sp-wp-carousel-free-id-' . $post_id . '" class="' . $carousel_classes . '" ' . $wpcp_slick_options . ' dir="ltr">';
 
50
  if ( $product_query->have_posts() ) {
51
  while ( $product_query->have_posts() ) :
52
  $product_query->the_post();
46
  if ( $preloader ) {
47
  require WPCAROUSELF_PATH . '/public/templates/preloader.php';
48
  }
49
+ $the_rtl = ( 'ltr' === $carousel_direction ) ? ' dir="rtl"' : ' dir="ltr"';
50
+ echo '<div id="sp-wp-carousel-free-id-' . $post_id . '" class="' . $carousel_classes . '" ' . $wpcp_slick_options . ' ' . $the_rtl . '">';
51
  if ( $product_query->have_posts() ) {
52
  while ( $product_query->have_posts() ) :
53
  $product_query->the_post();
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: shapedplugin, khalilu, shamimmiashuhagh, rubel_miah
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.5
6
- Tested up to: 5.7.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -326,6 +326,10 @@ Thank you!
326
 
327
  == Changelog ==
328
 
 
 
 
 
329
  = 2.1.19 – Apr 16, 2021 =
330
  * Improved: AutoPlay dependency with Pause on Hover.
331
  * Fix: Premium page responsive 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.5
6
+ Tested up to: 5.7.2
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.20 – Jun 05, 2021 =
330
+ * New: Carousel direction(Right to Left and Left to Right) option.
331
+ * Tested: WooCommerce 5.3.0 compatibility.
332
+
333
  = 2.1.19 – Apr 16, 2021 =
334
  * Improved: AutoPlay dependency with Pause on Hover.
335
  * Fix: Premium page responsive issue.
wp-carousel-free.php CHANGED
@@ -9,7 +9,7 @@
9
  * Plugin Name: WordPress Carousel
10
  * Plugin URI: https://shapedplugin.com/plugin/wordpress-carousel-pro/?ref=1
11
  * Description: The Most Powerful and User-friendly WordPress Carousel Plugin. Create beautiful carousels in minutes using Images, Posts, WooCommerce Products etc.
12
- * Version: 2.1.19
13
  * Author: ShapedPlugin
14
  * Author URI: https://shapedplugin.com/
15
  * License: GPL-2.0+
@@ -17,7 +17,7 @@
17
  * Text Domain: wp-carousel-free
18
  * Domain Path: /languages
19
  * WC requires at least: 4.0
20
- * WC tested up to: 5.2.2
21
  */
22
 
23
  // If this file is called directly, abort.
@@ -119,7 +119,7 @@ class SP_WP_Carousel_Free {
119
  */
120
  public function setup() {
121
  $this->plugin_name = 'wp-carousel-free';
122
- $this->version = '2.1.19';
123
  $this->define_constants();
124
  $this->includes();
125
  $this->load_dependencies();
9
  * Plugin Name: WordPress Carousel
10
  * Plugin URI: https://shapedplugin.com/plugin/wordpress-carousel-pro/?ref=1
11
  * Description: The Most Powerful and User-friendly WordPress Carousel Plugin. Create beautiful carousels in minutes using Images, Posts, WooCommerce Products etc.
12
+ * Version: 2.1.20
13
  * Author: ShapedPlugin
14
  * Author URI: https://shapedplugin.com/
15
  * License: GPL-2.0+
17
  * Text Domain: wp-carousel-free
18
  * Domain Path: /languages
19
  * WC requires at least: 4.0
20
+ * WC tested up to: 5.3.0
21
  */
22
 
23
  // If this file is called directly, abort.
119
  */
120
  public function setup() {
121
  $this->plugin_name = 'wp-carousel-free';
122
+ $this->version = '2.1.20';
123
  $this->define_constants();
124
  $this->includes();
125
  $this->load_dependencies();