[theme-reviewers] Integrating JavaScript

Chip Bennett chip at chipbennett.net
Fri Jul 15 17:37:20 UTC 2011

One of the big advantages of registering and enqueueing is that doing so
allows for Child Themes or Plugins to *dequeue*, or *deregister*. It also
allows for declaration of dependencies (for scripts), or adding IE
conditionals (for styles), and facilitates versioning, among other things.


On Fri, Jul 15, 2011 at 10:54 AM, esmi at quirm dot net <esmi at quirm.net>wrote:

> on 14/07/2011 13:14 Chip Bennett said the following:
>  Those scripts look fine to include; however, you will need to register and
>> enqueue them properly, using wp_register_script() and wp_enqueue_script(),
>> via a function hooked into the wp_enqueue_scripts hook.
> [Playing catch-up]
> This brings up a question that I'm pretty sure remained unanswered on the
> support forums. Is there any benefit to going through the full register then
> enqueue for a script compared to just dropping everything into an enqueue?
> Both methods seem to have equal weight in the Codex.
> Mel
> ______________________________**_________________
> theme-reviewers mailing list
> theme-reviewers at lists.**wordpress.org<theme-reviewers at lists.wordpress.org>
> http://lists.wordpress.org/**mailman/listinfo/theme-**reviewers<http://lists.wordpress.org/mailman/listinfo/theme-reviewers>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20110715/91526ae1/attachment.htm>

More information about the theme-reviewers mailing list