[wp-trac] [WordPress Trac] #21053: Backwards logic in get_attachment_template

WordPress Trac wp-trac at lists.automattic.com
Sat Jun 23 15:01:27 UTC 2012


#21053: Backwards logic in get_attachment_template
--------------------------+------------------------------
 Reporter:  jfarthing84   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Template      |     Version:  3.4
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------

Comment (by jfarthing84):

 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.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21053#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list