Serious Slider - Version 0.6.1

Version Description

  • Fixed extraneous slide/term fields being visible after double quick edit
  • Fixed version information not updated in about page
  • Fixed slide image not vertically center-aligned when image is narrower than screen
  • Improved slider captions responsiveness
  • Fixed slider being displayed at top of content due to improper outputting (also separated inline script and moved to footer enqueue)
  • Removed some log messages that would appear in the browser's console
  • Fixed overslide, underslide and parallax transitions functionality on 3D-enabled browsers
Download this release

Release Info

Developer Cryout Creations
Plugin Icon 128x128 Serious Slider
Version 0.6.1
Comparing to
See all releases

Code changes from version 0.6 to 0.6.1

cryout-serious-slider.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Cryout Serious Slider
4
  Plugin URI: http://www.cryoutcreations.eu/serious-slider
5
  Description: Responsive slider, built on Bootstrap Carousel, uses core WordPress functionality, easy to use, seriously.
6
- Version: 0.6
7
  Author: Cryout Creations
8
  Author URI: http://www.cryoutcreations.eu
9
  Text Domain: cryout-serious-slider
@@ -13,7 +13,7 @@
13
 
14
  class Cryout_Serious_Slider {
15
 
16
- public $version = "0.5.1";
17
  public $options = array();
18
  public $shortcode_tag = 'serious-slider';
19
  public $mce_tag = 'serious_slider';
@@ -104,9 +104,11 @@ class Cryout_Serious_Slider {
104
  add_action( 'wp_ajax_cryout_serious_slider_ajax', array( $this, 'get_sliders_json' ) ); // auth users
105
  add_action( 'wp_ajax_nopriv_cryout_serious_slider_ajax', array( $this, 'get_sliders_json' ) ); // no auth users
106
 
 
 
107
  } // if (is_admin())
108
 
109
- add_action( 'plugins_loaded', array( $this, 'load_textdomain') );
110
 
111
  } // register()
112
 
@@ -132,6 +134,20 @@ class Cryout_Serious_Slider {
132
  wp_enqueue_style( 'cryout-serious-slider-style' );
133
  } // enqueue_styles()
134
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
 
136
  /**********************
137
  * settings
@@ -195,9 +211,6 @@ class Cryout_Serious_Slider {
195
  /**********************
196
  * helpers
197
  ***********************/
198
- public function get_slider_meta($sid, $term) {
199
- // ???????????????????????
200
- } // get_slider_meta
201
 
202
  /* return taxonomy id for slide id */
203
  public function get_slide_slider( $slide_ID, $taxonomy = '') {
@@ -478,17 +491,7 @@ class Cryout_Serious_Slider {
478
 
479
  /*public function custom_js() {
480
  global $post_type;
481
-
482
- if( $this->posttype == $post_type ) { ?>
483
- <script type="text/javascript">
484
- var html = '<div id="<?php echo $this->taxonomy ?>-definesliders">\
485
- <a class="hide-if-no-js taxonomy-add-new" href="edit-tags.php?taxonomy=<?php echo $this->taxonomy ?>&post_type=<?php echo $this->posttype; ?>" id="">Define Sliders</a>\
486
- </div>';
487
- jQuery(document).ready( function() {
488
- jQuery('#<?php echo $this->taxonomy ?>-adder').after(html);
489
- });
490
- </script> <?php
491
- }
492
  } // custom_js()*/
493
 
494
 
3
  Plugin Name: Cryout Serious Slider
4
  Plugin URI: http://www.cryoutcreations.eu/serious-slider
5
  Description: Responsive slider, built on Bootstrap Carousel, uses core WordPress functionality, easy to use, seriously.
6
+ Version: 0.6.1
7
  Author: Cryout Creations
8
  Author URI: http://www.cryoutcreations.eu
9
  Text Domain: cryout-serious-slider
13
 
14
  class Cryout_Serious_Slider {
15
 
16
+ public $version = "0.6.1";
17
  public $options = array();
18
  public $shortcode_tag = 'serious-slider';
19
  public $mce_tag = 'serious_slider';
104
  add_action( 'wp_ajax_cryout_serious_slider_ajax', array( $this, 'get_sliders_json' ) ); // auth users
105
  add_action( 'wp_ajax_nopriv_cryout_serious_slider_ajax', array( $this, 'get_sliders_json' ) ); // no auth users
106
 
107
+ //add_action( 'admin_notices', array( $this, 'admin_notice' ) );
108
+
109
  } // if (is_admin())
110
 
111
+ add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
112
 
113
  } // register()
114
 
134
  wp_enqueue_style( 'cryout-serious-slider-style' );
135
  } // enqueue_styles()
136
 
137
+ /**********************
138
+ * notification
139
+ ***********************/
140
+ /*public static function admin_notice() {
141
+ ?>
142
+ <div class="notice notice-success is-dismissible">
143
+ <p></p>
144
+ </div>
145
+ <?php
146
+ } // admin_notice_on_activation()
147
+
148
+ public static function admin_notice_on_activation() {
149
+ add_action('init', array('Cryout_Serious_Slider', 'admin_notice') );
150
+ }*/
151
 
152
  /**********************
153
  * settings
211
  /**********************
212
  * helpers
213
  ***********************/
 
 
 
214
 
215
  /* return taxonomy id for slide id */
216
  public function get_slide_slider( $slide_ID, $taxonomy = '') {
491
 
492
  /*public function custom_js() {
493
  global $post_type;
494
+ //
 
 
 
 
 
 
 
 
 
 
495
  } // custom_js()*/
496
 
497
 
inc/shortcodes.php CHANGED
@@ -7,6 +7,7 @@ class Cryout_Serious_Slider_Shortcode {
7
  private $id = 0;
8
  private $cid = 0;
9
  private $custom_style = array();
 
10
 
11
  function __construct($args = array()){
12
  //register shortcode
@@ -21,7 +22,7 @@ class Cryout_Serious_Slider_Shortcode {
21
 
22
  ob_start();
23
  ?><style type="text/css">
24
- <!-- cryout serious slider -->
25
  <?php echo implode("\n", $this->custom_style); ?>
26
  </style><?php
27
  $custom_style = ob_get_clean();
@@ -29,6 +30,24 @@ class Cryout_Serious_Slider_Shortcode {
29
  echo $custom_style;
30
  } // shortcode_slyle()
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  function shortcode_render($attr) {
33
 
34
  global $cryout_serious_slider;
@@ -93,8 +112,18 @@ class Cryout_Serious_Slider_Shortcode {
93
  <?php
94
  $this->custom_style[] = ob_get_clean();
95
  add_action( 'wp_footer', array($this, 'shortcode_style') );
 
 
 
 
 
 
 
 
 
96
 
97
- if ( $the_query->have_posts() ): ?>
 
98
  <div id="serious-slider-<?php echo $cid ?>" class="cryout-serious-slider seriousslider serious-slider-<?php echo $cid ?> cryout-serious-slider-<?php echo $attr['id'] ?> <?php echo $slider_classes ?>" data-ride="seriousslider">
99
  <div class="seriousslider-inner" role="listbox">
100
 
@@ -150,16 +179,11 @@ class Cryout_Serious_Slider_Shortcode {
150
  <span class="sicon-next" aria-hidden="true"></span>
151
  <span class="sr-only"><?php _e('Next','cryout-serious-slider') ?></span>
152
  </button>
153
- </div>
154
- <script type='text/javascript'>
155
- jQuery('#serious-slider-<?php echo $cid ?>').carousel({
156
- interval: <?php echo $delay ?>,
157
- pause: '<?php echo $hover ?>',
158
- stransition: <?php echo $transition ?>
159
- })
160
- </script>
161
- <?php endif; ?>
162
- <?php wp_reset_query(); /* clean up the query */ ?>
163
  <!-- end cryout serious slider -->
164
  <?php
165
  } // if id defined
7
  private $id = 0;
8
  private $cid = 0;
9
  private $custom_style = array();
10
+ private $custom_script = array();
11
 
12
  function __construct($args = array()){
13
  //register shortcode
22
 
23
  ob_start();
24
  ?><style type="text/css">
25
+ <!-- cryout serious slider styles -->
26
  <?php echo implode("\n", $this->custom_style); ?>
27
  </style><?php
28
  $custom_style = ob_get_clean();
30
  echo $custom_style;
31
  } // shortcode_slyle()
32
 
33
+ function shortcode_script() {
34
+ $sid = $this->id;
35
+ $cid = $this->cid;
36
+ $options = $this->shortcode_options($sid);
37
+ foreach ($options as $id => $opt) ${$id} = $opt;
38
+
39
+ ob_start();
40
+ ?>
41
+ <script type="text/javascript">
42
+ /* cryout serious slider scripts */
43
+ <?php echo implode("\n", $this->custom_script); ?>
44
+ </script>
45
+ <?php
46
+ $custom_script = ob_get_clean();
47
+
48
+ echo $custom_script;
49
+ } // shortcode_slyle()
50
+
51
  function shortcode_render($attr) {
52
 
53
  global $cryout_serious_slider;
112
  <?php
113
  $this->custom_style[] = ob_get_clean();
114
  add_action( 'wp_footer', array($this, 'shortcode_style') );
115
+ ob_start() ?>
116
+ jQuery('#serious-slider-<?php echo $cid ?>').carousel({
117
+ interval: <?php echo $delay ?>,
118
+ pause: '<?php echo $hover ?>',
119
+ stransition: <?php echo $transition ?>
120
+ })
121
+ <?php
122
+ $this->custom_script[] = ob_get_clean();
123
+ add_action( 'wp_footer', array($this, 'shortcode_script') );
124
 
125
+ if ( $the_query->have_posts() ):
126
+ ob_start(); ?>
127
  <div id="serious-slider-<?php echo $cid ?>" class="cryout-serious-slider seriousslider serious-slider-<?php echo $cid ?> cryout-serious-slider-<?php echo $attr['id'] ?> <?php echo $slider_classes ?>" data-ride="seriousslider">
128
  <div class="seriousslider-inner" role="listbox">
129
 
179
  <span class="sicon-next" aria-hidden="true"></span>
180
  <span class="sr-only"><?php _e('Next','cryout-serious-slider') ?></span>
181
  </button>
182
+ </div>
183
+ <?php
184
+ wp_reset_query(); /* clean up the query */
185
+ return ob_get_clean();
186
+ endif; ?>
 
 
 
 
 
187
  <!-- end cryout serious slider -->
188
  <?php
189
  } // if id defined
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Cryout Creations
3
  Donate link: https://www.cryoutcreations.eu/donate/
4
  Tags: slider, carousel, shortcode, bootstrap, responsive, responsive slider
5
  Requires at least: 4.0
6
- Tested up to: 4.6.1
7
- Stable tag: 0.6
8
  Text Domain: cryout-serious-slider
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl.html
@@ -45,6 +45,15 @@ Responsive slider, built on Bootstrap Carousel, uses core WordPress functionalit
45
 
46
  == Changelog ==
47
 
 
 
 
 
 
 
 
 
 
48
  = 0.6 =
49
  * Enabled quick-edit functionality on the sliders
50
  * Fixed slider query overlapping WordPress query in specific usage scenarios (thanks to webdragon)
3
  Donate link: https://www.cryoutcreations.eu/donate/
4
  Tags: slider, carousel, shortcode, bootstrap, responsive, responsive slider
5
  Requires at least: 4.0
6
+ Tested up to: 4.7.2
7
+ Stable tag: 0.6.1
8
  Text Domain: cryout-serious-slider
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl.html
45
 
46
  == Changelog ==
47
 
48
+ = 0.6.1 =
49
+ * Fixed extraneous slide/term fields being visible after double quick edit
50
+ * Fixed version information not updated in about page
51
+ * Fixed slide image not vertically center-aligned when image is narrower than screen
52
+ * Improved slider captions responsiveness
53
+ * Fixed slider being displayed at top of content due to improper outputting (also separated inline script and moved to footer enqueue)
54
+ * Removed some log messages that would appear in the browser's console
55
+ * Fixed overslide, underslide and parallax transitions functionality on 3D-enabled browsers
56
+
57
  = 0.6 =
58
  * Enabled quick-edit functionality on the sliders
59
  * Fixed slider query overlapping WordPress query in specific usage scenarios (thanks to webdragon)
resources/slider.js CHANGED
@@ -260,10 +260,10 @@ if (typeof jQuery === 'undefined') {
260
  var data = $this.data('bs.carousel');
261
  var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option);
262
  var action = typeof option == 'string' ? option : options.slide;
263
- console.log(data);
264
 
265
  if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
266
- console.log(data);
267
  if (typeof option == 'number') data.to(option)
268
  else if (action) data[action]()
269
  else if (options.interval) data.pause().cycle()
260
  var data = $this.data('bs.carousel');
261
  var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option);
262
  var action = typeof option == 'string' ? option : options.slide;
263
+ //console.log(data);
264
 
265
  if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
266
+ //console.log(data);
267
  if (typeof option == 'number') data.to(option)
268
  else if (action) data[action]()
269
  else if (options.interval) data.pause().cycle()
resources/style.css CHANGED
@@ -87,11 +87,13 @@
87
  .seriousslider-inner > .item {
88
  position: relative;
89
  display: none;
 
90
  }
91
  .seriousslider-inner > .item > img,
92
  .seriousslider-inner > .item > a > img {
93
  line-height: 1;
94
  }
 
95
  @media all and (transform-3d), (-webkit-transform-3d) {
96
  .seriousslider-inner > .item {
97
  -webkit-backface-visibility: hidden;
@@ -182,9 +184,9 @@
182
  /* Fade transition */
183
  .seriousslider-fade .seriousslider-inner > .item {
184
  opacity: 0;
185
- -webkit-transition: .6s ease-in-out opacity;
186
- -o-transition: .6s ease-in-out opacity;
187
- transition: .6s ease-in-out opacity;
188
  left: 0;
189
  }
190
 
@@ -236,9 +238,9 @@
236
  **/
237
 
238
  .seriousslider-overslide .seriousslider-inner > .item {
239
- -webkit-transition: .6s ease-in-out left;
240
- -o-transition: .6s ease-in-out left;
241
- transition: .6s ease-in-out left;
242
  }
243
 
244
  .seriousslider-overslide .seriousslider-inner > .active.left,
@@ -266,9 +268,9 @@
266
  **/
267
 
268
  .seriousslider-underslide .seriousslider-inner > .item {
269
- -webkit-transition: .6s ease-in-out left;
270
- -o-transition: .6s ease-in-out left;
271
- transition: .6s ease-in-out left;
272
  }
273
 
274
  .seriousslider-underslide .seriousslider-inner > .active.left,
@@ -283,8 +285,8 @@
283
  }
284
 
285
  @media all and (transform-3d), (-webkit-transform-3d) {
286
- .seriousslider-underslide .seriousslider-inner > .active.left,
287
- .seriousslider-underslide .seriousslider-inner > .active.right {
288
  -webkit-transform: translate3d(0, 0, 0);
289
  transform: translate3d(0, 0, 0);
290
  }
@@ -293,9 +295,9 @@
293
  /* Parallax animation */
294
 
295
  .seriousslider-parallax .seriousslider-inner > .item {
296
- -webkit-transition: .6s ease-in-out left;
297
- -o-transition: .6s ease-in-out left;
298
- transition: .6s ease-in-out left;
299
  }
300
 
301
  .seriousslider-parallax .seriousslider-inner > .active.left {
@@ -401,7 +403,13 @@
401
 
402
  .seriousslider .seriousslider-caption-title {
403
  margin: 0;
 
 
 
 
 
404
  }
 
405
  .seriousslider-control {
406
  position: absolute;
407
  top: 0;
@@ -755,4 +763,47 @@ ol.seriousslider-indicators .active {}
755
  background: rgba(255, 255, 255, .8);
756
  }
757
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
758
  /* FIN */
87
  .seriousslider-inner > .item {
88
  position: relative;
89
  display: none;
90
+ text-align: center;
91
  }
92
  .seriousslider-inner > .item > img,
93
  .seriousslider-inner > .item > a > img {
94
  line-height: 1;
95
  }
96
+
97
  @media all and (transform-3d), (-webkit-transform-3d) {
98
  .seriousslider-inner > .item {
99
  -webkit-backface-visibility: hidden;
184
  /* Fade transition */
185
  .seriousslider-fade .seriousslider-inner > .item {
186
  opacity: 0;
187
+ -webkit-transition: .6s ease-in-out all;
188
+ -o-transition: .6s ease-in-out all;
189
+ transition: .6s ease-in-out all;
190
  left: 0;
191
  }
192
 
238
  **/
239
 
240
  .seriousslider-overslide .seriousslider-inner > .item {
241
+ -webkit-transition: .6s ease-in-out all;
242
+ -o-transition: .6s ease-in-out all;
243
+ transition: .6s ease-in-out all;
244
  }
245
 
246
  .seriousslider-overslide .seriousslider-inner > .active.left,
268
  **/
269
 
270
  .seriousslider-underslide .seriousslider-inner > .item {
271
+ -webkit-transition: .6s ease-in-out all;
272
+ -o-transition: .6s ease-in-out all;
273
+ transition: .6s ease-in-out all;
274
  }
275
 
276
  .seriousslider-underslide .seriousslider-inner > .active.left,
285
  }
286
 
287
  @media all and (transform-3d), (-webkit-transform-3d) {
288
+ .seriousslider-underslide .seriousslider-inner > .next,
289
+ .seriousslider-underslide .seriousslider-inner > .prev {
290
  -webkit-transform: translate3d(0, 0, 0);
291
  transform: translate3d(0, 0, 0);
292
  }
295
  /* Parallax animation */
296
 
297
  .seriousslider-parallax .seriousslider-inner > .item {
298
+ -webkit-transition: .6s ease-in-out all;
299
+ -o-transition: .6s ease-in-out all;
300
+ transition: .6s ease-in-out all;
301
  }
302
 
303
  .seriousslider-parallax .seriousslider-inner > .active.left {
403
 
404
  .seriousslider .seriousslider-caption-title {
405
  margin: 0;
406
+ line-height: 1.2;
407
+ }
408
+
409
+ .seriousslider-caption-text {
410
+ margin-top: 1em;
411
  }
412
+
413
  .seriousslider-control {
414
  position: absolute;
415
  top: 0;
763
  background: rgba(255, 255, 255, .8);
764
  }
765
 
766
+ /* Responsiveness */
767
+ @media (max-width: 1200px) {
768
+
769
+ body .lp-staticslider .staticslider-caption-title,
770
+ body .seriousslider.seriousslider-theme .seriousslider-caption-title {
771
+ letter-spacing: 0;
772
+ }
773
+
774
+ .lp-staticslider .staticslider-caption,
775
+ .seriousslider.seriousslider-theme .seriousslider-caption {
776
+ font-size: .9em;
777
+ }
778
+
779
+ }
780
+
781
+ @media (max-width: 800px) {
782
+
783
+ .lp-staticslider .staticslider-caption,
784
+ .seriousslider.seriousslider-theme .seriousslider-caption {
785
+ font-size: .75em;
786
+ }
787
+
788
+ .seriousslider-control {
789
+ font-size: 20px;
790
+ }
791
+
792
+ }
793
+
794
+ @media (max-width: 480px) {
795
+
796
+ .lp-staticslider .staticslider-caption,
797
+ .seriousslider.seriousslider-theme .seriousslider-caption {
798
+ font-size: .65em;
799
+ }
800
+
801
+ .seriousslider-control {
802
+ font-size: 15px;
803
+ }
804
+
805
+ }
806
+
807
+
808
+
809
  /* FIN */