Changeset 22830
- Timestamp:
- 11/23/2012 04:32:21 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/media.php
r22825 r22830 1295 1295 function wp_prepare_attachment_for_js( $attachment ) { 1296 1296 if ( ! $attachment = get_post( $attachment ) ) 1297 1297 return; 1298 1298 1299 1299 if ( 'attachment' != $attachment->post_type ) 1300 1300 return; 1301 1301 1302 1302 $meta = wp_get_attachment_metadata( $attachment->ID ); 1303 list( $type, $subtype ) = explode( '/', $attachment->post_mime_type ); 1303 if ( false !== strpos( $attachment->post_mime_type, '/' ) ) 1304 list( $type, $subtype ) = explode( '/', $attachment->post_mime_type ); 1305 else 1306 list( $type, $subtype ) = array( $attachment->post_mime_type, '' ); 1304 1307 1305 1308 $attachment_url = wp_get_attachment_url( $attachment->ID );
Note: See TracChangeset
for help on using the changeset viewer.