Pass an attachment ID, not a file path, to _load_image_to_edit_path() from wp_crop_image(). This fixes handling of attachments that require url fopen to access the image.
Allow passing urls instead of just file paths to WP_Image_Editor_Imagick::load() and WP_Image_Editor_GD::load() so that attachments requiring URL fopen can be handled. see #6821 git-svn-id: http://core.svn.wordpress.org/trunk@22538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -52,7 +52,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
|
||||
if ( $this->image )
|
||||
return true;
|
||||
|
||||
if ( ! is_file( $this->file ) )
|
||||
if ( ! is_file( $this->file ) && ! preg_match( '|^https?://|', $this->file ) )
|
||||
return new WP_Error( 'error_loading_image', __('File doesn’t exist?'), $this->file );
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user