[wp-trac] [WordPress Trac] #22896: Prevent plugins from overriding jQuery in the admin
WordPress Trac
noreply at wordpress.org
Fri Jan 25 01:30:46 UTC 2013
#22896: Prevent plugins from overriding jQuery in the admin
------------------------------------+------------------
Reporter: nacin | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.6
Component: External Libraries | Version:
Severity: normal | Resolution:
Keywords: dev-feedback has-patch |
------------------------------------+------------------
Comment (by SergeyBiryukov):
Replying to [comment:33 auniquename]:
> Replying to [comment:30 azaozz]:
> > {{{
> > var myjq = jQuery.noConflict(true);
> > }}}
> >
> > Ref: http://api.jquery.com/jQuery.noConflict/#example-4
>
> I of course tried '''exactly that''' first (see long boring story
above). Like so:
>
> {{{
> var mypluginjq = jQuery.noConflict();
> }}}
Note that your code doesn't set the `removeAll` parameter, which tells
jQuery to remove all the variables from the global scope (including jQuery
itself). The link above is an example of loading two different jQuery
versions at the same time.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22896#comment:36>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list