Fix call to deprecated function
-
Hello,
thanks for the new version! I was a bit disappointed that it didn’t address the problem that has been reported several times already.
I noticed the plugin still supports WordPress 3.0, but it’s easy to fix the issue for all versions (also older than WordPress 3.5 where the gd_edit_image_support has been deprecated in favor of wp_image_editor_supports):
function ime_filter_media_meta($content, $post) { global $wp_version; if (!ime_mode_valid()) return $content; if (version_compare($wp_version, '3.5.0', '>=')) { // WordPress 3.5 and newer if (!wp_image_editor_supports(array('mime_type' => $post->post_mime_type))) { return $content; } } else { // WordPress older than 3.5 if (!gd_edit_image_support($post->post_mime_type)) { return $content; } } // Rest of the function follows... [...]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Fix call to deprecated function’ is closed to new replies.