Easing Slider - Version 2.1.4.3

Version Description

  • Fixed issues with customizer and JSON encoding.
Download this release

Release Info

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

Code changes from version 2.1.4.2 to 2.1.4.3

easingsliderlite.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: Easing Slider "Lite"
5
  Plugin URI: http://easingslider.com/
6
- Version: 2.1.4.2
7
  Author: Matthew Ruddy
8
  Author URI: http://matthewruddy.com/
9
  Description: Easing Slider "Lite" is an easy to use slideshow plugin for WordPress. Simple, lightweight & designed to get the job done, it allows you to get going without any fuss.
@@ -60,7 +60,7 @@ class EasingSliderLite {
60
  *
61
  * @since 2.0
62
  */
63
- public static $version = '2.1.4.2';
64
 
65
  /**
66
  * Our array of Easing Slider "Lite" admin pages. These are used to conditionally load scripts.
@@ -296,7 +296,7 @@ class EasingSliderLite {
296
  /** Add "wp_options" table options */
297
  add_option( 'easingsliderlite_version', self::$version );
298
  add_option( 'easingsliderlite_slideshow', $this->slideshow_defaults() );
299
- add_option( 'easingsliderlite_customizations', json_encode( $this->customization_defaults() ) );
300
  add_option( 'easingsliderlite_settings',
301
  array(
302
  'resizing' => false,
@@ -772,12 +772,12 @@ class EasingSliderLite {
772
 
773
  /** Save the customizations */
774
  update_option( 'easingsliderlite_customizations',
775
- json_encode( EasingSliderLite::get_instance()->validate( (object) array(
776
  'arrows' => (object) $_POST['arrows'],
777
  'pagination' => (object) $_POST['pagination'],
778
  'border' => (object) $_POST['border'],
779
  'shadow' => (object) $_POST['shadow']
780
- ) ) )
781
  );
782
 
783
  }
3
  /*
4
  Plugin Name: Easing Slider "Lite"
5
  Plugin URI: http://easingslider.com/
6
+ Version: 2.1.4.3
7
  Author: Matthew Ruddy
8
  Author URI: http://matthewruddy.com/
9
  Description: Easing Slider "Lite" is an easy to use slideshow plugin for WordPress. Simple, lightweight & designed to get the job done, it allows you to get going without any fuss.
60
  *
61
  * @since 2.0
62
  */
63
+ public static $version = '2.1.4.3';
64
 
65
  /**
66
  * Our array of Easing Slider "Lite" admin pages. These are used to conditionally load scripts.
296
  /** Add "wp_options" table options */
297
  add_option( 'easingsliderlite_version', self::$version );
298
  add_option( 'easingsliderlite_slideshow', $this->slideshow_defaults() );
299
+ add_option( 'easingsliderlite_customizations', $this->customization_defaults() );
300
  add_option( 'easingsliderlite_settings',
301
  array(
302
  'resizing' => false,
772
 
773
  /** Save the customizations */
774
  update_option( 'easingsliderlite_customizations',
775
+ EasingSliderLite::get_instance()->validate( (object) array(
776
  'arrows' => (object) $_POST['arrows'],
777
  'pagination' => (object) $_POST['pagination'],
778
  'border' => (object) $_POST['border'],
779
  'shadow' => (object) $_POST['shadow']
780
+ ) )
781
  );
782
 
783
  }
includes/Slideshow.php CHANGED
@@ -63,7 +63,7 @@ class ESL_Slideshow {
63
  public static function print_custom_styles() {
64
 
65
  /** Get the customizations & defaults */
66
- $customizations = $c = json_decode( get_option( 'easingsliderlite_customizations' ) );
67
  $defaults = EasingSliderLite::get_instance()->customization_defaults();
68
 
69
  /** Bail if there are no customizations */
63
  public static function print_custom_styles() {
64
 
65
  /** Get the customizations & defaults */
66
+ $customizations = $c = get_option( 'easingsliderlite_customizations' );
67
  $defaults = EasingSliderLite::get_instance()->customization_defaults();
68
 
69
  /** Bail if there are no customizations */
includes/Upgrade.php CHANGED
@@ -36,6 +36,10 @@ class ESL_Upgrade {
36
  if ( version_compare( $version, '2.1', '<' ) )
37
  self::do_210_upgrade();
38
 
 
 
 
 
39
  /** Custom hooks */
40
  do_action( 'easingsliderlite_upgrades', EasingSliderLite::$version, $version );
41
 
@@ -101,7 +105,7 @@ class ESL_Upgrade {
101
  global $wp_roles;
102
 
103
  /** Add the customizations database option */
104
- add_option( 'easingsliderlite_customizations', json_encode( EasingSliderLite::get_instance()->customization_defaults() ) );
105
 
106
  /** Add the customization panel capability */
107
  foreach ( $wp_roles->roles as $role => $info )
@@ -109,4 +113,29 @@ class ESL_Upgrade {
109
 
110
  }
111
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  }
36
  if ( version_compare( $version, '2.1', '<' ) )
37
  self::do_210_upgrade();
38
 
39
+ /** Upgrade to v2.1.4.3 */
40
+ if ( version_compare( $version, '2.1.4.3', '<' ) )
41
+ self::do_2143_upgrade();
42
+
43
  /** Custom hooks */
44
  do_action( 'easingsliderlite_upgrades', EasingSliderLite::$version, $version );
45
 
105
  global $wp_roles;
106
 
107
  /** Add the customizations database option */
108
+ add_option( 'easingsliderlite_customizations', EasingSliderLite::get_instance()->customization_defaults() );
109
 
110
  /** Add the customization panel capability */
111
  foreach ( $wp_roles->roles as $role => $info )
113
 
114
  }
115
 
116
+ /**
117
+ * Does 2.1.4.3 plugin upgrade
118
+ *
119
+ * @since 2.1.4.3
120
+ */
121
+ public static final function do_2143_upgrade() {
122
+
123
+ /**
124
+ * This fixes issues with JSON encoding of customization options.
125
+ * We've decided not to JSON encode them anymore, so let's make ammends.
126
+ */
127
+ $customizations = get_option( 'easingsliderlite_customizations' );
128
+
129
+ $decoded_json = @json_decode( $customizations );
130
+
131
+ // Bail if the settings are already converted to an object
132
+ if ( ! $decoded_json && is_object( $customizations ) ) {
133
+ return;
134
+ }
135
+
136
+ // Save the decoded customizations
137
+ update_option( 'easingsliderlite_customizations', $decoded_json );
138
+
139
+ }
140
+
141
  }
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: 3.5
6
  Tested up to: 4.0
7
- Stable tag: 2.1.4.2
8
 
9
  Easing Slider "Lite" is an easy to use slider plugin. Simple and lightweight, built with native WordPress functionality.
10
 
@@ -77,6 +77,9 @@ This is easy. When viewing the <strong>"Edit Slideshow"</strong> Easing Slider "
77
 
78
  == Changelog ==
79
 
 
 
 
80
  = 2.1.4.2 =
81
  * Fixed widget title filter bug.
82
  * Fixed admin menu button icon CSS margin.
4
  Tags: slideshow, slider, slides, slide, gallery, images, image, responsive, mobile, jquery, javascript, featured, content
5
  Requires at least: 3.5
6
  Tested up to: 4.0
7
+ Stable tag: 2.1.4.3
8
 
9
  Easing Slider "Lite" is an easy to use slider plugin. Simple and lightweight, built with native WordPress functionality.
10
 
77
 
78
  == Changelog ==
79
 
80
+ = 2.1.4.3 =
81
+ * Fixed issues with customizer and JSON encoding.
82
+
83
  = 2.1.4.2 =
84
  * Fixed widget title filter bug.
85
  * Fixed admin menu button icon CSS margin.
templates/customizer.php CHANGED
@@ -4,7 +4,7 @@
4
  $slideshow = $s = EasingSliderLite::get_instance()->validate( get_option( 'easingsliderlite_slideshow' ) );
5
 
6
  /** Get current customization settings */
7
- $customizations = $c = json_decode( get_option( 'easingsliderlite_customizations' ) );
8
 
9
  /** Load required extra scripts and styling */
10
  wp_enqueue_script( 'customize-controls' );
4
  $slideshow = $s = EasingSliderLite::get_instance()->validate( get_option( 'easingsliderlite_slideshow' ) );
5
 
6
  /** Get current customization settings */
7
+ $customizations = $c = get_option( 'easingsliderlite_customizations' );
8
 
9
  /** Load required extra scripts and styling */
10
  wp_enqueue_script( 'customize-controls' );
templates/slideshow.php CHANGED
@@ -4,7 +4,7 @@
4
  $slideshow = $s = EasingSliderLite::get_instance()->validate( get_option( 'easingsliderlite_slideshow' ) );
5
 
6
  /** Get customizations */
7
- $customizations = $c = json_decode( get_option( 'easingsliderlite_customizations' ) );
8
 
9
  /** Bail if we failed to retrieve the slideshow */
10
  if ( $s === false ) {
4
  $slideshow = $s = EasingSliderLite::get_instance()->validate( get_option( 'easingsliderlite_slideshow' ) );
5
 
6
  /** Get customizations */
7
+ $customizations = $c = get_option( 'easingsliderlite_customizations' );
8
 
9
  /** Bail if we failed to retrieve the slideshow */
10
  if ( $s === false ) {