Version Description
- Added PNG in the free version and the manual optimization setting
Download this release
Release Info
| Developer | keycdn |
| Plugin | |
| Version | 1.4.0 |
| Comparing to | |
| See all releases | |
Code changes from version 1.3.9 to 1.4.0
- inc/optimus.class.php +22 -14
- inc/optimus_request.class.php +4 -3
- inc/optimus_settings.class.php +24 -3
- lang/optimus-de_DE.mo +0 -0
- lang/optimus-de_DE.po +31 -1
- optimus.php +1 -1
- readme.txt +6 -3
inc/optimus.class.php
CHANGED
|
@@ -32,21 +32,28 @@ class Optimus
|
|
| 32 |
* Konstruktor der Klasse
|
| 33 |
*
|
| 34 |
* @since 0.0.1
|
| 35 |
-
* @change 1.
|
| 36 |
*/
|
| 37 |
|
| 38 |
public function __construct()
|
| 39 |
{
|
| 40 |
-
/*
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
add_filter(
|
| 51 |
'wp_delete_file',
|
| 52 |
array(
|
|
@@ -232,7 +239,7 @@ class Optimus
|
|
| 232 |
),
|
| 233 |
network_admin_url('plugins.php#_optimus_key')
|
| 234 |
),
|
| 235 |
-
( Optimus_HQ::get_key() ? __("Enter a different Optimus HQ license key", "optimus") : '<span style="color:#
|
| 236 |
)
|
| 237 |
)
|
| 238 |
);
|
|
@@ -325,7 +332,7 @@ class Optimus
|
|
| 325 |
* Return plugin options
|
| 326 |
*
|
| 327 |
* @since 1.1.2
|
| 328 |
-
* @change 1.
|
| 329 |
*
|
| 330 |
* @return array $diff Data pairs
|
| 331 |
*/
|
|
@@ -338,7 +345,8 @@ class Optimus
|
|
| 338 |
'copy_markers' => 0,
|
| 339 |
'webp_convert' => 0,
|
| 340 |
'keep_original' => 0,
|
| 341 |
-
'secure_transport' => 0
|
|
|
|
| 342 |
)
|
| 343 |
);
|
| 344 |
}
|
| 32 |
* Konstruktor der Klasse
|
| 33 |
*
|
| 34 |
* @since 0.0.1
|
| 35 |
+
* @change 1.4.0
|
| 36 |
*/
|
| 37 |
|
| 38 |
public function __construct()
|
| 39 |
{
|
| 40 |
+
/* Get plugin options */
|
| 41 |
+
$options = Optimus::get_options();
|
| 42 |
+
|
| 43 |
+
/* Check if manual optimization is enabled */
|
| 44 |
+
if ( ! $options['manual_optimize'] ) {
|
| 45 |
+
/* Fire! */
|
| 46 |
+
add_filter(
|
| 47 |
+
'wp_generate_attachment_metadata',
|
| 48 |
+
array(
|
| 49 |
+
'Optimus_Request',
|
| 50 |
+
'optimize_upload_images'
|
| 51 |
+
),
|
| 52 |
+
10,
|
| 53 |
+
2
|
| 54 |
+
);
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
add_filter(
|
| 58 |
'wp_delete_file',
|
| 59 |
array(
|
| 239 |
),
|
| 240 |
network_admin_url('plugins.php#_optimus_key')
|
| 241 |
),
|
| 242 |
+
( Optimus_HQ::get_key() ? __("Enter a different Optimus HQ license key", "optimus") : '<span style="color:#dd3d36">'.__("Activate Optimus HQ", "optimus").'</span>' )
|
| 243 |
)
|
| 244 |
)
|
| 245 |
);
|
| 332 |
* Return plugin options
|
| 333 |
*
|
| 334 |
* @since 1.1.2
|
| 335 |
+
* @change 1.4.0
|
| 336 |
*
|
| 337 |
* @return array $diff Data pairs
|
| 338 |
*/
|
| 345 |
'copy_markers' => 0,
|
| 346 |
'webp_convert' => 0,
|
| 347 |
'keep_original' => 0,
|
| 348 |
+
'secure_transport' => 0,
|
| 349 |
+
'manual_optimize' => 0
|
| 350 |
)
|
| 351 |
);
|
| 352 |
}
|
inc/optimus_request.class.php
CHANGED
|
@@ -9,7 +9,7 @@ defined('ABSPATH') OR exit;
|
|
| 9 |
* Optimus_Request
|
| 10 |
*
|
| 11 |
* @since 1.1.7
|
| 12 |
-
* @change 1.
|
| 13 |
*/
|
| 14 |
|
| 15 |
class Optimus_Request
|
|
@@ -502,7 +502,7 @@ class Optimus_Request
|
|
| 502 |
* Return Optimus quota for a plugin type
|
| 503 |
*
|
| 504 |
* @since 1.1.0
|
| 505 |
-
* @change 1.
|
| 506 |
*
|
| 507 |
* @return array Optimus quota
|
| 508 |
*/
|
|
@@ -513,7 +513,8 @@ class Optimus_Request
|
|
| 513 |
$quota = array(
|
| 514 |
/* Optimus */
|
| 515 |
false => array(
|
| 516 |
-
'image/jpeg' => 100 * 1024
|
|
|
|
| 517 |
),
|
| 518 |
|
| 519 |
/* Optimus HQ */
|
| 9 |
* Optimus_Request
|
| 10 |
*
|
| 11 |
* @since 1.1.7
|
| 12 |
+
* @change 1.4.0
|
| 13 |
*/
|
| 14 |
|
| 15 |
class Optimus_Request
|
| 502 |
* Return Optimus quota for a plugin type
|
| 503 |
*
|
| 504 |
* @since 1.1.0
|
| 505 |
+
* @change 1.4.0
|
| 506 |
*
|
| 507 |
* @return array Optimus quota
|
| 508 |
*/
|
| 513 |
$quota = array(
|
| 514 |
/* Optimus */
|
| 515 |
false => array(
|
| 516 |
+
'image/jpeg' => 100 * 1024,
|
| 517 |
+
'image/png' => 100 * 1024
|
| 518 |
),
|
| 519 |
|
| 520 |
/* Optimus HQ */
|
inc/optimus_settings.class.php
CHANGED
|
@@ -39,7 +39,7 @@ class Optimus_Settings
|
|
| 39 |
* Valisierung der Optionsseite
|
| 40 |
*
|
| 41 |
* @since 1.0.0
|
| 42 |
-
* @change 1.
|
| 43 |
*
|
| 44 |
* @param array $data Array mit Formularwerten
|
| 45 |
* @return array Array mit geprüften Werten
|
|
@@ -51,7 +51,8 @@ class Optimus_Settings
|
|
| 51 |
'copy_markers' => (int)(!empty($data['copy_markers'])),
|
| 52 |
'webp_convert' => (int)(!empty($data['webp_convert'])),
|
| 53 |
'keep_original' => (int)(!empty($data['keep_original'])),
|
| 54 |
-
'secure_transport' => (int)(!empty($data['secure_transport']))
|
|
|
|
| 55 |
);
|
| 56 |
}
|
| 57 |
|
|
@@ -82,7 +83,7 @@ class Optimus_Settings
|
|
| 82 |
* Darstellung der Optionsseite
|
| 83 |
*
|
| 84 |
* @since 1.0.0
|
| 85 |
-
* @change 1.
|
| 86 |
*
|
| 87 |
* @return void
|
| 88 |
*/
|
|
@@ -94,6 +95,8 @@ class Optimus_Settings
|
|
| 94 |
<?php _e("Optimus Settings", "optimus"); ?>
|
| 95 |
</h2>
|
| 96 |
|
|
|
|
|
|
|
| 97 |
<form method="post" action="options.php">
|
| 98 |
<?php settings_fields('optimus') ?>
|
| 99 |
|
|
@@ -192,6 +195,24 @@ class Optimus_Settings
|
|
| 192 |
</fieldset>
|
| 193 |
</td>
|
| 194 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
</table>
|
| 196 |
|
| 197 |
<?php submit_button() ?>
|
| 39 |
* Valisierung der Optionsseite
|
| 40 |
*
|
| 41 |
* @since 1.0.0
|
| 42 |
+
* @change 1.4.0
|
| 43 |
*
|
| 44 |
* @param array $data Array mit Formularwerten
|
| 45 |
* @return array Array mit geprüften Werten
|
| 51 |
'copy_markers' => (int)(!empty($data['copy_markers'])),
|
| 52 |
'webp_convert' => (int)(!empty($data['webp_convert'])),
|
| 53 |
'keep_original' => (int)(!empty($data['keep_original'])),
|
| 54 |
+
'secure_transport' => (int)(!empty($data['secure_transport'])),
|
| 55 |
+
'manual_optimize' => (int)(!empty($data['manual_optimize']))
|
| 56 |
);
|
| 57 |
}
|
| 58 |
|
| 83 |
* Darstellung der Optionsseite
|
| 84 |
*
|
| 85 |
* @since 1.0.0
|
| 86 |
+
* @change 1.4.0
|
| 87 |
*
|
| 88 |
* @return void
|
| 89 |
*/
|
| 95 |
<?php _e("Optimus Settings", "optimus"); ?>
|
| 96 |
</h2>
|
| 97 |
|
| 98 |
+
<div class="updated"><p><?php _e("Need to optimize all your existing images? Use the <strong><a href=\"/wp-admin/tools.php?page=optimus-bulk-optimizer\">Optimus Bulk Optimizer</a></strong>.", "optimus"); ?></p></div>
|
| 99 |
+
|
| 100 |
<form method="post" action="options.php">
|
| 101 |
<?php settings_fields('optimus') ?>
|
| 102 |
|
| 195 |
</fieldset>
|
| 196 |
</td>
|
| 197 |
</tr>
|
| 198 |
+
|
| 199 |
+
<tr valign="top">
|
| 200 |
+
<th scope="row">
|
| 201 |
+
<?php _e("Optimize during upload", "optimus"); ?>
|
| 202 |
+
</th>
|
| 203 |
+
<td>
|
| 204 |
+
<fieldset>
|
| 205 |
+
<label for="optimus_manual_optimize">
|
| 206 |
+
<input type="checkbox" name="optimus[manual_optimize]" id="optimus_manual_optimize" value="1" <?php checked(1, $options['manual_optimize']) ?> />
|
| 207 |
+
<?php _e("No optimization of images during the upload process", "optimus"); ?>
|
| 208 |
+
</label>
|
| 209 |
+
|
| 210 |
+
<p class="description">
|
| 211 |
+
<?php _e("This setting prevents the automatic optimization during the upload process. Images need to be optimized via the Media Library later on. [<a href=\"https://optimus.io/support/image-bulk-optimization/\" target=\"_blank\">Details</a>]", "optimus"); ?>
|
| 212 |
+
</p>
|
| 213 |
+
</fieldset>
|
| 214 |
+
</td>
|
| 215 |
+
</tr>
|
| 216 |
</table>
|
| 217 |
|
| 218 |
<?php submit_button() ?>
|
lang/optimus-de_DE.mo
CHANGED
|
Binary file
|
lang/optimus-de_DE.po
CHANGED
|
@@ -3,7 +3,7 @@ msgstr ""
|
|
| 3 |
"Project-Id-Version: Optimus\n"
|
| 4 |
"Report-Msgid-Bugs-To: KeyCDN\n"
|
| 5 |
"POT-Creation-Date: 2015-06-16 19:46+0100\n"
|
| 6 |
-
"PO-Revision-Date: 2015-
|
| 7 |
"Last-Translator: KeyCDN <optimus@keycdn.com>\n"
|
| 8 |
"Language-Team: KeyCDN\n"
|
| 9 |
"Language: de_DE\n"
|
|
@@ -64,6 +64,16 @@ msgstr ""
|
|
| 64 |
msgid "Optimus Settings"
|
| 65 |
msgstr "Optimus Einstellungen"
|
| 66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
#: inc/optimus_settings.class.php:xx
|
| 68 |
msgid "Image size"
|
| 69 |
msgstr "Bildgrößen"
|
|
@@ -183,6 +193,26 @@ msgstr ""
|
|
| 183 |
"b/114450218898660299759/114450218898660299759/posts/5f2f9XKXb4F\" target="
|
| 184 |
"\"_blank\">Details</a>]"
|
| 185 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
#: inc/optimus_hq.class.php:xx
|
| 187 |
msgid "Activate"
|
| 188 |
msgstr "Aktivieren"
|
| 3 |
"Project-Id-Version: Optimus\n"
|
| 4 |
"Report-Msgid-Bugs-To: KeyCDN\n"
|
| 5 |
"POT-Creation-Date: 2015-06-16 19:46+0100\n"
|
| 6 |
+
"PO-Revision-Date: 2015-09-22 12:31+0100\n"
|
| 7 |
"Last-Translator: KeyCDN <optimus@keycdn.com>\n"
|
| 8 |
"Language-Team: KeyCDN\n"
|
| 9 |
"Language: de_DE\n"
|
| 64 |
msgid "Optimus Settings"
|
| 65 |
msgstr "Optimus Einstellungen"
|
| 66 |
|
| 67 |
+
#: inc/optimus_settings.class.php:xx
|
| 68 |
+
msgid ""
|
| 69 |
+
"Need to optimize all your existing images? Use the <strong><a href=\"/wp-"
|
| 70 |
+
"admin/tools.php?page=optimus-bulk-optimizer\">Optimus Bulk Optimizer</a></"
|
| 71 |
+
"strong>."
|
| 72 |
+
msgstr ""
|
| 73 |
+
"Mit dem <strong><a href=\"/wp-admin/tools.php?page=optimus-bulk-optimizer"
|
| 74 |
+
"\">Optimus Bulk Optimizer</a></strong> können alle bestehenden Bilder "
|
| 75 |
+
"optimiert werden."
|
| 76 |
+
|
| 77 |
#: inc/optimus_settings.class.php:xx
|
| 78 |
msgid "Image size"
|
| 79 |
msgstr "Bildgrößen"
|
| 193 |
"b/114450218898660299759/114450218898660299759/posts/5f2f9XKXb4F\" target="
|
| 194 |
"\"_blank\">Details</a>]"
|
| 195 |
|
| 196 |
+
#: inc/optimus_settings.class.php:xx
|
| 197 |
+
msgid "Optimize during upload"
|
| 198 |
+
msgstr "Automatische Optimierung"
|
| 199 |
+
|
| 200 |
+
#: inc/optimus_settings.class.php:xx
|
| 201 |
+
msgid "No optimization of images during the upload process"
|
| 202 |
+
msgstr "Bilder nicht während dem Upload-Vorgang optimieren"
|
| 203 |
+
|
| 204 |
+
#: inc/optimus_settings.class.php:xx
|
| 205 |
+
msgid ""
|
| 206 |
+
"This setting prevents the automatic optimization during the upload process. "
|
| 207 |
+
"Images need to be optimized via the Media Library later on. [<a href="
|
| 208 |
+
"\"https://optimus.io/support/image-bulk-optimization/\" target=\"_blank"
|
| 209 |
+
"\">Details</a>]"
|
| 210 |
+
msgstr ""
|
| 211 |
+
"Diese Einstellung unterbindet die automatische Optimierung während des "
|
| 212 |
+
"Upload-Vorgangs. Die Bilder müssen somit nachträglich via Mediathek "
|
| 213 |
+
"optimiert werden. [<a href=\"https://optimus.io/support/image-bulk-"
|
| 214 |
+
"optimization/\" target=\"_blank\">Details</a>]"
|
| 215 |
+
|
| 216 |
#: inc/optimus_hq.class.php:xx
|
| 217 |
msgid "Activate"
|
| 218 |
msgstr "Aktivieren"
|
optimus.php
CHANGED
|
@@ -7,7 +7,7 @@ Author: KeyCDN
|
|
| 7 |
Author URI: https://www.keycdn.com
|
| 8 |
Plugin URI: https://optimus.io
|
| 9 |
License: GPLv2 or later
|
| 10 |
-
Version: 1.
|
| 11 |
*/
|
| 12 |
|
| 13 |
/*
|
| 7 |
Author URI: https://www.keycdn.com
|
| 8 |
Plugin URI: https://optimus.io
|
| 9 |
License: GPLv2 or later
|
| 10 |
+
Version: 1.4.0
|
| 11 |
*/
|
| 12 |
|
| 13 |
/*
|
readme.txt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
Contributors: keycdn
|
| 3 |
Tags: images, optimize, compress, progressive, performance, png, jpeg, webp
|
| 4 |
Requires at least: 3.8
|
| 5 |
-
Tested up to: 4.
|
| 6 |
Stable tag: trunk
|
| 7 |
License: GPLv2 or later
|
| 8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
|
@@ -24,7 +24,7 @@ Optimus reduces the file size of uploaded media files. Depending on the image an
|
|
| 24 |
|
| 25 |
|
| 26 |
> #### There are three different versions of Optimus:
|
| 27 |
-
> 1. **Optimus** *(Free)* as base version with limitations (e.g. max of 100kb
|
| 28 |
> 2. **Optimus HQ** *(Premium)* with expanded functionality for personal projects
|
| 29 |
> 3. **Optimus HQ PRO** *(Premium)* as professional solution for customer websites
|
| 30 |
>
|
|
@@ -54,7 +54,7 @@ Optimus optional support the conversion of images to the thrifty [*WebP* image f
|
|
| 54 |
* Faster load times for blog pages
|
| 55 |
* Support for WooCommerce
|
| 56 |
* WordPress multisite-support
|
| 57 |
-
* Bulk optimization
|
| 58 |
|
| 59 |
|
| 60 |
= Privacy =
|
|
@@ -98,6 +98,9 @@ Optimus optional support the conversion of images to the thrifty [*WebP* image f
|
|
| 98 |
|
| 99 |
== Changelog ==
|
| 100 |
|
|
|
|
|
|
|
|
|
|
| 101 |
= 1.3.9 =
|
| 102 |
* Bug fixing and activation update
|
| 103 |
|
| 2 |
Contributors: keycdn
|
| 3 |
Tags: images, optimize, compress, progressive, performance, png, jpeg, webp
|
| 4 |
Requires at least: 3.8
|
| 5 |
+
Tested up to: 4.3
|
| 6 |
Stable tag: trunk
|
| 7 |
License: GPLv2 or later
|
| 8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 24 |
|
| 25 |
|
| 26 |
> #### There are three different versions of Optimus:
|
| 27 |
+
> 1. **Optimus** *(Free)* as base version with limitations (e.g. max of 100kb)
|
| 28 |
> 2. **Optimus HQ** *(Premium)* with expanded functionality for personal projects
|
| 29 |
> 3. **Optimus HQ PRO** *(Premium)* as professional solution for customer websites
|
| 30 |
>
|
| 54 |
* Faster load times for blog pages
|
| 55 |
* Support for WooCommerce
|
| 56 |
* WordPress multisite-support
|
| 57 |
+
* [Bulk optimization](https://optimus.io/support/image-bulk-optimization/) (optimize existing images)
|
| 58 |
|
| 59 |
|
| 60 |
= Privacy =
|
| 98 |
|
| 99 |
== Changelog ==
|
| 100 |
|
| 101 |
+
= 1.4.0 =
|
| 102 |
+
* Added PNG in the free version and the manual optimization setting
|
| 103 |
+
|
| 104 |
= 1.3.9 =
|
| 105 |
* Bug fixing and activation update
|
| 106 |
|
