Calling WP_Image_Editor() in Multisite
-
I’ve been building a plugin, and in the display shortcode, I’ve used this code to get the image size.
$image = wp_get_image_editor(‘url’);
if (!is_wp_error($image)) {
$img = $image->get_size();
$imgwidth = $img[‘width’];
$imgheight = $img[‘height’];
}It works perfectly on my personal site, which is single user. On multisite however, also running on 3.5.1, it fails, claiming that WP_ERROR method does not exist.
Any ideas or fixes?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Calling WP_Image_Editor() in Multisite’ is closed to new replies.