[wp-trac] [WordPress Trac] #41737: Possibly redundant template files in the hierarchy
WordPress Trac
noreply at wordpress.org
Sun Aug 27 20:41:18 UTC 2017
#41737: Possibly redundant template files in the hierarchy
-------------------------+-----------------------------
Reporter: danburzo | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords:
Focuses: template |
-------------------------+-----------------------------
Hi,
As I'm building https://forklor.github.io/wp-template-hierarchy/ (still a
work in progress) and sifting through the source code, it looks like the
following template files in the hierarchy may be redundant:
1. `${subtype}.php` for attachments — is there a need for a template for a
subtype without its associated `${mime_type}`? Is there a use-case am I
missing where a subtype may be associated with different mime types?
2. `attachment.php` can be caught in `single-attachment.php`.
For the sake of simplifying WP's API surface, I am proposing deprecating
these templates in a future version.
And as a related question (let me know if I should open a separate issue),
to preserve symmetry with other post types and and pages, should a Custom
Post Template set for an attachment not get priority before the other
attachment templates?
(Please let me know if I misunderstood anything!)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41737>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list