[theme-reviewers] Inline Scripts

Chip Bennett chip at chipbennett.net
Wed Aug 29 02:27:29 UTC 2012


Just as Justin said.

The guidelines refer to script (and stylesheet) *links* in the document
head.

There may be cases where a script can be enqueued inline, but not always.
Outside of the document *head* or *footer*, inline scripts (and styles) are
not inherently prohibited.

Thanks,

Chip

On Tue, Aug 28, 2012 at 8:45 PM, Justin Tadlock <justin at justintadlock.com>wrote:

>  Yes, inline scripts and styles are allowed.  Sometimes, they're actually
> needed or a better way to handle something.
>
>
> On 8/28/2012 8:33 PM, Vicky Arulsingam wrote:
>
> Are theme developers allowed to include inline scripts in template files?
>
>  As per Code:
>
>  Themes are *required* to enqueue all stylesheets and scripts, using
> wp_enqueue_style()<http://codex.wordpress.org/Function_Reference/wp_enqueue_style>
> /wp_enqueue_script()<http://codex.wordpress.org/Function_Reference/wp_enqueue_script>,
> and hooked into an appropriate hook via callback function, rather than
> hard-coding stylesheet/script links or tags in the template.
>
>
>  My understanding of this is that inline scripts should not be hard-coded
> in template files.
>
>  This is with regards to this ticket:
> http://themes.trac.wordpress.org/ticket/9227
>
>  -----
> Vicky Arulsingam
>
>
>
> _______________________________________________
> theme-reviewers mailing listtheme-reviewers at lists.wordpress.orghttp://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/20120828/5fd53937/attachment-0001.htm>


More information about the theme-reviewers mailing list