Version Description
- Fixed deprecated use of gd_edit_image_support (thanks @chesio)
Download this release
Release Info
Developer | rickardw |
Plugin | ImageMagick Engine |
Version | 1.6.1 |
Comparing to | |
See all releases |
Code changes from version 1.6.0 to 1.6.1
- imagemagick-engine.php +15 -4
- readme.txt +4 -1
imagemagick-engine.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
Description: Improve the quality of re-sized images by replacing standard GD library with ImageMagick
|
6 |
Author: Orangelab
|
7 |
Author URI: https://orangelab.com/
|
8 |
-
Version: 1.6.
|
9 |
Text Domain: imagemagick-engine
|
10 |
|
11 |
Copyright @ 2020 Orangelab AB
|
@@ -749,12 +749,23 @@ function ime_filter_plugin_actions($links, $file) {
|
|
749 |
* Add admin information if attachment is converted using plugin
|
750 |
*/
|
751 |
function ime_filter_media_meta($content, $post) {
|
|
|
|
|
752 |
if (!ime_mode_valid())
|
753 |
return $content;
|
754 |
|
755 |
-
if (
|
756 |
-
|
757 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
758 |
$metadata = wp_get_attachment_metadata($post->ID);
|
759 |
|
760 |
$ime = false;
|
5 |
Description: Improve the quality of re-sized images by replacing standard GD library with ImageMagick
|
6 |
Author: Orangelab
|
7 |
Author URI: https://orangelab.com/
|
8 |
+
Version: 1.6.1
|
9 |
Text Domain: imagemagick-engine
|
10 |
|
11 |
Copyright @ 2020 Orangelab AB
|
749 |
* Add admin information if attachment is converted using plugin
|
750 |
*/
|
751 |
function ime_filter_media_meta($content, $post) {
|
752 |
+
global $wp_version;
|
753 |
+
|
754 |
if (!ime_mode_valid())
|
755 |
return $content;
|
756 |
|
757 |
+
if (version_compare($wp_version, '3.5.0', '>=')) {
|
758 |
+
// WordPress 3.5 and newer
|
759 |
+
if (!wp_image_editor_supports(array('mime_type' => $post->post_mime_type))) {
|
760 |
+
return $content;
|
761 |
+
}
|
762 |
+
} else {
|
763 |
+
// WordPress older than 3.5
|
764 |
+
if (!gd_edit_image_support($post->post_mime_type)) {
|
765 |
+
return $content;
|
766 |
+
}
|
767 |
+
}
|
768 |
+
|
769 |
$metadata = wp_get_attachment_metadata($post->ID);
|
770 |
|
771 |
$ime = false;
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: rickardw, orangelab
|
|
3 |
Tags: image, images, picture, imagemagick, gd
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.3.2
|
6 |
-
Stable tag: 1.6.
|
7 |
|
8 |
Improve the quality of re-sized images by replacing standard GD library with ImageMagick.
|
9 |
|
@@ -74,6 +74,9 @@ You'll probably have problems with various other plugins too unless you fix this
|
|
74 |
|
75 |
== Changelog ==
|
76 |
|
|
|
|
|
|
|
77 |
= 1.6.0 =
|
78 |
* Small bug fixes
|
79 |
* Small updates to admin UI
|
3 |
Tags: image, images, picture, imagemagick, gd
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 5.3.2
|
6 |
+
Stable tag: 1.6.1
|
7 |
|
8 |
Improve the quality of re-sized images by replacing standard GD library with ImageMagick.
|
9 |
|
74 |
|
75 |
== Changelog ==
|
76 |
|
77 |
+
= 1.6.1 =
|
78 |
+
* Fixed deprecated use of gd_edit_image_support (thanks @chesio)
|
79 |
+
|
80 |
= 1.6.0 =
|
81 |
* Small bug fixes
|
82 |
* Small updates to admin UI
|