Ticket #22532: 22532.patch
File 22532.patch, 830 bytes (added by , 12 years ago) |
---|
-
wp-includes/media.php
1235 1235 */ 1236 1236 function wp_prepare_attachment_for_js( $attachment ) { 1237 1237 if ( ! $attachment = get_post( $attachment ) ) 1238 1238 return; 1239 1239 1240 1240 if ( 'attachment' != $attachment->post_type ) 1241 1241 return; 1242 1242 1243 1243 $meta = wp_get_attachment_metadata( $attachment->ID ); 1244 list( $type, $subtype ) = explode( '/', $attachment->post_mime_type ); 1244 if ( false !== strpos( $attachment->post_mime_type, '/' ) ) 1245 list( $type, $subtype ) = explode( '/', $attachment->post_mime_type ); 1246 else 1247 list( $type, $subtype ) = array( $attachment->post_mime_type, '' ); 1245 1248 1246 1249 $attachment_url = wp_get_attachment_url( $attachment->ID ); 1247 1250