[theme-reviewers] No hook prefix
Otto
otto at ottodestruct.com
Tue Sep 25 23:36:48 UTC 2012
On Tue, Sep 25, 2012 at 6:10 PM, Justin Tadlock
<justin at justintadlock.com> wrote:
> One of the things that I've wanted to do is use a standardized hook system
> across all my themes. However, as per the guidelines, this is not an option
> because themes require a unique prefix:
> http://codex.wordpress.org/Theme_Review#Theme_Namespacing
The purpose of theme namespacing is the same as that for plugin
namespacing, to make sure things don't conflict with each other. In
the case of themes, the fact that themes run one-per-site sorta makes
that a moot point, as long as the prefix being used is careful to not
conflict with plugin names and such.
However, that is somewhat of a superficial viewpoint, once you
consider multisite. It's conceivable that a plugin running across a
multisite network could cause unintended side-effects on other sites,
if their themes share hook names and the plugin references those.
So, in general, I'm okay with using the same prefix across
multiple-themes as long as you take that aspect into account and
choose-wisely as to what your hook names are and what they are
intended to do.
Also, note that rules can have exceptions. I like the fact that the
review team consists of real people and not just something like
theme-check for that reason. That said, if theme-check is actually
blocking based on this, then some clarification of the guidelines
might be in order.
-Otto
More information about the theme-reviewers
mailing list