WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/30/2006 01:56:06 AM (13 years ago)
Author:
ryan
Message:

Don't use 'import' as a mime type. Props mdawaffe and westi. fixes #3219

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-template.php

    r4402 r4552  
    352352    $file = get_post_meta($post->ID, '_wp_attached_file', true);
    353353
     354    $exts = array('jpg', 'gif', 'png');
     355
    354356    if ( !$fullsize && !empty($imagedata['thumb'])
    355357            && ($thumbfile = str_replace(basename($file), $imagedata['thumb'], $file))
     
    362364        $class = 'attachmentthumb';
    363365
    364     } elseif ( substr($mime, 0, 6) == 'image/'
     366    } elseif ( ( substr($mime, 0, 6) == 'image/' || 'import' == $mime && in_array(substr($file, -3), $exts) )
    365367            && file_exists($file) ) {
    366368
     
    377379
    378380        $types = array(substr($mime, 0, strpos($mime, '/')), substr($mime, strpos($mime, '/') + 1), str_replace('/', '_', $mime));
    379         $exts = array('jpg', 'gif', 'png');
    380381        foreach ($types as $type) {
    381382            foreach ($exts as $ext) {
Note: See TracChangeset for help on using the changeset viewer.