[wp-trac] [WordPress Trac] #21506: Standard Theme Hooks
WordPress Trac
wp-trac at lists.automattic.com
Mon Aug 20 21:05:33 UTC 2012
#21506: Standard Theme Hooks
---------------------------+------------------------------
Reporter: mfields | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version:
Severity: normal | Resolution:
Keywords: |
---------------------------+------------------------------
Comment (by greenshady):
Replying to [comment:29 mfields]:
> Perhaps "after" is not the best naming convention. This relative
relationship naturally suggests that something is missing. maybe it would
be better represented as ()using westi's suggestion about functions:
>
> * wp_masthead()
> * wp_post()
> * wp_comment()
> * wp_colophon()
That makes a lot more sense and would solve the issues I have with the
initial proposed list. It's just natural to assume there's a "before" if
an "after" exists. This would also give theme developers a little more
flexibility as to where to add the hooks.
> The only situation I could see an end-user directly interfacing with
these hooks is in a parent-child theme relationship. Is this where you see
users using hooks?
Definitely. All my theme users use child themes. It's been a requirement
for support at my site for the last four years.
> > But, probably the most-used of all hooks in my themes would be the
equivalent of `content_before`.
>
> Interesting. What are some examples of the code printed using this hook?
Most often, users are adding an extra sidebar or banners/ads there. But,
since we're not really addressing users here, it's not really relevant
anymore.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21506#comment:30>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list