Changeset 4552
- Timestamp:
- 11/30/2006 01:56:06 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r4550 r4552 1983 1983 1984 1984 $url = $file['url']; 1985 $type = $file['type']; 1985 1986 $file = addslashes( $file['file'] ); 1986 1987 $filename = basename( $file ); … … 1989 1990 $object = array( 'post_title' => $filename, 1990 1991 'post_content' => $url, 1991 'post_mime_type' => 'import',1992 'post_mime_type' => $type, 1992 1993 'guid' => $url 1993 1994 ); -
trunk/wp-includes/post-template.php
r4402 r4552 352 352 $file = get_post_meta($post->ID, '_wp_attached_file', true); 353 353 354 $exts = array('jpg', 'gif', 'png'); 355 354 356 if ( !$fullsize && !empty($imagedata['thumb']) 355 357 && ($thumbfile = str_replace(basename($file), $imagedata['thumb'], $file)) … … 362 364 $class = 'attachmentthumb'; 363 365 364 } elseif ( substr($mime, 0, 6) == 'image/'366 } elseif ( ( substr($mime, 0, 6) == 'image/' || 'import' == $mime && in_array(substr($file, -3), $exts) ) 365 367 && file_exists($file) ) { 366 368 … … 377 379 378 380 $types = array(substr($mime, 0, strpos($mime, '/')), substr($mime, strpos($mime, '/') + 1), str_replace('/', '_', $mime)); 379 $exts = array('jpg', 'gif', 'png');380 381 foreach ($types as $type) { 381 382 foreach ($exts as $ext) {
Note: See TracChangeset
for help on using the changeset viewer.