Cyclone Slider - Version 2.12.2

Version Description

  • 2016-07-18 =
  • Fix for parsing error in PHP versions 5.2 due to missing namespace support.
Download this release

Release Info

Developer kosinix
Plugin Icon 128x128 Cyclone Slider
Version 2.12.2
Comparing to
See all releases

Code changes from version 2.12.1 to 2.12.2

README.txt CHANGED
@@ -118,6 +118,9 @@ See: [http://docs.codefleet.net/cyclone-slider-2/creating-your-own-template/](ht
118
 
119
  == Changelog ==
120
 
 
 
 
121
  = 2.12.1 - 2016-07-09 =
122
  * Fix autoloader not finding namespaced classes.
123
  * Updated Grafika from source.
118
 
119
  == Changelog ==
120
 
121
+ = 2.12.2 - 2016-07-18 =
122
+ * Fix for parsing error in PHP versions 5.2 due to missing namespace support.
123
+
124
  = 2.12.1 - 2016-07-09 =
125
  * Fix autoloader not finding namespaced classes.
126
  * Updated Grafika from source.
cyclone-slider.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Cyclone Slider 2
4
  Plugin URI: http://www.codefleet.net/cyclone-slider-2/
5
  Description: Create and manage sliders with ease. Built for both casual users and developers.
6
- Version: 2.12.1
7
  Author: Nico Amarilla
8
  Author URI: http://www.codefleet.net/
9
  License: GPLv3
3
  Plugin Name: Cyclone Slider 2
4
  Plugin URI: http://www.codefleet.net/cyclone-slider-2/
5
  Description: Create and manage sliders with ease. Built for both casual users and developers.
6
+ Version: 2.12.2
7
  Author: Nico Amarilla
8
  Author URI: http://www.codefleet.net/
9
  License: GPLv3
src/CycloneSlider/ImageResizer.php CHANGED
@@ -101,24 +101,8 @@ class CycloneSlider_ImageResizer {
101
  private function resize_slide_image( $image_file, $image_file_dest, $width, $height, $resize_option, $resize_quality){
102
  if(version_compare(PHP_VERSION, '5.3', '>=')){
103
 
104
- $editor = \CycloneSlider\Grafika\Grafika::createEditor();
105
- $editor->open( $image_file );
106
- if('fill'==$resize_option){
107
- $editor->resizeFill( $width, $height );
108
- } else if('crop'==$resize_option){
109
- $editor->crop( $width, $height );
110
- } else if('exact'==$resize_option){
111
- $editor->resizeExact( $width, $height );
112
- } else if('exactHeight'==$resize_option){
113
- $editor->resizeExactHeight( $height );
114
- } else if('exactWidth'==$resize_option){
115
- $editor->resizeExactWidth( $width );
116
- } else {
117
- $editor->resizeFit( $width, $height );
118
- }
119
- $editor->save( $image_file_dest, null, $resize_quality );
120
 
121
- return true;
122
  } else {
123
  // Create
124
  $image = new CycloneSlider_ImageEditor($image_file);
101
  private function resize_slide_image( $image_file, $image_file_dest, $width, $height, $resize_option, $resize_quality){
102
  if(version_compare(PHP_VERSION, '5.3', '>=')){
103
 
104
+ require_once '../code-5.3.php'; // Hack. This code is not placed here but in an external file to prevent PHP from parsing the code in versions below 5.3.0 despite the if..else check. See http://stackoverflow.com/questions/17275557/run-a-conditional-using-php-version
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
 
 
106
  } else {
107
  // Create
108
  $image = new CycloneSlider_ImageEditor($image_file);
src/code-5.3.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Used in ImageResizer
3
+ $editor = \CycloneSlider\Grafika\Grafika::createEditor();
4
+ $editor->open( $image_file );
5
+ if('fill'==$resize_option){
6
+ $editor->resizeFill( $width, $height );
7
+ } else if('crop'==$resize_option){
8
+ $editor->crop( $width, $height );
9
+ } else if('exact'==$resize_option){
10
+ $editor->resizeExact( $width, $height );
11
+ } else if('exactHeight'==$resize_option){
12
+ $editor->resizeExactHeight( $height );
13
+ } else if('exactWidth'==$resize_option){
14
+ $editor->resizeExactWidth( $width );
15
+ } else {
16
+ $editor->resizeFit( $width, $height );
17
+ }
18
+ $editor->save( $image_file_dest, null, $resize_quality );
19
+
20
+ return true;