Version Description
- Added responsiveness option to choose between the new responsiveness mode and the pre-1.0 behaviour
- Fixed slider multi-swipe issue on mobile devices
- Restored paragraph support in slider captions (and added the necessary styling)
- Added info message when slider button is used with Text editor
- Minified custom styling added to the footer
- Slightly improved accessibility
Download this release
Release Info
Developer | Cryout Creations |
Plugin | Serious Slider |
Version | 1.0.4 |
Comparing to | |
See all releases |
Code changes from version 1.0.3 to 1.0.4
- cryout-serious-slider.php +22 -21
- inc/shortcodes.php +95 -67
- inc/taxmeta.php +9 -1
- readme.txt +12 -4
- resources/backend.css +19 -0
- resources/backend.js +13 -0
- resources/slider.js +65 -2
- resources/style.css +9 -1
cryout-serious-slider.php
CHANGED
@@ -1,14 +1,13 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
License URI: http://www.gnu.org/licenses/gpl.html
|
12 |
*/
|
13 |
|
14 |
// Exit if accessed directly
|
@@ -16,15 +15,15 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
16 |
|
17 |
class Cryout_Serious_Slider {
|
18 |
|
19 |
-
public $version = "1.0.
|
20 |
public $options = array();
|
21 |
public $shortcode_tag = 'serious-slider';
|
22 |
public $mce_tag = 'serious_slider';
|
23 |
-
|
24 |
public $slug = 'cryout-serious-slider';
|
25 |
public $posttype = 'cryout_serious_slide'; // 20 chars!
|
26 |
public $taxonomy = 'cryout_serious_slider_category';
|
27 |
-
|
28 |
private $butts = 2;
|
29 |
private $title = '';
|
30 |
private $thepage = '';
|
@@ -36,8 +35,9 @@ class Cryout_Serious_Slider {
|
|
36 |
'cryout_serious_slider_sizing' => 0, // 1 = force slider size
|
37 |
'cryout_serious_slider_width' => '1920', // px
|
38 |
'cryout_serious_slider_height' => '800', // px
|
|
|
39 |
|
40 |
-
'cryout_serious_slider_theme' => 'light', // light, dark, square,
|
41 |
'cryout_serious_slider_overlay' => 1, // 1 = autohide, 2 = visible
|
42 |
'cryout_serious_slider_textsize' => '1.0', // em
|
43 |
'cryout_serious_slider_align' => 'center', // left, center, right, justify
|
@@ -71,9 +71,9 @@ class Cryout_Serious_Slider {
|
|
71 |
// cpt and taxonomy
|
72 |
add_action( 'init', array( $this, 'register_post_types' ) );
|
73 |
add_action( 'setup_theme', array( $this, 'register_taxonomies' ) );
|
74 |
-
|
75 |
-
// disable wp auto-p on cpt
|
76 |
-
add_filter( 'the_post', array( $this, 'autop_control' ) );
|
77 |
|
78 |
// create slides from media images
|
79 |
add_action( 'created_term', array( $this, 'generate_slider' ), 10, 3 );
|
@@ -140,6 +140,7 @@ class Cryout_Serious_Slider {
|
|
140 |
add_filter( 'manage_edit-'.$this->posttype.'_columns', array($this, 'columns_edit' ) );
|
141 |
add_action( 'manage_'.$this->posttype.'_posts_custom_column', array($this, 'columns_content'), 10, 2 );
|
142 |
add_filter( 'manage_edit-'.$this->posttype.'_sortable_columns', array($this, 'order_column_register_sortable') );
|
|
|
143 |
// taxonomy list columns customizations
|
144 |
add_filter( 'manage_edit-'.$this->taxonomy.'_columns', array($this, 'columns_edit_taxonomy' ) );
|
145 |
add_action( 'manage_'.$this->taxonomy.'_custom_column', array($this, 'custom_content_taxonomy' ), 10, 3);
|
@@ -405,7 +406,7 @@ class Cryout_Serious_Slider {
|
|
405 |
die();
|
406 |
} // ajax_delete_image()
|
407 |
|
408 |
-
/* removes autop filtering from the slider's cpt */
|
409 |
function autop_control( $post ) {
|
410 |
if( $this->posttype === $post->post_type ) {
|
411 |
remove_filter( 'the_content', 'wpautop' );
|
@@ -774,7 +775,7 @@ class Cryout_Serious_Slider {
|
|
774 |
if ( in_array( $pagenow, array( 'post.php', 'page.php', 'post-new.php', 'post-edit.php' ) ) && ( $this->posttype != $post_type ) ) {
|
775 |
$context .= '<a href="#" class="button media-serious-slider-button" title="' .
|
776 |
__( "Insert Serious Slider into post", "cryout-serious-slider" ) .
|
777 |
-
'"
|
778 |
__( 'Add Slider', 'cryout-serious-slider' ) . '</a>';
|
779 |
}
|
780 |
|
@@ -867,4 +868,4 @@ class Cryout_Serious_Slider {
|
|
867 |
/* * * * get things going * * * */
|
868 |
$cryout_serious_slider = new Cryout_Serious_Slider;
|
869 |
|
870 |
-
// EOF
|
1 |
+
<?php /*
|
2 |
+
Plugin Name: Cryout Serious Slider
|
3 |
+
Plugin URI: http://www.cryoutcreations.eu/serious-slider
|
4 |
+
Description: A highly efficient SEO friendly fully translatable accessibility ready free image slider for WordPress. Seriously!
|
5 |
+
Version: 1.0.4
|
6 |
+
Author: Cryout Creations
|
7 |
+
Author URI: http://www.cryoutcreations.eu
|
8 |
+
Text Domain: cryout-serious-slider
|
9 |
+
License: GPLv3
|
10 |
+
License URI: http://www.gnu.org/licenses/gpl.html
|
|
|
11 |
*/
|
12 |
|
13 |
// Exit if accessed directly
|
15 |
|
16 |
class Cryout_Serious_Slider {
|
17 |
|
18 |
+
public $version = "1.0.4";
|
19 |
public $options = array();
|
20 |
public $shortcode_tag = 'serious-slider';
|
21 |
public $mce_tag = 'serious_slider';
|
22 |
+
|
23 |
public $slug = 'cryout-serious-slider';
|
24 |
public $posttype = 'cryout_serious_slide'; // 20 chars!
|
25 |
public $taxonomy = 'cryout_serious_slider_category';
|
26 |
+
|
27 |
private $butts = 2;
|
28 |
private $title = '';
|
29 |
private $thepage = '';
|
35 |
'cryout_serious_slider_sizing' => 0, // 1 = force slider size
|
36 |
'cryout_serious_slider_width' => '1920', // px
|
37 |
'cryout_serious_slider_height' => '800', // px
|
38 |
+
'cryout_serious_slider_responsiveness' => 'maintain', // 'legacy', 'maintain'
|
39 |
|
40 |
+
'cryout_serious_slider_theme' => 'light', // light, light2, dark, square, tall, captionleft, captionbottom, theme
|
41 |
'cryout_serious_slider_overlay' => 1, // 1 = autohide, 2 = visible
|
42 |
'cryout_serious_slider_textsize' => '1.0', // em
|
43 |
'cryout_serious_slider_align' => 'center', // left, center, right, justify
|
71 |
// cpt and taxonomy
|
72 |
add_action( 'init', array( $this, 'register_post_types' ) );
|
73 |
add_action( 'setup_theme', array( $this, 'register_taxonomies' ) );
|
74 |
+
|
75 |
+
// disable wp auto-p on cpt - turned off in 1.0.4
|
76 |
+
// add_filter( 'the_post', array( $this, 'autop_control' ) );
|
77 |
|
78 |
// create slides from media images
|
79 |
add_action( 'created_term', array( $this, 'generate_slider' ), 10, 3 );
|
140 |
add_filter( 'manage_edit-'.$this->posttype.'_columns', array($this, 'columns_edit' ) );
|
141 |
add_action( 'manage_'.$this->posttype.'_posts_custom_column', array($this, 'columns_content'), 10, 2 );
|
142 |
add_filter( 'manage_edit-'.$this->posttype.'_sortable_columns', array($this, 'order_column_register_sortable') );
|
143 |
+
|
144 |
// taxonomy list columns customizations
|
145 |
add_filter( 'manage_edit-'.$this->taxonomy.'_columns', array($this, 'columns_edit_taxonomy' ) );
|
146 |
add_action( 'manage_'.$this->taxonomy.'_custom_column', array($this, 'custom_content_taxonomy' ), 10, 3);
|
406 |
die();
|
407 |
} // ajax_delete_image()
|
408 |
|
409 |
+
/* removes autop filtering from the slider's cpt - disabled in 1.0.4 */
|
410 |
function autop_control( $post ) {
|
411 |
if( $this->posttype === $post->post_type ) {
|
412 |
remove_filter( 'the_content', 'wpautop' );
|
775 |
if ( in_array( $pagenow, array( 'post.php', 'page.php', 'post-new.php', 'post-edit.php' ) ) && ( $this->posttype != $post_type ) ) {
|
776 |
$context .= '<a href="#" class="button media-serious-slider-button" title="' .
|
777 |
__( "Insert Serious Slider into post", "cryout-serious-slider" ) .
|
778 |
+
'"><span class="wp-media-buttons-icon" style="background: url(\'' . $this->plugin_url . 'resources/images/serious-slider-editor-icon.png\'); background-repeat: no-repeat; background-position: center 1px;"></span> ' .
|
779 |
__( 'Add Slider', 'cryout-serious-slider' ) . '</a>';
|
780 |
}
|
781 |
|
868 |
/* * * * get things going * * * */
|
869 |
$cryout_serious_slider = new Cryout_Serious_Slider;
|
870 |
|
871 |
+
// EOF
|
inc/shortcodes.php
CHANGED
@@ -30,12 +30,12 @@ class Cryout_Serious_Slider_Shortcode {
|
|
30 |
|
31 |
ob_start();
|
32 |
?><style type="text/css">
|
33 |
-
|
34 |
<?php echo implode("\n", $this->custom_style); ?>
|
35 |
</style><?php
|
36 |
$custom_style = ob_get_clean();
|
37 |
|
38 |
-
echo $custom_style;
|
39 |
} // shortcode_slyle()
|
40 |
|
41 |
function shortcode_script() {
|
@@ -79,6 +79,7 @@ class Cryout_Serious_Slider_Shortcode {
|
|
79 |
$slider_classes = array();
|
80 |
$slider_classes[] = 'seriousslider-overlay' . $overlay;
|
81 |
$slider_classes[] = 'seriousslider-' . $theme;
|
|
|
82 |
$slider_classes[] = 'seriousslider-' . $animation;
|
83 |
$slider_classes[] = 'seriousslider-sizing' . $sizing;
|
84 |
$slider_classes[] = 'seriousslider-align' . $align;
|
@@ -154,84 +155,111 @@ class Cryout_Serious_Slider_Shortcode {
|
|
154 |
}
|
155 |
|
156 |
/* Buttons */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
}
|
163 |
-
|
164 |
-
.seriousslider-light .seriousslider-caption-buttons a:hover:nth-child(2n+1) {
|
165 |
-
background-color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
|
166 |
-
border-color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
|
167 |
-
}
|
168 |
-
|
169 |
-
/* Dark */
|
170 |
-
.seriousslider-dark .seriousslider-caption-buttons a:nth-child(2n) {
|
171 |
-
color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
|
172 |
-
}
|
173 |
-
|
174 |
-
.seriousslider-dark .seriousslider-caption-buttons a:hover:nth-child(2n+1) {
|
175 |
-
border-color: #FFF;
|
176 |
-
}
|
177 |
-
|
178 |
-
.seriousslider-dark .seriousslider-caption-buttons a:hover:nth-child(2n) {
|
179 |
-
border-color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
|
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 |
-
<?php
|
227 |
$this->custom_style[] = ob_get_clean();
|
228 |
add_action( 'wp_footer', array($this, 'shortcode_style') );
|
229 |
ob_start() ?>
|
|
|
|
|
|
|
|
|
230 |
jQuery('#serious-slider-<?php echo $cid ?>').carousel({
|
231 |
interval: <?php echo $delay ?>,
|
232 |
pause: '<?php echo $hover ?>',
|
233 |
stransition: <?php echo $transition ?>
|
234 |
-
})
|
|
|
|
|
|
|
235 |
<?php
|
236 |
$this->custom_script[] = ob_get_clean();
|
237 |
add_action( 'wp_footer', array($this, 'shortcode_script') );
|
@@ -272,7 +300,7 @@ class Cryout_Serious_Slider_Shortcode {
|
|
272 |
|
273 |
?>
|
274 |
|
275 |
-
<div class="item slide-<?php echo $counter ?> <?php if ($counter==1) echo 'active' ?>">
|
276 |
<?php if (!empty($image_data[0])): ?>
|
277 |
<a <?php echo $meta_link; ?> <?php echo $meta_target; ?>>
|
278 |
<img class="item-image" src="<?php echo $image_data[0] ?>" alt="<?php the_title_attribute(); ?>" <?php echo $sizes ?>>
|
@@ -282,7 +310,7 @@ class Cryout_Serious_Slider_Shortcode {
|
|
282 |
<div class="seriousslider-caption">
|
283 |
<div class="seriousslider-caption-inside">
|
284 |
<?php if (!empty($slide_title) && !$hidetitle) { ?><h3 class="seriousslider-caption-title"><span><?php the_title(); ?></span></h3><?php } ?>
|
285 |
-
<?php if (!empty($slide_text)) { ?><div class="seriousslider-caption-text"
|
286 |
<div class="seriousslider-caption-buttons">
|
287 |
<?php for ( $i=1; $i<=$this->butts; $i++ ) { ?>
|
288 |
<?php if ( !empty(${'meta_button'.$i}) ) { ?>
|
@@ -311,14 +339,14 @@ class Cryout_Serious_Slider_Shortcode {
|
|
311 |
<?php } ?>
|
312 |
</ol>
|
313 |
</div>
|
314 |
-
|
315 |
<button class="left seriousslider-control" data-target="#serious-slider-<?php echo $cid ?>" role="button" data-slide="prev">
|
316 |
<span class="sicon-prev control-arrow" aria-hidden="true"></span>
|
317 |
-
<span class="sr-only"><?php _e('Previous','cryout-serious-slider') ?></span>
|
318 |
</button>
|
319 |
<button class="right seriousslider-control" data-target="#serious-slider-<?php echo $cid; ?>" role="button" data-slide="next">
|
320 |
<span class="sicon-next control-arrow" aria-hidden="true"></span>
|
321 |
-
<span class="sr-only"><?php _e('Next','cryout-serious-slider') ?></span>
|
322 |
</button>
|
323 |
</div>
|
324 |
<?php
|
30 |
|
31 |
ob_start();
|
32 |
?><style type="text/css">
|
33 |
+
/* cryout serious slider styles */
|
34 |
<?php echo implode("\n", $this->custom_style); ?>
|
35 |
</style><?php
|
36 |
$custom_style = ob_get_clean();
|
37 |
|
38 |
+
echo preg_replace( '/([\n\s])+/', ' ', $custom_style );
|
39 |
} // shortcode_slyle()
|
40 |
|
41 |
function shortcode_script() {
|
79 |
$slider_classes = array();
|
80 |
$slider_classes[] = 'seriousslider-overlay' . $overlay;
|
81 |
$slider_classes[] = 'seriousslider-' . $theme;
|
82 |
+
$slider_classes[] = 'seriousslider-responsive-' . $responsiveness;
|
83 |
$slider_classes[] = 'seriousslider-' . $animation;
|
84 |
$slider_classes[] = 'seriousslider-sizing' . $sizing;
|
85 |
$slider_classes[] = 'seriousslider-align' . $align;
|
155 |
}
|
156 |
|
157 |
/* Buttons */
|
158 |
+
|
159 |
+
<?php switch ($theme) {
|
160 |
+
case 'light': ?>
|
161 |
+
|
162 |
+
/* Light */
|
163 |
+
.seriousslider-light .seriousslider-caption-buttons a:nth-child(2n+1),
|
164 |
+
.seriousslider-light .seriousslider-caption-buttons a:hover:nth-child(2n) {
|
165 |
+
color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
|
166 |
+
}
|
167 |
|
168 |
+
.seriousslider-light .seriousslider-caption-buttons a:hover:nth-child(2n+1) {
|
169 |
+
background-color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
|
170 |
+
border-color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
|
171 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
|
173 |
+
<?php break;
|
174 |
+
case 'dark': ?>
|
175 |
+
|
176 |
+
/* Dark */
|
177 |
+
.seriousslider-dark .seriousslider-caption-buttons a:nth-child(2n) {
|
178 |
+
color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
|
179 |
+
}
|
180 |
|
181 |
+
.seriousslider-dark .seriousslider-caption-buttons a:hover:nth-child(2n+1) {
|
182 |
+
border-color: #FFF;
|
183 |
+
}
|
|
|
184 |
|
185 |
+
.seriousslider-dark .seriousslider-caption-buttons a:hover:nth-child(2n) {
|
186 |
+
border-color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
|
187 |
+
}
|
|
|
188 |
|
189 |
+
.seriousslider-dark .seriousslider-caption-buttons a:nth-child(2n+1) {
|
190 |
+
background-color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
|
191 |
+
border-color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
|
192 |
+
}
|
193 |
+
|
194 |
+
<?php break;
|
195 |
+
case 'square': ?>
|
196 |
+
|
197 |
+
/* Square */
|
198 |
+
.seriousslider-square .seriousslider-caption-buttons a:nth-child(2n+1) {
|
199 |
+
background-color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
|
200 |
+
}
|
201 |
|
202 |
+
.seriousslider-square .seriousslider-caption-buttons a:nth-child(2n) {
|
203 |
+
background: #fff;
|
204 |
+
color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
|
205 |
+
}
|
206 |
|
207 |
+
.seriousslider-square .seriousslider-caption-buttons a:hover:nth-child(2n+1) {
|
208 |
+
color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
|
209 |
+
background: #FFF;
|
210 |
+
}
|
211 |
|
212 |
+
.seriousslider-square .seriousslider-caption-buttons a:hover:nth-child(2n) {
|
213 |
+
color: #fff;
|
214 |
+
background-color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
|
215 |
+
}
|
216 |
+
|
217 |
+
<?php break;
|
218 |
+
case 'tall': ?>
|
219 |
+
|
220 |
+
/* Tall */
|
221 |
+
.seriousslider-tall .seriousslider-caption-buttons a:nth-child(2n+1) {
|
222 |
+
background-color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
|
223 |
+
}
|
224 |
|
225 |
+
.seriousslider-tall .seriousslider-caption-buttons a:nth-child(2n) {
|
226 |
+
background: #FFF;
|
227 |
+
color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
|
228 |
+
}
|
229 |
|
230 |
+
.seriousslider-tall .seriousslider-caption-buttons a:hover {
|
231 |
+
opacity: 0.8;
|
232 |
+
}
|
233 |
+
|
234 |
+
<?php break;
|
235 |
+
case 'captionleft': ?>
|
236 |
+
|
237 |
+
/* Left caption */
|
238 |
+
.seriousslider-captionleft .seriousslider-caption-buttons a:hover {
|
239 |
+
color: <?php echo $this->sanitizer->color_clean( $accent ); ?>;
|
240 |
+
}
|
241 |
+
|
242 |
+
<?php
|
243 |
+
break;
|
244 |
+
default:
|
245 |
+
break;
|
246 |
+
} // switch($theme)
|
247 |
|
|
|
248 |
$this->custom_style[] = ob_get_clean();
|
249 |
add_action( 'wp_footer', array($this, 'shortcode_style') );
|
250 |
ob_start() ?>
|
251 |
+
var interval = <?php echo $delay ?>/200;
|
252 |
+
jQuery(document).ready(function(){
|
253 |
+
|
254 |
+
|
255 |
jQuery('#serious-slider-<?php echo $cid ?>').carousel({
|
256 |
interval: <?php echo $delay ?>,
|
257 |
pause: '<?php echo $hover ?>',
|
258 |
stransition: <?php echo $transition ?>
|
259 |
+
});
|
260 |
+
|
261 |
+
});
|
262 |
+
|
263 |
<?php
|
264 |
$this->custom_script[] = ob_get_clean();
|
265 |
add_action( 'wp_footer', array($this, 'shortcode_script') );
|
300 |
|
301 |
?>
|
302 |
|
303 |
+
<div class="item slide-<?php echo $counter ?> <?php if ($counter==1) echo 'active' ?>" role="option">
|
304 |
<?php if (!empty($image_data[0])): ?>
|
305 |
<a <?php echo $meta_link; ?> <?php echo $meta_target; ?>>
|
306 |
<img class="item-image" src="<?php echo $image_data[0] ?>" alt="<?php the_title_attribute(); ?>" <?php echo $sizes ?>>
|
310 |
<div class="seriousslider-caption">
|
311 |
<div class="seriousslider-caption-inside">
|
312 |
<?php if (!empty($slide_title) && !$hidetitle) { ?><h3 class="seriousslider-caption-title"><span><?php the_title(); ?></span></h3><?php } ?>
|
313 |
+
<?php if (!empty($slide_text)) { ?><div class="seriousslider-caption-text"><?php the_content() ?></div><?php } ?>
|
314 |
<div class="seriousslider-caption-buttons">
|
315 |
<?php for ( $i=1; $i<=$this->butts; $i++ ) { ?>
|
316 |
<?php if ( !empty(${'meta_button'.$i}) ) { ?>
|
339 |
<?php } ?>
|
340 |
</ol>
|
341 |
</div>
|
342 |
+
<hr class="transition-timer-carousel-progress-bar" />
|
343 |
<button class="left seriousslider-control" data-target="#serious-slider-<?php echo $cid ?>" role="button" data-slide="prev">
|
344 |
<span class="sicon-prev control-arrow" aria-hidden="true"></span>
|
345 |
+
<span class="sr-only"><?php _e('Previous Slide','cryout-serious-slider') ?></span>
|
346 |
</button>
|
347 |
<button class="right seriousslider-control" data-target="#serious-slider-<?php echo $cid; ?>" role="button" data-slide="next">
|
348 |
<span class="sicon-next control-arrow" aria-hidden="true"></span>
|
349 |
+
<span class="sr-only"><?php _e('Next Slide','cryout-serious-slider') ?></span>
|
350 |
</button>
|
351 |
</div>
|
352 |
<?php
|
inc/taxmeta.php
CHANGED
@@ -53,7 +53,15 @@ if ( !defined( 'ABSPATH' ) ) exit;
|
|
53 |
'',
|
54 |
'short',
|
55 |
'px'
|
56 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
</div><!--#general-->
|
58 |
|
59 |
<div id="appearance">
|
53 |
'',
|
54 |
'short',
|
55 |
'px'
|
56 |
+
);
|
57 |
+
echo $this->selectfield(
|
58 |
+
'term_meta[cryout_serious_slider_responsiveness]',
|
59 |
+
array( 'legacy' => __('Legacy Resize','cryout-serious-slider'), 'maintain' => __('Maintain Height','cryout-serious-slider') ),
|
60 |
+
$the_meta['cryout_serious_slider_responsiveness'],
|
61 |
+
__('Responsiveness','cryout-serious-slider'),
|
62 |
+
'',
|
63 |
+
'short'
|
64 |
+
); ?>
|
65 |
</div><!--#general-->
|
66 |
|
67 |
<div id="appearance">
|
readme.txt
CHANGED
@@ -5,9 +5,9 @@ License: GPLv3
|
|
5 |
License URI: http://www.gnu.org/licenses/gpl.html
|
6 |
Tags: slider, slideshow, image slider, responsive slider, wordpress slider
|
7 |
Text Domain: cryout-serious-slider
|
8 |
-
Requires at least: 4.
|
9 |
-
Tested up to: 4.9
|
10 |
-
Stable tag: 1.0.
|
11 |
|
12 |
Serious Slider is a highly efficient SEO friendly fully translatable accessibility ready free image slider for WordPress. Seriously!
|
13 |
|
@@ -99,12 +99,20 @@ Serious Slider works with all WordPress themes and has been designed to integrat
|
|
99 |
|
100 |
== Upgrade Notice ==
|
101 |
|
102 |
-
= 1.0.
|
103 |
Serious Slider version 1.0 brings a lot of new features but moves styling of inside caption links to separate slide buttons. Make sure you review your slides setup after updating.
|
104 |
|
105 |
|
106 |
== Changelog ==
|
107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
= 1.0.3 =
|
109 |
* Fixed slider indicators being left aligned in Webkit browsers
|
110 |
* Tweaked and re-checked all slider styles
|
5 |
License URI: http://www.gnu.org/licenses/gpl.html
|
6 |
Tags: slider, slideshow, image slider, responsive slider, wordpress slider
|
7 |
Text Domain: cryout-serious-slider
|
8 |
+
Requires at least: 4.2
|
9 |
+
Tested up to: 4.9.1
|
10 |
+
Stable tag: 1.0.4
|
11 |
|
12 |
Serious Slider is a highly efficient SEO friendly fully translatable accessibility ready free image slider for WordPress. Seriously!
|
13 |
|
99 |
|
100 |
== Upgrade Notice ==
|
101 |
|
102 |
+
= 1.0.0 =
|
103 |
Serious Slider version 1.0 brings a lot of new features but moves styling of inside caption links to separate slide buttons. Make sure you review your slides setup after updating.
|
104 |
|
105 |
|
106 |
== Changelog ==
|
107 |
|
108 |
+
= 1.0.4 =
|
109 |
+
* Added responsiveness option to choose between the new responsiveness mode and the pre-1.0 behaviour
|
110 |
+
* Fixed slider multi-swipe issue on mobile devices
|
111 |
+
* Restored paragraph support in slider captions (and added the necessary styling)
|
112 |
+
* Added info message when slider button is used with Text editor
|
113 |
+
* Minified custom styling added to the footer
|
114 |
+
* Slightly improved accessibility
|
115 |
+
|
116 |
= 1.0.3 =
|
117 |
* Fixed slider indicators being left aligned in Webkit browsers
|
118 |
* Tweaked and re-checked all slider styles
|
resources/backend.css
CHANGED
@@ -254,6 +254,25 @@ select#filter-by-date {
|
|
254 |
display: none;
|
255 |
}
|
256 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
257 |
#seriousslider-tabs input[name*='cryout'],
|
258 |
#seriousslider-tabs select[name*='cryout'],
|
259 |
#seriousslider-tabs textarea[name*='cryout'] {
|
254 |
display: none;
|
255 |
}
|
256 |
|
257 |
+
#seriousslider-tabs > ul {
|
258 |
+
}
|
259 |
+
#seriousslider-tabs > ul > li {
|
260 |
+
list-style: none;
|
261 |
+
display: inline-block;
|
262 |
+
position: relative;
|
263 |
+
top: 2px;
|
264 |
+
margin: 0 1em 1px 0;
|
265 |
+
font-weight: bold;
|
266 |
+
padding: 6px 15px;
|
267 |
+
white-space: nowrap;
|
268 |
+
border-bottom: 1px solid #ddd;
|
269 |
+
}
|
270 |
+
#seriousslider-tabs > ul > li > a {
|
271 |
+
padding: .5em 1em;
|
272 |
+
text-decoration: none;
|
273 |
+
display: block;
|
274 |
+
}
|
275 |
+
|
276 |
#seriousslider-tabs input[name*='cryout'],
|
277 |
#seriousslider-tabs select[name*='cryout'],
|
278 |
#seriousslider-tabs textarea[name*='cryout'] {
|
resources/backend.js
CHANGED
@@ -145,3 +145,16 @@ jQuery(document).ready(function($){
|
|
145 |
});
|
146 |
|
147 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
});
|
146 |
|
147 |
});
|
148 |
+
|
149 |
+
jQuery(document).ready(function($){
|
150 |
+
jQuery('body').on('click', '.button.media-serious-slider-button', function() {
|
151 |
+
tinymceActive = (typeof tinyMCE != 'undefined') && tinyMCE.activeEditor && !tinyMCE.activeEditor.isHidden();
|
152 |
+
if ( tinymceActive ) {
|
153 |
+
window.tinymce.activeEditor.execCommand('serious_slider_popup','',{});
|
154 |
+
} else {
|
155 |
+
alert( 'Please switch to the Visual Editor to insert a slider.');
|
156 |
+
}
|
157 |
+
});
|
158 |
+
});
|
159 |
+
|
160 |
+
// FIN
|
resources/slider.js
CHANGED
@@ -104,6 +104,7 @@ if (typeof jQuery === 'undefined') {
|
|
104 |
this.$items = null
|
105 |
|
106 |
this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
|
|
|
107 |
|
108 |
this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
|
109 |
.on('mouseenter.bs.carousel', $.proxy(this.pause, this))
|
@@ -119,6 +120,17 @@ if (typeof jQuery === 'undefined') {
|
|
119 |
wrap: true,
|
120 |
keyboard: true
|
121 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
|
123 |
|
124 |
Carousel.prototype.keydown = function (e) {
|
@@ -303,13 +315,18 @@ if (typeof jQuery === 'undefined') {
|
|
303 |
$target.data('bs.carousel').to(slideIndex)
|
304 |
}
|
305 |
|
|
|
|
|
306 |
e.preventDefault()
|
307 |
}
|
308 |
|
|
|
309 |
$(document)
|
310 |
.on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
|
311 |
.on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
|
312 |
|
|
|
|
|
313 |
/*$(window).on('load', function () {
|
314 |
$('[data-ride="carousel"]').each(function () {
|
315 |
var $carousel = $(this)
|
@@ -322,11 +339,57 @@ if (typeof jQuery === 'undefined') {
|
|
322 |
/* swipe support for mobile devices */
|
323 |
jQuery(document).ready(function() {
|
324 |
jQuery(".cryout-serious-slider").swiperight(function() {
|
325 |
-
jQuery(
|
326 |
});
|
327 |
jQuery(".cryout-serious-slider").swipeleft(function() {
|
328 |
-
jQuery(
|
329 |
});
|
330 |
});
|
331 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
332 |
/* FIN */
|
104 |
this.$items = null
|
105 |
|
106 |
this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
|
107 |
+
this.$element.on('mouseenter.bs.carousel', $.proxy(this.test, this))
|
108 |
|
109 |
this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
|
110 |
.on('mouseenter.bs.carousel', $.proxy(this.pause, this))
|
120 |
wrap: true,
|
121 |
keyboard: true
|
122 |
}
|
123 |
+
/*
|
124 |
+
// disable between tests if the code is not yet functional
|
125 |
+
|
126 |
+
Carousel.prototype.test = function () {
|
127 |
+
var id = jQuery(this.$element).attr('id');
|
128 |
+
alert(id);
|
129 |
+
// window.sliderID = jQuery(slider).attr('id');
|
130 |
+
// window.percent = 0;
|
131 |
+
// alert(window.sliderID);
|
132 |
+
|
133 |
+
}*/
|
134 |
|
135 |
|
136 |
Carousel.prototype.keydown = function (e) {
|
315 |
$target.data('bs.carousel').to(slideIndex)
|
316 |
}
|
317 |
|
318 |
+
|
319 |
+
|
320 |
e.preventDefault()
|
321 |
}
|
322 |
|
323 |
+
|
324 |
$(document)
|
325 |
.on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
|
326 |
.on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
|
327 |
|
328 |
+
|
329 |
+
|
330 |
/*$(window).on('load', function () {
|
331 |
$('[data-ride="carousel"]').each(function () {
|
332 |
var $carousel = $(this)
|
339 |
/* swipe support for mobile devices */
|
340 |
jQuery(document).ready(function() {
|
341 |
jQuery(".cryout-serious-slider").swiperight(function() {
|
342 |
+
jQuery(this).carousel('prev');
|
343 |
});
|
344 |
jQuery(".cryout-serious-slider").swipeleft(function() {
|
345 |
+
jQuery(this).carousel('next');
|
346 |
});
|
347 |
});
|
348 |
|
349 |
+
/* PROGRESS BAR */
|
350 |
+
|
351 |
+
/* disable between tests if the code is not yet functional
|
352 |
+
|
353 |
+
jQuery(document).ready(function(){
|
354 |
+
|
355 |
+
function getID(slider) {
|
356 |
+
window.sliderID = jQuery(slider).attr('id');
|
357 |
+
window.percent = 0;
|
358 |
+
alert(window.sliderID);
|
359 |
+
}
|
360 |
+
|
361 |
+
var percent = 0;
|
362 |
+
var sliderID = '';
|
363 |
+
|
364 |
+
|
365 |
+
var $bar = jQuery('.transition-timer-carousel-progress-bar');
|
366 |
+
|
367 |
+
|
368 |
+
|
369 |
+
function progressBarCarousel() {
|
370 |
+
$bar.css({width:percent+'%'});
|
371 |
+
percent = percent + 0.5;
|
372 |
+
if (percent >= 100) {
|
373 |
+
percent = 0;
|
374 |
+
jQuery('#' + window.sliderID).carousel( 'next' );
|
375 |
+
}
|
376 |
+
}
|
377 |
+
var barInterval = setInterval(progressBarCarousel, interval);
|
378 |
+
|
379 |
+
alert( '#' + window.sliderID );
|
380 |
+
|
381 |
+
if (!(/Mobi/.test(navigator.userAgent))) {
|
382 |
+
jQuery('#' + window.sliderID).hover(function(){
|
383 |
+
clearInterval(barInterval);
|
384 |
+
},
|
385 |
+
function(){
|
386 |
+
barInterval = setInterval(progressBarCarousel, interval);
|
387 |
+
}
|
388 |
+
);
|
389 |
+
}
|
390 |
+
|
391 |
+
}); */
|
392 |
+
|
393 |
+
|
394 |
+
|
395 |
/* FIN */
|
resources/style.css
CHANGED
@@ -127,13 +127,17 @@
|
|
127 |
height: auto;
|
128 |
width: auto;
|
129 |
max-width: 100.1%;
|
130 |
-
max-width:
|
131 |
line-height: 1;
|
132 |
-webkit-transform: translateX(-50%);
|
133 |
-ms-transform: translateX(-50%);
|
134 |
transform: translateX(-50%);
|
135 |
}
|
136 |
|
|
|
|
|
|
|
|
|
137 |
.seriousslider {
|
138 |
position: relative;
|
139 |
width: 100%;
|
@@ -154,6 +158,10 @@
|
|
154 |
/* text-align: center; */
|
155 |
}
|
156 |
|
|
|
|
|
|
|
|
|
157 |
@media all and (transform-3d), (-webkit-transform-3d) {
|
158 |
|
159 |
.seriousslider-inner > .item {
|
127 |
height: auto;
|
128 |
width: auto;
|
129 |
max-width: 100.1%;
|
130 |
+
max-width: calc(100% + 1px);
|
131 |
line-height: 1;
|
132 |
-webkit-transform: translateX(-50%);
|
133 |
-ms-transform: translateX(-50%);
|
134 |
transform: translateX(-50%);
|
135 |
}
|
136 |
|
137 |
+
.seriousslider-responsive-legacy .seriousslider-inner > .item img.item-image {
|
138 |
+
max-width: 100%;
|
139 |
+
}
|
140 |
+
|
141 |
.seriousslider {
|
142 |
position: relative;
|
143 |
width: 100%;
|
158 |
/* text-align: center; */
|
159 |
}
|
160 |
|
161 |
+
.seriousslider .seriousslider-inner > .item p {
|
162 |
+
margin: 0 auto;
|
163 |
+
}
|
164 |
+
|
165 |
@media all and (transform-3d), (-webkit-transform-3d) {
|
166 |
|
167 |
.seriousslider-inner > .item {
|