[wp-trac] [WordPress Trac] #18561: Better Way to Insert Things Below Individual Posts
WordPress Trac
wp-trac at lists.automattic.com
Wed Dec 21 12:51:35 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):
Replying to [comment:106 GaryJ]:
The reason I'm proposing a set of hooks is because I'm thinking ''beyond''
just the after-post action hook. While ''right now'', the after-post
template location might be the most important one to address, in the long
run, it would facilitate standardization for a full set of hooks to be
created at once, rather than try to add them piece-meal later on.
So, hopefully without hijacking this ticket too much, my thought for the
best approach is:
1) Decide on the template locations for which action hooks should be
defined
2) Create a standard naming convention for those action hooks (e.g.
`post_before` vs `before_post` vs `post_pre` vs `pre_post`)
For example, the template locations might be:
* body_before
* header_before
* header_after
* content_before
* loop_before
* post_before
* post_after
* post_comments_before
* post_comments_after
* loop_after
* content_after
* footer_before
* footer_after
* body_after
See, there really aren't that many to define. And if we need some dynamic
hooks, based on `get_*()` calls for template parts (these could be fired
by core, via the `get_*()` call):
* sidebar_before
* sidebar_after
* sidebar_{slug}_before
* sidebar_{slug}_after
* search_form_before
* search_form_after
* template_part_{slug}_before
* template_part_{slug}_after
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18561#comment:108>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list