WordPress.org

Make WordPress Core

Changeset 11985


Ignore:
Timestamp:
09/30/09 23:39:09 (6 years ago)
Author:
azaozz
Message:

Image Editor: fix refreshing of the thumbnail, use WP_Http_Fopen::test(), see #10528

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/image-edit.php

    r11984 r11985  
    219219        if ( 'full' != $size && ( $data = image_get_intermediate_size($post_id, $size) ) ) 
    220220            $filepath = path_join( dirname($filepath), $data['file'] ); 
    221     } elseif ( function_exists('fopen') ) { 
     221    } elseif ( WP_Http_Fopen::test() ) { 
    222222        $filepath = wp_get_attachment_url($post_id); 
    223223    } 
     
    628628 
    629629        if ( $target == 'thumbnail' || $target == 'all' || $target == 'full' ) { 
    630             if ( $thumb = $meta['sizes']['thumbnail'] ) { 
    631                 $file_url = wp_get_attachment_url($post_id); 
     630            $file_url = wp_get_attachment_url($post_id); 
     631            if ( $thumb = $meta['sizes']['thumbnail'] ) 
    632632                $return->thumbnail = path_join( dirname($file_url), $thumb['file'] ); 
    633             } 
     633            else 
     634                $return->thumbnail = "$file_url?w=128&h=128"; 
    634635        } 
    635636    } else { 
Note: See TracChangeset for help on using the changeset viewer.