[wp-trac] [WordPress Trac] #34278: Add support for embeds in the theme template hierarchy
WordPress Trac
noreply at wordpress.org
Sun Feb 21 15:09:58 UTC 2016
#34278: Add support for embeds in the theme template hierarchy
-----------------------------------------------+------------------------
Reporter: johnbillion | Owner:
Type: task (blessed) | Status: reviewing
Priority: normal | Milestone: 4.5
Component: Embeds | Version: 4.4
Severity: normal | Resolution:
Keywords: has-patch 4.5-early needs-testing | Focuses: template
-----------------------------------------------+------------------------
Comment (by Otto42):
Post types are created in plugins. If you need to include a special embed
format for a post type, then that format should really be in the same
plugin that contains the post type. It doesn't make a whole lot of sense
to include post-type support for them in the theme, because the theme
doesn't necessarily need to know about the post types. Post types and
themes don't really mix well.
I'm not saying that post types can't get special embed handlers, but
separation of concerns means that it makes more sense to include said
embed handler in the plugin where the post type is created in the first
place.
For example, for your code snippet post type, the plugin that adds this
could hook in and include the embed-code in that plugin, and then the
theme would remain independent of it and available for use elsewhere.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34278#comment:33>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list