[wp-trac] [WordPress Trac] #15337: fix get_attachment_template() to pass templates array
WordPress Trac
wp-trac at lists.automattic.com
Mon Nov 8 02:35:07 UTC 2010
#15337: fix get_attachment_template() to pass templates array
--------------------------+-------------------------------------------------
Reporter: willnorris | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version:
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
Comment(by willnorris):
to be honest, I also think that order it attempts the templates is
completely backwards. For an "image/jpeg" attachment, it currently
attempts:
- image.php
- jpeg.php
- image_jpeg.php
- attachment.php
the mime-type portion of this list is going from general to specific...
shouldn't it instead start by looking for the most specific template, and
then back off to the most general? so ...
- image_jpeg.php
- jpeg.php
- image.php
- attachment.php
Now I realize this is not something that can be easily changed since it
could potentially break a number of themes. Though I'd be highly
surprised if there are that many themes that have different templates for
"image.php" and "image_jpeg.php".
perhaps this should be filed as a separate bug so it can be discussed, and
not hold up this other patch?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15337#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list