[theme-reviewers] Inline Scripts

Chandra Maharzan maharzan at gmail.com
Wed Aug 29 02:20:49 UTC 2012


I see people are using wp_enqueue_script ( 'jquery' ); in header.php,
similarly to comments-reply. Shouldn't these be coming from
functions.php and hooked to appropriate hook ?

On Wed, Aug 29, 2012 at 7:30 AM, 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()/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 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
>



-- 
cmans


More information about the theme-reviewers mailing list