@@ 3080-3083 (lines=4) @@ | ||
3077 | return; |
|
3078 | ||
3079 | $meta = wp_get_attachment_metadata( $attachment->ID ); |
|
3080 | if ( false !== strpos( $attachment->post_mime_type, '/' ) ) |
|
3081 | list( $type, $subtype ) = explode( '/', $attachment->post_mime_type ); |
|
3082 | else |
|
3083 | list( $type, $subtype ) = array( $attachment->post_mime_type, '' ); |
|
3084 | ||
3085 | $attachment_url = wp_get_attachment_url( $attachment->ID ); |
|
3086 | $base_url = str_replace( wp_basename( $attachment_url ), '', $attachment_url ); |
@@ 599-603 (lines=5) @@ | ||
596 | $templates = array(); |
|
597 | ||
598 | if ( $attachment ) { |
|
599 | if ( false !== strpos( $attachment->post_mime_type, '/' ) ) { |
|
600 | list( $type, $subtype ) = explode( '/', $attachment->post_mime_type ); |
|
601 | } else { |
|
602 | list( $type, $subtype ) = array( $attachment->post_mime_type, '' ); |
|
603 | } |
|
604 | ||
605 | if ( ! empty( $subtype ) ) { |
|
606 | $templates[] = "{$type}-{$subtype}.php"; |