@@ 483-487 (lines=5) @@ | ||
480 | $templates = array(); |
|
481 | ||
482 | if ( $attachment ) { |
|
483 | if ( false !== strpos( $attachment->post_mime_type, '/' ) ) { |
|
484 | list( $type, $subtype ) = explode( '/', $attachment->post_mime_type ); |
|
485 | } else { |
|
486 | list( $type, $subtype ) = array( $attachment->post_mime_type, '' ); |
|
487 | } |
|
488 | ||
489 | if ( ! empty( $subtype ) ) { |
|
490 | $templates[] = "{$type}-{$subtype}.php"; |
@@ 3045-3048 (lines=4) @@ | ||
3042 | return; |
|
3043 | ||
3044 | $meta = wp_get_attachment_metadata( $attachment->ID ); |
|
3045 | if ( false !== strpos( $attachment->post_mime_type, '/' ) ) |
|
3046 | list( $type, $subtype ) = explode( '/', $attachment->post_mime_type ); |
|
3047 | else |
|
3048 | list( $type, $subtype ) = array( $attachment->post_mime_type, '' ); |
|
3049 | ||
3050 | $attachment_url = wp_get_attachment_url( $attachment->ID ); |
|
3051 |