Easing Slider - Version 2.2.0.4

Version Description

  • Added additional legacy functionality to display sliders using template function and shortcode from v1 of Easing Slider.
Download this release

Release Info

Developer MatthewRuddy
Plugin Icon 128x128 Easing Slider
Version 2.2.0.4
Comparing to
See all releases

Code changes from version 2.2.0.3 to 2.2.0.4

Files changed (3) hide show
  1. easing-slider.php +3 -2
  2. includes/class-es-legacy.php +36 -0
  3. readme.txt +4 -1
easing-slider.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: Easing Slider
5
  Plugin URI: http://easingslider.com/
6
- Version: 2.2.0.3
7
  Author: Matthew Ruddy
8
  Author URI: http://matthewruddy.com/
9
  Description: Easing Slider is an easy to use slider plugin for WordPress. Simple, lightweight & designed to get the job done, it allows you to get creating sliders without any difficulty.
@@ -53,7 +53,7 @@ class Easing_Slider {
53
  *
54
  * @var string
55
  */
56
- public static $version = '2.2.0.3';
57
 
58
  /**
59
  * Constructor
@@ -290,6 +290,7 @@ class Easing_Slider {
290
  add_action( 'easingslider_delete_slider', array( $legacy, 'delete_lite_slider' ) );
291
  add_action( 'easingslider_delete_slider', array( $legacy, 'delete_pro_slider' ) );
292
  add_action( 'easingslider_pre_redirect_to_welcome', array( $legacy, 'redirect_to_whats_new' ) );
 
293
  add_shortcode( 'easingsliderlite', array( $legacy, 'do_lite_shortcode' ) );
294
  add_shortcode( 'easingsliderpro', array( $legacy, 'do_pro_shortcode' ) );
295
  add_shortcode( 'rivasliderpro', array( $legacy, 'do_pro_shortcode' ) );
3
  /*
4
  Plugin Name: Easing Slider
5
  Plugin URI: http://easingslider.com/
6
+ Version: 2.2.0.4
7
  Author: Matthew Ruddy
8
  Author URI: http://matthewruddy.com/
9
  Description: Easing Slider is an easy to use slider plugin for WordPress. Simple, lightweight & designed to get the job done, it allows you to get creating sliders without any difficulty.
53
  *
54
  * @var string
55
  */
56
+ public static $version = '2.2.0.4';
57
 
58
  /**
59
  * Constructor
290
  add_action( 'easingslider_delete_slider', array( $legacy, 'delete_lite_slider' ) );
291
  add_action( 'easingslider_delete_slider', array( $legacy, 'delete_pro_slider' ) );
292
  add_action( 'easingslider_pre_redirect_to_welcome', array( $legacy, 'redirect_to_whats_new' ) );
293
+ add_action( 'easingslider_display_shortcode', array( $legacy, 'handle_lite_shortcode' ) );
294
  add_shortcode( 'easingsliderlite', array( $legacy, 'do_lite_shortcode' ) );
295
  add_shortcode( 'easingsliderpro', array( $legacy, 'do_pro_shortcode' ) );
296
  add_shortcode( 'rivasliderpro', array( $legacy, 'do_pro_shortcode' ) );
includes/class-es-legacy.php CHANGED
@@ -13,6 +13,11 @@ if ( ! defined( 'ABSPATH' ) ) {
13
  * @param int $id The legacy slider ID
14
  * @return void
15
  */
 
 
 
 
 
16
  if ( ! function_exists( 'easingsliderlite' ) ) {
17
  function easingsliderlite() {
18
  echo do_shortcode( "[easingsliderlite]" );
@@ -433,6 +438,37 @@ class ES_Legacy {
433
 
434
  }
435
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
436
  /**
437
  * Upgrades the plugin from Easing Slider "Lite" v1.0 and onwards.
438
  *
13
  * @param int $id The legacy slider ID
14
  * @return void
15
  */
16
+ if ( ! function_exists( 'easing_slider' ) ) {
17
+ function easing_slider() {
18
+ echo do_shortcode( "[easingsliderlite]" );
19
+ }
20
+ }
21
  if ( ! function_exists( 'easingsliderlite' ) ) {
22
  function easingsliderlite() {
23
  echo do_shortcode( "[easingsliderlite]" );
438
 
439
  }
440
 
441
+ /**
442
+ * This method handles shortcodes from v1 of Easing Slider, which used the same shortcode as we do now.
443
+ *
444
+ * To work around it, this method will check for no attributes on the shortcode, as we previously didn't support them.
445
+ * If this is true, it will search for an Easing Slider "Lite" slider and display it if found.
446
+ *
447
+ * Quite messy, but that version of the plugin was some of my first ever PHP, so bare with me :)
448
+ *
449
+ * @param array $atts The shortcode attributes
450
+ * @return void
451
+ */
452
+ public function handle_lite_shortcode( $atts ) {
453
+
454
+ // Bail if attributes aren't empty
455
+ if ( ! empty( $atts['id'] ) ) {
456
+ return;
457
+ }
458
+
459
+ // Get our "Lite" slider
460
+ $lite_slider = $this->get_lite_slider();
461
+
462
+ // Bail if we don't have one
463
+ if ( ! $lite_slider ) {
464
+ return;
465
+ }
466
+
467
+ // Render our "Lite" slider
468
+ echo $lite_slider->render();
469
+
470
+ }
471
+
472
  /**
473
  * Upgrades the plugin from Easing Slider "Lite" v1.0 and onwards.
474
  *
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: MatthewRuddy
4
  Tags: slideshow, slider, slides, slide, gallery, images, image, responsive, mobile, jquery, javascript, featured, content
5
  Requires at least: 4.0
6
  Tested up to: 4.2
7
- Stable tag: 2.2.0.3
8
 
9
  Easing Slider is an easy to use slider plugin. Simple and lightweight, is makes creating beautiful WordPress sliders a breeze.
10
 
@@ -73,6 +73,9 @@ This is easy. When editing a slider in the "All Sliders" admin area, simply clic
73
 
74
  == Changelog ==
75
 
 
 
 
76
  = 2.2.0.3 =
77
  * Fixed compatibility issues with __callStatic and PHP 5.2.
78
 
4
  Tags: slideshow, slider, slides, slide, gallery, images, image, responsive, mobile, jquery, javascript, featured, content
5
  Requires at least: 4.0
6
  Tested up to: 4.2
7
+ Stable tag: 2.2.0.4
8
 
9
  Easing Slider is an easy to use slider plugin. Simple and lightweight, is makes creating beautiful WordPress sliders a breeze.
10
 
73
 
74
  == Changelog ==
75
 
76
+ = 2.2.0.4 =
77
+ * Added additional legacy functionality to display sliders using template function and shortcode from v1 of Easing Slider.
78
+
79
  = 2.2.0.3 =
80
  * Fixed compatibility issues with __callStatic and PHP 5.2.
81