Version Description
- PHP code cleaning
Download this release
Release Info
Developer | rubel_miah |
Plugin | Carousel, Slider, Gallery by WP Carousel – Image Carousel & Photo Gallery, Post Carousel & Post Grid, Product Carousel & Product Grid for WooCommerce |
Version | 1.4.1 |
Comparing to | |
See all releases |
Code changes from version 1.4 to 1.4.1
- inc/functions.php +7 -0
- inc/scripts.php +10 -0
- inc/shortcodes.php +130 -0
- plugin-main.php +228 -326
- readme.txt +5 -2
inc/functions.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* Including all files */
|
3 |
+
function sp_wordpress_carousel_free_script() {
|
4 |
+
wp_enqueue_script( 'owl-carousel-min-js', SP_WP_CAROUSEL_FREE_URL . 'inc/owl-carousel/owl.carousel.min.js', array( 'jquery' ), 1.0, true );
|
5 |
+
wp_enqueue_style( 'owl-carousel-css', SP_WP_CAROUSEL_FREE_URL . 'inc/owl-carousel/owl.carousel.css' );
|
6 |
+
wp_enqueue_style( 'owl-transitions-css', SP_WP_CAROUSEL_FREE_URL . 'inc/owl-carousel/owl.transitions.css' );
|
7 |
+
wp_enqueue_style( 'owl-theme-css', SP_WP_CAROUSEL_FREE_URL . 'inc/owl-carousel/owl.theme.css' );
|
8 |
+
wp_enqueue_style( 'wcf-fontello-css', SP_WP_CAROUSEL_FREE_URL . 'inc/fontello/css/fontello.css' );
|
9 |
+
}
|
10 |
+
add_action( 'wp_enqueue_scripts', 'sp_wordpress_carousel_free_script' );
|
inc/shortcodes.php
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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( 'post_gallery', '', $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 |
+
$html5 = current_theme_supports( 'html5', 'gallery' );
|
29 |
+
extract( shortcode_atts( array(
|
30 |
+
'id' => '',
|
31 |
+
'size' => 'thumbnail',
|
32 |
+
'include' => '',
|
33 |
+
'exclude' => '',
|
34 |
+
), $attr, 'gallery' ) );
|
35 |
+
|
36 |
+
$order = 'DESC';
|
37 |
+
$orderby = 'title';
|
38 |
+
|
39 |
+
$id = intval( $id );
|
40 |
+
if ( 'RAND' == $order ) {
|
41 |
+
$orderby = 'none';
|
42 |
+
}
|
43 |
+
|
44 |
+
if ( ! empty( $include ) ) {
|
45 |
+
$_attachments = get_posts( array( 'include' => $include,
|
46 |
+
'post_status' => 'inherit',
|
47 |
+
'post_type' => 'attachment',
|
48 |
+
'post_mime_type' => 'image',
|
49 |
+
'order' => $order,
|
50 |
+
'orderby' => $orderby
|
51 |
+
) );
|
52 |
+
|
53 |
+
$attachments = array();
|
54 |
+
foreach ( $_attachments as $key => $val ) {
|
55 |
+
$attachments[ $val->ID ] = $_attachments[ $key ];
|
56 |
+
}
|
57 |
+
} elseif ( ! empty( $exclude ) ) {
|
58 |
+
$attachments = get_children( array( 'post_parent' => $id,
|
59 |
+
'exclude' => $exclude,
|
60 |
+
'post_status' => 'inherit',
|
61 |
+
'post_type' => 'attachment',
|
62 |
+
'post_mime_type' => 'image',
|
63 |
+
'order' => $order,
|
64 |
+
'orderby' => $orderby
|
65 |
+
) );
|
66 |
+
} else {
|
67 |
+
|
68 |
+
}
|
69 |
+
|
70 |
+
if ( empty( $attachments ) ) {
|
71 |
+
return '';
|
72 |
+
}
|
73 |
+
|
74 |
+
if ( is_feed() ) {
|
75 |
+
$output = "\n";
|
76 |
+
foreach ( $attachments as $att_id => $attachment ) {
|
77 |
+
$output .= wp_get_attachment_link( $att_id, $size, true ) . "\n";
|
78 |
+
}
|
79 |
+
|
80 |
+
return $output;
|
81 |
+
}
|
82 |
+
|
83 |
+
|
84 |
+
$gallery_style = $gallery_div = '';
|
85 |
+
|
86 |
+
|
87 |
+
$size_class = sanitize_html_class( $size );
|
88 |
+
$gallery_div = "
|
89 |
+
|
90 |
+
<style type='text/css'>
|
91 |
+
div#wordpress-carousel-free-$id div.single_wcf_item img{box-shadow:0 0 0;border-radius:0;float:left;width:100%;height:auto}
|
92 |
+
</style>
|
93 |
+
|
94 |
+
<script type='text/javascript'>
|
95 |
+
jQuery(document).ready(function() {
|
96 |
+
jQuery('#wordpress-carousel-free-$id').owlCarousel({
|
97 |
+
navigation: true,
|
98 |
+
autoPlay: true,
|
99 |
+
navigationText: ['','']
|
100 |
+
});
|
101 |
+
});
|
102 |
+
</script>
|
103 |
+
|
104 |
+
<div id='wordpress-carousel-free-$id' class='owl-carousel wordpress-carousel-free-section'>";
|
105 |
+
|
106 |
+
$output = apply_filters( 'gallery_style', $gallery_style . $gallery_div );
|
107 |
+
|
108 |
+
$i = 0;
|
109 |
+
foreach ( $attachments as $id => $attachment ) {
|
110 |
+
|
111 |
+
$wcf_image_url = wp_get_attachment_image_src( $id, 'medium', false );
|
112 |
+
|
113 |
+
$wcf_image_title = $attachment->post_title;
|
114 |
+
|
115 |
+
|
116 |
+
$output .= "
|
117 |
+
<div class='single_wcf_item'>
|
118 |
+
<img src='$wcf_image_url[0]' alt='$wcf_image_title' />
|
119 |
+
</div>
|
120 |
+
";
|
121 |
+
|
122 |
+
}
|
123 |
+
|
124 |
+
$output .= "
|
125 |
+
</div>\n";
|
126 |
+
|
127 |
+
return $output;
|
128 |
+
}
|
129 |
+
|
130 |
+
add_shortcode( 'wcfgallery', 'wp_carousel_free_shortcode' );
|
plugin-main.php
CHANGED
@@ -5,366 +5,268 @@ Plugin URI: https://shapedplugin.com/plugin/wordpress-carousel-pro
|
|
5 |
Description: This plugin will enable carousel features in your WordPress site.
|
6 |
Author: ShapedPlugin
|
7 |
Author URI: http://shapedplugin.com
|
8 |
-
Version: 1.4
|
9 |
*/
|
10 |
|
11 |
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
14 |
|
|
|
|
|
|
|
|
|
15 |
|
16 |
-
/*
|
17 |
-
function
|
18 |
-
|
19 |
-
|
20 |
-
wp_enqueue_style('owl-transitions-css', SP_WP_FREE_CAROUSEL.'inc/owl-carousel/owl.transitions.css');
|
21 |
-
wp_enqueue_style('owl-theme-css', SP_WP_FREE_CAROUSEL.'inc/owl-carousel/owl.theme.css');
|
22 |
-
wp_enqueue_style('wcf-fontello-css', SP_WP_FREE_CAROUSEL.'inc/fontello/css/fontello.css');
|
23 |
-
}
|
24 |
-
add_action( 'wp_enqueue_scripts', 'sp_wordpress_carousel_free_script' );
|
25 |
-
|
26 |
|
27 |
-
|
28 |
-
function my_plugin_active_redirect( $plugin ) {
|
29 |
-
if( $plugin == plugin_basename( __FILE__ ) ) {
|
30 |
-
exit( wp_redirect( admin_url( 'options-general.php' ) ) );
|
31 |
-
}
|
32 |
}
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
// Registering shortcode
|
37 |
-
function wp_carousel_free_shortcode( $attr ) {
|
38 |
-
$post = get_post();
|
39 |
-
|
40 |
-
static $instance = 0;
|
41 |
-
$instance++;
|
42 |
-
|
43 |
-
if ( ! empty( $attr['ids'] ) ) {
|
44 |
-
if ( empty( $attr['orderby'] ) )
|
45 |
-
$attr['orderby'] = 'post__in';
|
46 |
-
$attr['include'] = $attr['ids'];
|
47 |
-
}
|
48 |
-
|
49 |
-
$output = apply_filters( 'post_gallery', '', $attr );
|
50 |
-
if ( $output != '' )
|
51 |
-
return $output;
|
52 |
-
|
53 |
-
if ( isset( $attr['orderby'] ) ) {
|
54 |
-
$attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );
|
55 |
-
if ( !$attr['orderby'] )
|
56 |
-
unset( $attr['orderby'] );
|
57 |
-
}
|
58 |
-
|
59 |
-
$html5 = current_theme_supports( 'html5', 'gallery' );
|
60 |
-
extract(shortcode_atts(array(
|
61 |
-
'id' => '',
|
62 |
-
'size' => 'thumbnail',
|
63 |
-
'include' => '',
|
64 |
-
'exclude' => '',
|
65 |
-
), $attr, 'gallery'));
|
66 |
-
|
67 |
-
$order = 'DESC';
|
68 |
-
$orderby = 'title';
|
69 |
-
|
70 |
-
$id = intval($id);
|
71 |
-
if ( 'RAND' == $order )
|
72 |
-
$orderby = 'none';
|
73 |
-
|
74 |
-
if ( !empty($include) ) {
|
75 |
-
$_attachments = get_posts( array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );
|
76 |
-
|
77 |
-
$attachments = array();
|
78 |
-
foreach ( $_attachments as $key => $val ) {
|
79 |
-
$attachments[$val->ID] = $_attachments[$key];
|
80 |
-
}
|
81 |
-
} elseif ( !empty($exclude) ) {
|
82 |
-
$attachments = get_children( array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );
|
83 |
-
} else {
|
84 |
-
|
85 |
-
}
|
86 |
-
|
87 |
-
if ( empty($attachments) )
|
88 |
-
return '';
|
89 |
-
|
90 |
-
if ( is_feed() ) {
|
91 |
-
$output = "\n";
|
92 |
-
foreach ( $attachments as $att_id => $attachment )
|
93 |
-
$output .= wp_get_attachment_link($att_id, $size, true) . "\n";
|
94 |
-
return $output;
|
95 |
-
}
|
96 |
-
|
97 |
-
|
98 |
-
$gallery_style = $gallery_div = '';
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
$size_class = sanitize_html_class( $size );
|
103 |
-
$gallery_div = "
|
104 |
-
|
105 |
-
<style type='text/css'>
|
106 |
-
div#wordpress-carousel-free-$id div.single_wcf_item img{box-shadow:0 0 0;border-radius:0;float:left;width:100%;height:auto}
|
107 |
-
</style>
|
108 |
-
|
109 |
-
<script type='text/javascript'>
|
110 |
-
jQuery(document).ready(function() {
|
111 |
-
jQuery('#wordpress-carousel-free-$id').owlCarousel({
|
112 |
-
navigation: true,
|
113 |
-
autoPlay: true,
|
114 |
-
navigationText: ['','']
|
115 |
-
});
|
116 |
-
});
|
117 |
-
</script>
|
118 |
-
|
119 |
-
<div id='wordpress-carousel-free-$id' class='owl-carousel wordpress-carousel-free-section'>";
|
120 |
-
|
121 |
-
$output = apply_filters( 'gallery_style', $gallery_style . $gallery_div );
|
122 |
-
|
123 |
-
$i = 0;
|
124 |
-
foreach ( $attachments as $id => $attachment ) {
|
125 |
-
|
126 |
-
$wcf_image_url = wp_get_attachment_image_src( $id, 'medium', false);
|
127 |
-
|
128 |
-
$wcf_image_title = $attachment->post_title;
|
129 |
-
|
130 |
-
|
131 |
-
$output .= "
|
132 |
-
<div class='single_wcf_item'>
|
133 |
-
<img src='$wcf_image_url[0]' alt='$wcf_image_title' />
|
134 |
-
</div>
|
135 |
-
";
|
136 |
-
|
137 |
|
|
|
|
|
|
|
|
|
138 |
}
|
139 |
-
|
140 |
-
$output .= "
|
141 |
-
</div>\n";
|
142 |
-
|
143 |
-
return $output;
|
144 |
}
|
|
|
145 |
|
146 |
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
function add_wcffree_options_framwrork()
|
153 |
-
{
|
154 |
-
add_options_page('WP Carousel Free Help', '', 'manage_options', 'wcf-settings','wcf_options_framwrork');
|
155 |
-
}
|
156 |
-
add_action('admin_menu', 'add_wcffree_options_framwrork');
|
157 |
-
|
158 |
-
add_action( 'admin_enqueue_scripts', 'scrollbar_ppm_color_pickr_function' );
|
159 |
-
function scrollbar_ppm_color_pickr_function( $hook_suffix ) {
|
160 |
-
// first check that $hook_suffix is appropriate for your admin page
|
161 |
-
wp_enqueue_style( 'wp-color-picker' );
|
162 |
-
wp_enqueue_script( 'my-script-handle', plugins_url('js/color-pickr.js', __FILE__ ), array( 'wp-color-picker' ), false, true );
|
163 |
}
|
|
|
164 |
|
165 |
// Default options values
|
166 |
$wcf_options = array(
|
167 |
-
'cursor_color'
|
168 |
-
'cursor_width'
|
169 |
-
'border_radius'
|
170 |
-
'cursor_border'
|
171 |
-
'scroll_speed'
|
172 |
'auto_hide_mode' => 'true'
|
173 |
);
|
174 |
|
175 |
if ( is_admin() ) : // Load only if we are viewing an admin page
|
176 |
|
177 |
-
function wcf_register_settings() {
|
178 |
-
|
179 |
-
|
180 |
-
}
|
181 |
-
|
182 |
-
add_action( 'admin_init', 'wcf_register_settings' );
|
183 |
|
184 |
|
185 |
// Store layouts views in array
|
186 |
-
$auto_hide_mode = array(
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
);
|
196 |
|
197 |
|
198 |
// Function to generate options page
|
199 |
-
function wcf_options_framwrork() {
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
<div class="wrap">
|
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 |
button-hero">Buy Premium Version Now. Only $29</a>
|
332 |
-
|
333 |
-
|
334 |
-
<br/><br/>
|
335 |
-
|
336 |
-
|
337 |
-
</div>
|
338 |
-
</div>
|
339 |
-
|
340 |
-
|
341 |
-
</div>
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
<?php
|
346 |
-
}
|
347 |
|
|
|
|
|
|
|
|
|
348 |
|
|
|
|
|
349 |
|
350 |
endif; // EndIf is_admin()
|
351 |
|
352 |
|
353 |
-
register_activation_hook(__FILE__, '
|
354 |
-
add_action('admin_init', '
|
355 |
|
356 |
-
function
|
357 |
-
|
358 |
}
|
359 |
|
360 |
-
function
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
}
|
369 |
-
|
370 |
-
?>
|
5 |
Description: This plugin will enable carousel features in your WordPress site.
|
6 |
Author: ShapedPlugin
|
7 |
Author URI: http://shapedplugin.com
|
8 |
+
Version: 1.4.1
|
9 |
*/
|
10 |
|
11 |
|
12 |
+
/**
|
13 |
+
* Directory Constant
|
14 |
+
*/
|
15 |
+
define( 'SP_WP_CAROUSEL_FREE_URL', plugins_url( '/' ) . plugin_basename( dirname( __FILE__ ) ) . '/' );
|
16 |
+
define( 'SP_WP_CAROUSEL_FREE_DIR', plugin_dir_path( __FILE__ ) );
|
17 |
|
18 |
+
/**
|
19 |
+
* Include files
|
20 |
+
*/
|
21 |
+
require_once( SP_WP_CAROUSEL_FREE_DIR . 'inc/functions.php' );
|
22 |
|
23 |
+
/* Plugin Action Links */
|
24 |
+
function sp_wp_carousel_free_action_links( $links ) {
|
25 |
+
$links[] = '<a target="_blank" href="https://shapedplugin.com/plugin/wordpress-carousel-pro" style="color: red; font-weight: 600;">Go
|
26 |
+
Pro!</a>';
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
+
return $links;
|
|
|
|
|
|
|
|
|
29 |
}
|
30 |
+
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'sp_wp_carousel_free_action_links' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
+
// Redirect after active
|
33 |
+
function sp_wp_carousel_free_active_redirect( $plugin ) {
|
34 |
+
if ( $plugin == plugin_basename( __FILE__ ) ) {
|
35 |
+
exit( wp_redirect( admin_url( 'options-general.php' ) ) );
|
36 |
}
|
|
|
|
|
|
|
|
|
|
|
37 |
}
|
38 |
+
add_action( 'activated_plugin', 'sp_wp_carousel_free_active_redirect' );
|
39 |
|
40 |
|
41 |
+
function add_wcffree_options_framwrork() {
|
42 |
+
add_options_page( 'WP Carousel Free Help', '', 'manage_options', 'wcf-settings', 'wcf_options_framwrork' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
}
|
44 |
+
add_action( 'admin_menu', 'add_wcffree_options_framwrork' );
|
45 |
|
46 |
// Default options values
|
47 |
$wcf_options = array(
|
48 |
+
'cursor_color' => '#666',
|
49 |
+
'cursor_width' => '10px',
|
50 |
+
'border_radius' => '0px',
|
51 |
+
'cursor_border' => '0px solid #000',
|
52 |
+
'scroll_speed' => '60',
|
53 |
'auto_hide_mode' => 'true'
|
54 |
);
|
55 |
|
56 |
if ( is_admin() ) : // Load only if we are viewing an admin page
|
57 |
|
58 |
+
function wcf_register_settings() {
|
59 |
+
// Register settings and call sanitation functions
|
60 |
+
register_setting( 'wcf_p_options', 'wcf_options', 'wcf_validate_options' );
|
61 |
+
}
|
62 |
+
add_action( 'admin_init', 'wcf_register_settings' );
|
|
|
63 |
|
64 |
|
65 |
// Store layouts views in array
|
66 |
+
$auto_hide_mode = array(
|
67 |
+
'auto_hide_yes' => array(
|
68 |
+
'value' => 'true',
|
69 |
+
'label' => 'Activate auto hide'
|
70 |
+
),
|
71 |
+
'auto_hide_no' => array(
|
72 |
+
'value' => 'false',
|
73 |
+
'label' => 'Deactivate auto hide'
|
74 |
+
),
|
75 |
+
);
|
76 |
|
77 |
|
78 |
// Function to generate options page
|
79 |
+
function wcf_options_framwrork() {
|
80 |
+
global $wcf_options, $auto_hide_mode;
|
81 |
+
|
82 |
+
if ( ! isset( $_REQUEST['updated'] ) ) {
|
83 |
+
$_REQUEST['updated'] = false;
|
84 |
+
} // This checks whether the form has just been submitted. ?>
|
85 |
+
|
86 |
+
|
87 |
+
<div class="wrap">
|
88 |
+
<style type="text/css">
|
89 |
+
.welcome-panel-column p {
|
90 |
+
padding-right: 20px
|
91 |
+
}
|
92 |
+
|
93 |
+
.installing_message h2 {
|
94 |
+
background: none repeat scroll 0 0 green;
|
95 |
+
color: #fff;
|
96 |
+
line-height: 30px;
|
97 |
+
padding: 20px;
|
98 |
+
text-align: center;
|
99 |
+
}
|
100 |
+
|
101 |
+
.wcp-purchase-btn-area {
|
102 |
+
clear: both;
|
103 |
+
text-align: center;
|
104 |
+
padding-top: 60px;
|
105 |
+
padding-bottom: 30px;
|
106 |
+
}
|
107 |
+
|
108 |
+
.welcome-panel-column img {
|
109 |
+
width: 90%;
|
110 |
+
}
|
111 |
+
</style>
|
112 |
+
<div class="installing_message">
|
113 |
+
<h2>Thank you for installing WordPress Carousel Free</h2>
|
114 |
+
</div>
|
115 |
+
|
116 |
+
|
117 |
+
<div class="welcome-panel" id="welcome-panel">
|
118 |
+
|
119 |
+
<div class="welcome-panel-content">
|
120 |
+
<h2>Want some cool features of this plugin?</h2>
|
121 |
+
<p class="about-description">We've added 100+ extra features in our premium version of this plugin.
|
122 |
+
Let see some amazing features.</p>
|
123 |
+
<br>
|
124 |
+
<div class="welcome-panel-column-container">
|
125 |
+
<div class="welcome-panel-column">
|
126 |
+
<h3>Link to carousel items</h3>
|
127 |
+
<p>You can link to each carousel item easily. You can add link to each carousel in media
|
128 |
+
manager. Just add your link there, your carousel items will lined to that URL.</p>
|
129 |
+
<a href="https://shapedplugin.com/demo/wordpress-carousel-pro/#logo-caruosel"
|
130 |
+
target="_blank" class="button button-primary">See Link to Carousel Items Demo</a>
|
131 |
+
</div>
|
132 |
+
|
133 |
+
<div class="welcome-panel-column">
|
134 |
+
<h3>Items customization</h3>
|
135 |
+
<p>You can customize how many carousel item will show in your carousel. You just have to add
|
136 |
+
an attribute in carousel shortcode wherever you want.</p>
|
137 |
+
<a href="https://shapedplugin.com/demo/wordpress-carousel-pro/#items-customization"
|
138 |
+
target="_blank" class="button button-primary">See Item Customization Demo</a>
|
139 |
+
</div>
|
140 |
+
|
141 |
+
<div class="welcome-panel-column welcome-panel-last">
|
142 |
+
<h3>One page Carousel Slider</h3>
|
143 |
+
<p>You are able to build one item carousel slider. Its like image slider. You can add slider
|
144 |
+
title & description too. You can change slider colors with your dream color!</p>
|
145 |
+
<a href="https://shapedplugin.com/demo/wordpress-carousel-pro/#one-pages-arousel-slider"
|
146 |
+
target="_blank" class="button button-primary">See One page Carousel Slider Demo</a>
|
147 |
+
</div>
|
148 |
+
</div>
|
149 |
+
|
150 |
+
|
151 |
+
<div class="welcome-panel-column-container">
|
152 |
+
|
153 |
+
<div class="welcome-panel-column">
|
154 |
+
<h3>Slider with Different Effects</h3>
|
155 |
+
<p>Different types of slider effect can make your slider unique & stunning to look. You are
|
156 |
+
able to set your desired effect easily using attribute in shortcodes.</p>
|
157 |
+
<a href="https://shapedplugin.com/demo/wordpress-carousel-pro/#one-pages-arousel-slider"
|
158 |
+
target="_blank" class="button button-primary">See Slider with Different Effects Demo</a>
|
159 |
+
</div>
|
160 |
+
|
161 |
+
<div class="welcome-panel-column">
|
162 |
+
<h3>Unlimited Colors</h3>
|
163 |
+
<p>Premium version of this plugin supports unlimited colors! You can add any color that
|
164 |
+
match your current theme. You can use color name or color HEX code.</p>
|
165 |
+
<a href="https://shapedplugin.com/demo/wordpress-carousel-pro/#logo-caruosel"
|
166 |
+
target="_blank" class="button button-primary">See Unlimited Colors Demo</a>
|
167 |
+
</div>
|
168 |
+
|
169 |
+
<div class="welcome-panel-column welcome-panel-last">
|
170 |
+
<h3>Post Carousel Slider with Excerpt</h3>
|
171 |
+
<p>You can create post excerpt carousel slider as well. This will show featured image, some
|
172 |
+
amount of post content & a readmore button. This is cool for large type of post! </p>
|
173 |
+
<a href="https://shapedplugin.com/demo/wordpress-carousel-pro/#post-carousel"
|
174 |
+
target="_blank" class="button button-primary">See Post Carousel Slider with Excerpt
|
175 |
+
Demo</a>
|
176 |
+
</div>
|
177 |
+
|
178 |
+
</div>
|
179 |
+
|
180 |
+
<div class="welcome-panel-column-container">
|
181 |
+
|
182 |
+
<div class="welcome-panel-column">
|
183 |
+
<h3>Post slider without Readmore</h3>
|
184 |
+
<p>You can also create post carousel slider without readmore as well. This will show
|
185 |
+
featured image, text of your post without a readmore button. This is cool for small
|
186 |
+
post!</p>
|
187 |
+
<a href="https://shapedplugin.com/demo/wordpress-carousel-pro/#" target="_blank"
|
188 |
+
class="button button-primary">See Post slider without Readmore Demo</a>
|
189 |
+
</div>
|
190 |
+
|
191 |
+
<div class="welcome-panel-column">
|
192 |
+
<h3>Custom Post Excerpt Slider</h3>
|
193 |
+
<p>You can build excerpt slider form different page or custom post too. Just you have to
|
194 |
+
define post type in carousel shortcode. Its super easy to use!</p>
|
195 |
+
<a href="https://shapedplugin.com/demo/wordpress-carousel-pro/#Woocommerce" target="_blank"
|
196 |
+
class="button button-primary">See Custom Post Excerpt Slider Demo</a>
|
197 |
+
</div>
|
198 |
+
|
199 |
+
<div class="welcome-panel-column welcome-panel-last">
|
200 |
+
<h3>Testimonial Slider with different Styles</h3>
|
201 |
+
<p>There are many styles of clients testimonials. You can show your client's testimonials in
|
202 |
+
your site as well. Hence you need define attribute in carousel shortcode.</p>
|
203 |
+
<a href="https://shapedplugin.com/demo/wordpress-carousel-pro/#testimonial" target="_blank"
|
204 |
+
class="button button-primary">See Testimonial Slider Demo</a>
|
205 |
+
</div>
|
206 |
+
|
207 |
+
</div>
|
208 |
+
|
209 |
+
<div class="welcome-panel-column-container">
|
210 |
+
|
211 |
+
<div class="welcome-panel-column">
|
212 |
+
<h3>Carousel from WooCommerce Product</h3>
|
213 |
+
<p>Using this premium version plugin, you can add woocommerce product slider too. This will
|
214 |
+
show product image, product description & read more button.</p>
|
215 |
+
<a href="https://shapedplugin.com/demo/wordpress-carousel-pro/#Woocommerce" target="_blank"
|
216 |
+
class="button button-primary">See Carousel from WooCommerce Product Demo</a>
|
217 |
+
</div>
|
218 |
+
|
219 |
+
<div class="welcome-panel-column">
|
220 |
+
<h3>Carousel from WooCommerce Product Category</h3>
|
221 |
+
<p>This is a fantastic features for premium version, you can show woocommerce product slider
|
222 |
+
from category with product image, t description & read more button.</p>
|
223 |
+
<a href="https://shapedplugin.com/demo/wordpress-carousel-pro/#Woocommerce" target="_blank"
|
224 |
+
class="button button-primary">See Carousel WooCom Product Category Demo</a>
|
225 |
+
</div>
|
226 |
+
|
227 |
+
<div class="welcome-panel-column welcome-panel-last">
|
228 |
+
<h3>Carousel with Lightbox</h3>
|
229 |
+
<p>We've added lightbox features in premium version of this plugin. You only have to turn on
|
230 |
+
lightbox via shortcode. Its fully responsive and super easy to use!</p>
|
231 |
+
<a href="https://shapedplugin.com/demo/wordpress-carousel-pro/#lightbox" target="_blank"
|
232 |
+
class="button button-primary">See Carousel with Lightbox Demo</a>
|
233 |
+
</div>
|
234 |
+
|
235 |
+
</div>
|
236 |
+
<br/><br/><br>
|
237 |
+
|
238 |
+
<div class="wcp-purchase-btn-area">
|
239 |
+
<h3>Cool! you are ready to enable those features in only $29. </h3>
|
240 |
+
<p class="about-description">Watch demo before purchase. I know you must like the demos. Thanks
|
241 |
+
for reading features. Good luck with creating carousels in your WordPress site.</p>
|
242 |
+
|
243 |
+
<a href="https://shapedplugin.com/plugin/wordpress-carousel-pro" class="button button-primary
|
244 |
button-hero">Buy Premium Version Now. Only $29</a>
|
245 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
|
247 |
+
<br/><br/>
|
248 |
+
</div>
|
249 |
+
</div>
|
250 |
+
</div>
|
251 |
|
252 |
+
<?php
|
253 |
+
}
|
254 |
|
255 |
endif; // EndIf is_admin()
|
256 |
|
257 |
|
258 |
+
register_activation_hook( __FILE__, 'sp_wp_carousel_free_plugin_activate' );
|
259 |
+
add_action( 'admin_init', 'sp_wp_carousel_free_plugin_redirect' );
|
260 |
|
261 |
+
function sp_wp_carousel_free_plugin_activate() {
|
262 |
+
add_option( 'sp_wp_carousel_free_do_activation_redirect', true );
|
263 |
}
|
264 |
|
265 |
+
function sp_wp_carousel_free_plugin_redirect() {
|
266 |
+
if ( get_option( 'sp_wp_carousel_free_do_activation_redirect', false ) ) {
|
267 |
+
delete_option( 'sp_wp_carousel_free_do_activation_redirect' );
|
268 |
+
if ( ! isset( $_GET['activate-multi'] ) ) {
|
269 |
+
wp_redirect( "options-general.php?page=wcf-settings" );
|
270 |
+
}
|
271 |
+
}
|
272 |
+
}
|
|
|
|
|
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: rubel_miah, shapedplugin
|
3 |
Donate link: http://shapedplugin.com/donate
|
4 |
Tags: carousel, slider, carousel plugin, testimonial, best testimonial, client testimonials plugin, wordpress testimonial, smooth testimonial, woocommerce slider, woocommerce product slider, woocommerce product carousel, lightbox, nice lightbox, carousel slider, logo carousel, carousel shortcode, client carousel, easy carousel, best logo carousel, best carousel, easy logo carousel, best client logo carousel, best logo slider, image carousel, image slider, post carousel, post slider, logo carousel, Nice carousel, responsive carousel, touch carousel, wordpress carousel, top logo slider, shortcode slider, shortcode carousel, free logo slider carousel, animations, autoplay, ecommerce, product, product carousel, product category, product slider, product slider carousel, product slider categories
|
5 |
-
Requires at least: 4.
|
6 |
Tested up to: 4.7.3
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -96,7 +96,7 @@ Want more features? This plugin has a <a href="http://shapedplugin.com/plugin/wo
|
|
96 |
</ul>
|
97 |
|
98 |
|
99 |
-
The most advanced WordPress Carousel PRO Plugin with Endless Possibilities!
|
100 |
The Perfect way to display Carousel of your Logos, Post, Image, Testimonial, WooCommerce Products or any custom post types and many more.
|
101 |
|
102 |
|
@@ -128,6 +128,9 @@ Now save your page, then visit the newly created page & see something awesome. :
|
|
128 |
|
129 |
== Changelog ==
|
130 |
|
|
|
|
|
|
|
131 |
= 1.4 =
|
132 |
* Fixed navigation css issue
|
133 |
|
2 |
Contributors: rubel_miah, shapedplugin
|
3 |
Donate link: http://shapedplugin.com/donate
|
4 |
Tags: carousel, slider, carousel plugin, testimonial, best testimonial, client testimonials plugin, wordpress testimonial, smooth testimonial, woocommerce slider, woocommerce product slider, woocommerce product carousel, lightbox, nice lightbox, carousel slider, logo carousel, carousel shortcode, client carousel, easy carousel, best logo carousel, best carousel, easy logo carousel, best client logo carousel, best logo slider, image carousel, image slider, post carousel, post slider, logo carousel, Nice carousel, responsive carousel, touch carousel, wordpress carousel, top logo slider, shortcode slider, shortcode carousel, free logo slider carousel, animations, autoplay, ecommerce, product, product carousel, product category, product slider, product slider carousel, product slider categories
|
5 |
+
Requires at least: 4.3
|
6 |
Tested up to: 4.7.3
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
96 |
</ul>
|
97 |
|
98 |
|
99 |
+
The most advanced WordPress Carousel PRO Plugin with Endless Possibilities!
|
100 |
The Perfect way to display Carousel of your Logos, Post, Image, Testimonial, WooCommerce Products or any custom post types and many more.
|
101 |
|
102 |
|
128 |
|
129 |
== Changelog ==
|
130 |
|
131 |
+
= 1.4.1 =
|
132 |
+
* PHP code cleaning
|
133 |
+
|
134 |
= 1.4 =
|
135 |
* Fixed navigation css issue
|
136 |
|