[theme-reviewers] No hook prefix

Shinra Web Holdings contact at shinraholdings.com
Wed Sep 26 00:40:14 UTC 2012

One idea for minimizing potential conflict is to require a framework used
in multiple themes to consistently check/declare a constant unique to that
framework before it adds anything to the public namespace.

If the correct version is already defined, don't redeclare anything with
the framework namespace, and just load the non-framework theme stuff as
normal. This way the framework won't declare over itself if somehow
multiple themes using it are concurrently active, and since the framework
code would be identical in both places, both themes would function as

On Tue, Sep 25, 2012 at 7:04 PM, Shinra Web Holdings <
contact at shinraholdings.com> wrote:

> I think an author based namespace goes too far, but I don't see any reason
> why a theme has to have just one namespace which is unique from other
> themes. Is there ever a situation in which two themes would be active on
> the same individual site at once?
> On Tue, Sep 25, 2012 at 6:36 PM, Otto <otto at ottodestruct.com> wrote:
>> 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
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20120925/65b08f62/attachment.htm>

More information about the theme-reviewers mailing list