[wp-trac] [WordPress Trac] #21506: Standard Theme Hooks

WordPress Trac noreply at wordpress.org
Fri Feb 22 19:02:56 UTC 2013


#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:65 chipbennett]:
 > I agree that the hooks would be helpful, but I don't think they would
 solve the issue of Themes defining semantic template locations.

 Semantic template locations is not the issue at hand.  We're trying to
 make it easier for plugins to hook into common areas to output data.  All
 these template location hooks seem to be more of an advanced child theme
 user feature than something plugins need.  The focus should be on specific
 areas that plugins need help with.

 The only two hooks that I see as serving a purpose from the initial
 proposed list are `post_after` and `comment_after` (with the better
 proposed names like `wp_post` and `wp_comment`).

 As far as template location hooks go, I don't think this is something core
 really needs to address.  Themes have already gotten complicated enough.
 More PHP is just making the barrier to entry for new theme devs even
 tougher and complicating matters for users who like to tinker with
 templates.  This is one of the major reasons I've been removing these
 hooks from my new themes.

 I was one of the original theme authors to pioneer the use of template
 hooks.  They were meant to solve one problem:  Allow theme users to add
 stuff into a parent theme because WordPress did not allow child themes to
 overwrite templates.  Now, with the ability to overwrite templates and the
 `get_template_part()` function, template hooks are becoming rather
 useless.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21506#comment:67>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list