Skip to content

Move scripts and styles to functions.php and enqueue them there properly #18

Closed
wants to merge 2 commits into from

2 participants

@obenland

Since TwentyTwelve will serve as a best practice example for Theme Developers, I would be thrilled if we could move all scripts and styles to functions.php, to adhere to this guideline in the Theme Review process.

From what I understand, leaving the comment-reply script in header.php is technically still acceptable, but let's set a good example! :)

Maybe, to top it off, we could add a comment to that html5.js script in header.php, explaining that scripts wrapped in conditionals there, are okay.

@lancewillett

Thanks for this and your other two pull requests.

We discussed this already in core, see Nacin's comment here: http://core.trac.wordpress.org/ticket/19978#comment:4

I agree we should keep it in header.php for simplicity.

Also, a side note: default theme names have a space between "Twenty" and the number. (Twenty Twelve, not TwentyTwelve.) :)

@obenland
obenland commented Apr 5, 2012

Thank you for your consideration, Lance!
I hope I'll get the chance to contribute in the future. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.