| @@ 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"; |
|
| @@ 3023-3026 (lines=4) @@ | ||
| 3020 | return; |
|
| 3021 | ||
| 3022 | $meta = wp_get_attachment_metadata( $attachment->ID ); |
|
| 3023 | if ( false !== strpos( $attachment->post_mime_type, '/' ) ) |
|
| 3024 | list( $type, $subtype ) = explode( '/', $attachment->post_mime_type ); |
|
| 3025 | else |
|
| 3026 | list( $type, $subtype ) = array( $attachment->post_mime_type, '' ); |
|
| 3027 | ||
| 3028 | $attachment_url = wp_get_attachment_url( $attachment->ID ); |
|
| 3029 | ||