[theme-reviewers] Standard Theme Hooks

Philip M. Hofer (Frumph) philip at frumph.net
Fri Nov 2 20:37:15 UTC 2012

.. I was in the middle of writing something exactly the same as Justin, but 
he wrote it better (like always)

- Phil

-----Original Message----- 
From: Justin Tadlock
Sent: Friday, November 02, 2012 1:28 PM
To: theme-reviewers at lists.wordpress.org
Subject: Re: [theme-reviewers] Standard Theme Hooks

I'm all for some standardization of theme hooks.  I like the THA ideas
better at the moment than the proposal in the ticket.  The only reason I
don't use the THA hooks right now is that I've already got a hook system
in place for my themes.  Given that my themes were some of the first to
incorporate hooks other than wp_head and wp_footer back in 2008, I've
got many 1,000s of users to account for.  It'd be
backwards-compatibility nightmare to change to anything other that
what's officially supported by core.

What I'd really like to see is the Theme Review team come up with a
standard system and start recommending it.  After a major version of
WordPress has passed and getting theme developers on board, then we can
start discussing adding the hooks to core.  It's not something that can
change overnight, so this would be the first place to start.

There's also things that can be done in core now to bypass themes
altogether.  For example, the "get_template_part_{$slug}" hook is fired
before the template is included.  It'd be easy to add a hook afterwards

Before we get started on any new hooks to themes, we should be
identifying areas in WordPress core where we could add hooks so that we
don't have to rely on theme developers.  Another thing we could do is
make a list of the little-known hooks that are available already.  For
example, I bet a lot of developers don't know about these hooks:
the_post, loop_start, loop_end.

On 11/2/2012 12:59 PM, Michael Fields wrote:
> Hi Theme Review Team,
> It was great to finally meet a few of you in Tybee earlier this week. One 
> topic that came up at least three times was that of standard theme hooks. 
> Many people (including myself) are interested in seeing something along 
> these lines officially accepted by the WordPress community. I was 
> wondering if it might be possible to work out a recommended set of theme 
> hooks that could be added as part of the review guidelines.
> There are currently two ideas on the table:
> 1. Theme Hook Alliance ......... 
> https://github.com/zamoose/themehookalliance
> 2. Core ticket #21506 .......... 
> http://core.trac.wordpress.org/ticket/21506
> While I personally like how #2 keeps things concise I also see a benefit 
> in the flexibility provided by the Theme Hook Alliance.
> I would love to reach on consensus here so that we all can start using 
> standard hooks :)
> What do you think?
> Thanks!
> -Mike
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers

theme-reviewers mailing list
theme-reviewers at lists.wordpress.org

More information about the theme-reviewers mailing list