[theme-reviewers] Bundling libraries and prefixing
otto at ottodestruct.com
Wed Mar 26 12:34:46 UTC 2014
On Wed, Mar 26, 2014 at 1:26 AM, Konstantin Kovshenin
<kovshenin at gmail.com>wrote:
> Here's a follow-up question.
> Given that a theme has used a non-prefixed generic name for a bundled
> script, how could we ensure it doesn't break when core introduces the
> same handle but with a different version? Masonry v3 in 3.9 for
> example :)
If two bits of code loaded the same script with two different names, then
they'd both load, and that would most likely cause breakage too. So you
can't win here.
Best to choose the most obvious name based on the source of the script, so
that hopefully both of them don't load and only one of them does. This may
break, but it's less likely to break than loading two different versions of
the same script is.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the theme-reviewers