[theme-reviewers] Is after_setup_theme required?
myazalea
myazalea at hotmail.com
Thu May 15 21:40:47 UTC 2014
But what is the correct hook is not that well documented. If you look at the codex for register_nav_menu it doesn't mention any hooks, and for add_theme_support it sais "if" attached to a hook.
It seems more like advice than requirement.
I'll try to be more specific, but right now it's just too late ;)
Skickat från min Samsung Mobil
<div>-------- Originalmeddelande --------</div><div>Från: Justin Tadlock <justin at justintadlock.com> </div><div>Datum:15-05-2014 20:12 (GMT+01:00) </div><div>Till: "Discussion list for WordPress theme reviewers." <theme-reviewers at lists.wordpress.org> </div><div>Rubrik: Re: [theme-reviewers] Is after_setup_theme required? </div><div>
</div>
What's required is that themes appropriately execute their code on the
correct hook rather than arbitrarily executing it in `functions.php`. If
something should be done on the `after_setup_theme` hook, the theme author
should create a function and execute his or her code on that hook.
On Thu, May 15, 2014 at 1:00 PM, Ulrich Pogson <grapplerulrich at gmail.com>wrote:
> The way I understand it, the reason you use `after_setup_theme` is so
> that the code is run only when needed for the theme. If it is not mentioned
> in the guidelines then I would it is highly recommended.
>
>
> On 15 May 2014 18:41, carolina poena <myazalea at hotmail.com> wrote:
>
>> Is using after_setup_theme required when adding register_nav_menu,
>> add_theme_support, load_theme_textdomain etc,
>> or is using init allowed?
>>
>>
>> _______________________________________________
>> 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
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20140515/98f8fcd0/attachment-0001.html>
-------------- next part --------------
_______________________________________________
theme-reviewers mailing list
theme-reviewers at lists.wordpress.org
http://lists.wordpress.org/mailman/listinfo/theme-reviewers
More information about the theme-reviewers
mailing list