[theme-reviewers] Bundling libraries and prefixing

Chip Bennett chip at chipbennett.net
Wed Mar 26 13:35:54 UTC 2014


Email me off-list. We (admins) will facilitate the contact.


On Wed, Mar 26, 2014 at 9:22 AM, Konstantin Kovshenin
<kovshenin at gmail.com>wrote:

> Masonry v2 is a jQuery plugin, so it's jquery-masonry which has been
> in core for over a year. Not sure why themes still bundle their own
> script, maybe they're super old, haven't checked. Masonry v3's handle
> is just masonry because it doesn't use jQuery anymore. jquery-masonry
> became the shim that provides limited backwards compatibility with v2
> and has a jQuery dependency.
>
> So if themes used core's jquery-masonry before 3.9 they're probably
> going to be fine. If they bundled their own jquery masonry and called
> it masonry, there's a good chance they will break :)
>
> What is the best way to reach out to the authors of the following
> themes (rather than scraping their e-mail addresses and contact forms
> by hand)?
>
> http://pastebin.com/jaaRqjiS
>
> Thanks!
>
> On Wed, Mar 26, 2014 at 5:10 PM, Chip Bennett <chip at chipbennett.net>
> wrote:
> > I would recommend working directly with the developers of the 20 Themes.
> >
> > This situation does help clarify what our guidelines should be regarding
> > Theme-bundled, third-party scripts. I think the Guidelines supported this
> > already, but: only *custom* scripts bundled with the Theme should use a
> > theme-prefixed handle. A third-party script should use a non-prefixed
> > handle.
> >
> > Is there a nomenclature standard for such scripts? e.g. Would Masonry's
> > handle be 'masonry' or 'jquery-masonry', etc.?
> >
> >
> > On Wed, Mar 26, 2014 at 8:50 AM, Konstantin Kovshenin <
> kovshenin at gmail.com>
> > wrote:
> >>
> >> That's if both pieces of code try to load the script, yes, but core's
> >> situation is a bit different.
> >>
> >> We'll end up loading (plain, non-jQuery) Masonry v3 when a theme used
> >> that handle to load its own jQuery Masonry v2. If the theme uses a
> >> prefixed themename-masonry handle it will keep working.
> >>
> >> Basically what I'm asking is for Otto to weigh in on
> >> https://core.trac.wordpress.org/ticket/27510 :)
> >>
> >> Maybe we can change core's handle for the sake of the 20 or so
> >> affected themes, maybe we can notify the authors, or maybe we can just
> >> fix it and let reviewers know going forward.
> >>
> >> On Wed, Mar 26, 2014 at 4:34 PM, Otto <otto at ottodestruct.com> wrote:
> >> > 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.
> >> >
> >> > -Otto
> >> >
> >> >
> >> > _______________________________________________
> >> > theme-reviewers mailing list
> >> > theme-reviewers at lists.wordpress.org
> >> > http://lists.wordpress.org/mailman/listinfo/theme-reviewers
> >> >
> >>
> >>
> >>
> >> --
> >> Konstantin
> >> _______________________________________________
> >> 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
> >
>
>
>
> --
> Konstantin
> _______________________________________________
> 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/20140326/de3320f8/attachment-0001.html>


More information about the theme-reviewers mailing list