Compress JPEG & PNG images - Version 3.0.1

Version Description

  • Fixed bug that caused an error when registering a new account.
  • No longer use create_function, which is deprecated in PHP 7.2. The plugin no longer supports PHP 5.2.
  • Rephrased incompatible plugins notice to avoid confusion.
Download this release

Release Info

Developer TinyPNG
Plugin Icon 128x128 Compress JPEG & PNG images
Version 3.0.1
Comparing to
See all releases

Code changes from version 3.0.0 to 3.0.1

readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://tinypng.com/
4
  Tags: optimize, compress, shrink, resize, faster, fit, scale, improve, images, picture, pictures, photo, photos, image, tinypng, tinyjpg, jpeg, jpg, png, lossy, jpegmini, crunch, minify, smush, save, bandwidth, website, speed, performance, panda, george, wordpress app, SEO, lossy, wp compress, sitespeed, shortpixel, kraken, PageRank, cheetaho, s3
5
  Requires at least: 3.4
6
  Tested up to: 4.9
7
- Stable tag: 3.0.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -128,6 +128,11 @@ A: Yes! After installing the plugin, go to *Media > Bulk Optimization*, and clic
128
  A: You can upgrade to a paid account by adding your *Payment details* on your [account dashboard](https://tinypng.com/dashboard/api). Additional compressions above 500 will then be charged at the end of each month as a one-time fee.
129
 
130
  == Changelog ==
 
 
 
 
 
131
  = 3.0.0 =
132
  * Compress new images in the background to speed up your workflow.
133
  * Turbo-charged Bulk Optimization page with simultaneous image compression.
4
  Tags: optimize, compress, shrink, resize, faster, fit, scale, improve, images, picture, pictures, photo, photos, image, tinypng, tinyjpg, jpeg, jpg, png, lossy, jpegmini, crunch, minify, smush, save, bandwidth, website, speed, performance, panda, george, wordpress app, SEO, lossy, wp compress, sitespeed, shortpixel, kraken, PageRank, cheetaho, s3
5
  Requires at least: 3.4
6
  Tested up to: 4.9
7
+ Stable tag: 3.0.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
128
  A: You can upgrade to a paid account by adding your *Payment details* on your [account dashboard](https://tinypng.com/dashboard/api). Additional compressions above 500 will then be charged at the end of each month as a one-time fee.
129
 
130
  == Changelog ==
131
+ = 3.0.1 =
132
+ * Fixed bug that caused an error when registering a new account.
133
+ * No longer use create_function, which is deprecated in PHP 7.2. The plugin no longer supports PHP 5.2.
134
+ * Rephrased incompatible plugins notice to avoid confusion.
135
+
136
  = 3.0.0 =
137
  * Compress new images in the background to speed up your workflow.
138
  * Turbo-charged Bulk Optimization page with simultaneous image compression.
src/class-tiny-notices.php CHANGED
@@ -131,11 +131,10 @@ class Tiny_Notices extends Tiny_WP_Base {
131
  $plugin_name = esc_html__( 'Compress JPEG & PNG images', 'tiny-compress-images' );
132
 
133
  add_action( 'admin_notices',
134
- create_function(
135
- '',
136
- "echo '<div class=\"$css\" data-name=\"$name\"><p>" .
137
- $plugin_name . ": $message$add</div>';"
138
- )
139
  );
140
  }
141
 
@@ -146,11 +145,14 @@ class Tiny_Notices extends Tiny_WP_Base {
146
  $notice .= '</h3>';
147
  $notice .= '<p>';
148
  $notice .= esc_html__(
149
- 'These plugins are incompatible and may cause unexpected results:',
150
  'tiny-compress-images'
151
  );
152
  $notice .= '</p>';
153
  $notice .= '<table>';
 
 
 
154
  foreach ( $incompatible_plugins as $name => $file ) {
155
  $notice .= '<tr><td class="bullet">•</td><td class="name">';
156
  $notice .= $name;
@@ -166,10 +168,9 @@ class Tiny_Notices extends Tiny_WP_Base {
166
  $notice .= '</div>';
167
 
168
  add_action( 'admin_notices',
169
- create_function(
170
- '',
171
- "echo '$notice';"
172
- )
173
  );
174
  }
175
  }
131
  $plugin_name = esc_html__( 'Compress JPEG & PNG images', 'tiny-compress-images' );
132
 
133
  add_action( 'admin_notices',
134
+ function() use ( $css, $name, $plugin_name, $message, $add ) {
135
+ echo '<div class="' . $css . '" data-name="' . $name . '"><p>' .
136
+ $plugin_name . ': ' . $message . $add . '</div>';
137
+ }
 
138
  );
139
  }
140
 
145
  $notice .= '</h3>';
146
  $notice .= '<p>';
147
  $notice .= esc_html__(
148
+ 'You have activated multiple image optimization plugins. This may lead to unexpected results. The following plugins were detected:', // WPCS: Needed for proper translation.
149
  'tiny-compress-images'
150
  );
151
  $notice .= '</p>';
152
  $notice .= '<table>';
153
+ $notice .= '<tr><td class="bullet">•</td><td class="name">';
154
+ $notice .= esc_html__( 'Compress JPEG & PNG images', 'tiny-compress-images' );
155
+ $notice .= '</td><td></td></tr>';
156
  foreach ( $incompatible_plugins as $name => $file ) {
157
  $notice .= '<tr><td class="bullet">•</td><td class="name">';
158
  $notice .= $name;
168
  $notice .= '</div>';
169
 
170
  add_action( 'admin_notices',
171
+ function() use ( $notice ) {
172
+ echo $notice;
173
+ }
 
174
  );
175
  }
176
  }
src/class-tiny-plugin.php CHANGED
@@ -18,7 +18,7 @@
18
  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
  */
20
  class Tiny_Plugin extends Tiny_WP_Base {
21
- const VERSION = '3.0.0';
22
  const MEDIA_COLUMN = self::NAME;
23
  const DATETIME_FORMAT = 'Y-m-d G:i:s';
24
 
18
  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
  */
20
  class Tiny_Plugin extends Tiny_WP_Base {
21
+ const VERSION = '3.0.1';
22
  const MEDIA_COLUMN = self::NAME;
23
  const DATETIME_FORMAT = 'Y-m-d G:i:s';
24
 
src/class-tiny-settings.php CHANGED
@@ -948,7 +948,7 @@ class Tiny_Settings extends Tiny_WP_Base {
948
  $compressor->create_key( $_POST['email'], array(
949
  'name' => $_POST['name'],
950
  'identifier' => $identifier,
951
- 'link' => 'http://localhost',
952
  ) );
953
 
954
  update_option( self::get_prefixed_name( 'api_key_pending' ), true );
948
  $compressor->create_key( $_POST['email'], array(
949
  'name' => $_POST['name'],
950
  'identifier' => $identifier,
951
+ 'link' => $link,
952
  ) );
953
 
954
  update_option( self::get_prefixed_name( 'api_key_pending' ), true );
tiny-compress-images.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Compress JPEG & PNG images
4
  * Description: Speed up your website. Optimize your JPEG and PNG images automatically with TinyPNG.
5
- * Version: 3.0.0
6
  * Author: TinyPNG
7
  * Author URI: https://tinypng.com
8
  * Text Domain: tiny-compress-images
2
  /**
3
  * Plugin Name: Compress JPEG & PNG images
4
  * Description: Speed up your website. Optimize your JPEG and PNG images automatically with TinyPNG.
5
+ * Version: 3.0.1
6
  * Author: TinyPNG
7
  * Author URI: https://tinypng.com
8
  * Text Domain: tiny-compress-images