Opened 14 years ago
Closed 14 years ago
#21053 closed defect (bug) (duplicate)
Backwards logic in get_attachment_template
| Reported by: | jfarthing84 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Template | Version: | 3.4 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
It seems to me that the logic in get_attachment_template is backwards. Aren't templates supposed to go from specific to general? All others do, except attachments. Let's fix that.
Attachments (2)
Change History (5)
#1
@
14 years ago
Also just noticed that with the most specific template, the intended result isn't even used. For instance, a JPEG image would be image_jpeg.php. However, get_query_template uses a regular expression that removes the underscore, thus changing the template it looks for to imagejpeg.php. I suggest that the underscore be changed to a dash, thus matching the WordPress file naming convention and avoiding this problem.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Reverse order of attachment template hierarchy.