WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#12106 closed defect (bug) (worksforme)

get_attachment_template needs namespace

Reported by: ptahdunbar Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Template Keywords: has-patch close
Focuses: Cc:

Description

For consistency with the other template types, attachment based templates should have 'attachment' prepended to the template files.

Also fixed the order it looks for mime types from most specific to more generic:

  • attachment-{$type[0]}_{$type[1]}.php
  • attachment-{$type[1]}.php
  • attachment-{$type[0]}.php
  • attachment.php

Attachments (1)

attachment_fix.diff (1.8 KB) - added by ptahdunbar 4 years ago.

Download all attachments as: .zip

Change History (3)

ptahdunbar4 years ago

comment:1 nacin4 years ago

  • Keywords close added

This isn't the least backwards compatible.

It's probably best to leave it alone. I referenced filesystem namespace clutter in #12105 but I just think we shouldn't introduce more namespace collision issues -- the current ones we can live with.

comment:2 nacin4 years ago

  • Milestone 3.0 deleted
  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.