| 912 | | * The attachment path first checks if the first part of the mime type exists. |
| 913 | | * The second check is for the second part of the mime type. The last check is |
| 914 | | * for both types separated by an underscore. If neither are found then the file |
| 915 | | * 'attachment.php' is checked and returned. |
| | 912 | * Will first look for 'attachment-{mime_type[0]}.php', |
| | 913 | * The second check is for 'attachment-{mime_type[1]}.php', The third check |
| | 914 | * is for 'attachment-{mime_type[0]}_{mime_type[1]}.php'. The last check is |
| | 915 | * for 'attachment.php'. |
| 927 | | if ( $template = get_query_template($type[0]) ) |
| 928 | | return $template; |
| 929 | | elseif ( $template = get_query_template($type[1]) ) |
| 930 | | return $template; |
| 931 | | elseif ( $template = get_query_template("$type[0]_$type[1]") ) |
| 932 | | return $template; |
| 933 | | else |
| 934 | | return get_query_template('attachment'); |
| | 927 | |
| | 928 | $template = array(); |
| | 929 | $templates[] = "attachment-{$type[0]}_{$type[1]}.php"; |
| | 930 | $templates[] = "attachment-{$type[1]}.php"; |
| | 931 | $templates[] = "attachment-{$type[0]}.php"; |
| | 932 | $templates[] = "attachment.php"; |
| | 933 | |
| | 934 | return apply_filters('attachment_template', locate_template($templates)); |