[theme-reviewers] Enqueue scripts from CDN
Otto
otto at ottodestruct.com
Tue Aug 6 18:45:45 UTC 2013
On Tue, Aug 6, 2013 at 1:37 PM, Ola Łączek <ola at bodera.com> wrote:
> Is it ok for theme author to enqueue scripts directly from CDN, and not
> include them with the theme?
> Example: <script
> src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
No. Themes need to be stand-alone, because not everybody runs
WordPress on the public internet.
A surprising amount of places run WordPress based systems on their
internal servers. In such a case, the people accessing the site might
not have unrestricted internet access, and may not be able to get code
from googlecode.com. In such a case, the theme would be broken for
those users.
> And one more thing - is it ok to put scripts directly in header.php in
> conditional IE comments (<!--[if lt IE 9]> <![endif]-->)
Specifically for the HTML5 shiv, I'd say that it's acceptable. The
default themes do this too, but they include an html5.js in the theme
itself. I'd recommend copying that approach.
-Otto
More information about the theme-reviewers
mailing list