[wp-trac] [WordPress Trac] #18561: Better Way to Insert Things Below Individual Posts
WordPress Trac
wp-trac at lists.automattic.com
Fri Sep 2 16:36:54 UTC 2011
#18561: Better Way to Insert Things Below Individual Posts
-------------------------+------------------------------
Reporter: jane | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.2.1
Severity: minor | Resolution:
Keywords: |
-------------------------+------------------------------
Comment (by chipbennett):
After reading over all of the comments, my initial opinion is that hacking
up `get_template_part()` really isn't the best approach. I think the
`the_rest()` idea has merit (although we need to come up with a ''much''
more semantic name for the function).
However, if the intent is to implement standard hooks, then let's just do
that: define and implement standard hooks. [http://www.wptavern.com/forum
/themes-templates/494-standard-theme-hook-names.html The idea was brought
up a long time ago], but as far as I could tell, no consensus was ever
reached.
So, I propose that we do this, and we do it right, the first time:
* Standardize on a hook nomenclature
* Standardize a list of Theme "locations" for which action hooks are
appropriate
* Wrap those hooks in template tags, as with `wp_head()` and `wp_footer()`
* Require Themes to implement the template tags, as is currently required
for `wp_head()` and `wp_footer()`
In the long run, this approach has all the benefits of both the
`get_template_part_{hook}` approach and the `the_rest()` approach, and
will be far more flexible for Themes, Plugins, AND core.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18561#comment:83>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list