Ticket #16693: 16693.3.diff
| File 16693.3.diff, 1.7 KB (added by , 15 years ago) |
|---|
-
wp-includes/post.php
3905 3905 3906 3906 $ext = preg_match('/\.([^.]+)$/', $file, $matches) ? strtolower($matches[1]) : false; 3907 3907 3908 $image_exts = array('jpg', 'jpeg', ' gif', 'png');3908 $image_exts = array('jpg', 'jpeg', 'jpe', 'gif', 'png'); 3909 3909 3910 3910 if ( 'image/' == substr($post->post_mime_type, 0, 6) || $ext && 'import' == $post->post_mime_type && in_array($ext, $image_exts) ) 3911 3911 return true; -
wp-admin/includes/media.php
563 563 564 564 // Set variables for storage 565 565 // fix file filename for query strings 566 preg_match('/[^\?]+\.(jpg| JPG|jpe|JPE|jpeg|JPEG|gif|GIF|png|PNG)/', $file, $matches);566 preg_match('/[^\?]+\.(jpg|jpeg|jpe|gif|png)/i', $file, $matches); 567 567 $file_array['name'] = basename($matches[0]); 568 568 $file_array['tmp_name'] = $tmp; 569 569 -
wp-admin/press-this.php
200 200 */ 201 201 function get_images_from_uri($uri) { 202 202 $uri = preg_replace('/\/#.+?$/','', $uri); 203 if ( preg_match('/\.(jpg|jpe |jpeg|png|gif)$/', $uri) && !strpos($uri,'blogger.com') )203 if ( preg_match('/\.(jpg|jpeg|jpe|gif|png)$/i', $uri) && !strpos($uri,'blogger.com') ) 204 204 return "'" . esc_attr( html_entity_decode($uri) ) . "'"; 205 205 $content = wp_remote_fopen($uri); 206 206 if ( false === $content )