Opened 13 years ago
Closed 13 years ago
#21053 closed defect (bug) (duplicate)
Backwards logic in get_attachment_template
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.4 |
Component: | Template | Keywords: | has-patch |
Focuses: | Cc: |
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
@
13 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.
Note: See
TracTickets for help on using
tickets.
Reverse order of attachment template hierarchy.