[wp-trac] [WordPress Trac] #16494: Remove "no conflict" mode from bundled jquery
WordPress Trac
wp-trac at lists.automattic.com
Fri Jul 29 14:38:40 UTC 2011
#16494: Remove "no conflict" mode from bundled jquery
--------------------------------+------------------------------
Reporter: lloydbudd | Owner:
Type: enhancement | Status: new
Priority: low | Milestone: Awaiting Review
Component: External Libraries | Version: 3.1
Severity: minor | Resolution:
Keywords: close |
--------------------------------+------------------------------
Comment (by aaroncampbell):
Replying to [comment:24 azaozz]:
> Don't think we should change this. If we remove `noConflict()` we are
basically banning the use of Prototype.js in WordPress. If it's a hook,
plugins can remove it and still ban Prototype, i.e. introduce unsolvable
JS libraries conflict.
I think you make a good point, my only counter point would be that we have
a LOT of hook that a plugin can hook into and break WordPress or other
plugins. The fact that someone CAN break things doesn't mean that
everyone will (although I'm sure there would be a few that do).
1. I see the best-case scenario (and least back-compat) as this: We remove
no conflict and plugins can add it back if they use prototype , mootools,
etc.
1. The second best option I see is the ability of a plugin to remove it.
I think it's less likely that a plugin would employ this as part of making
it's own JS work, and more likely that there would be a "jQuery remove no
conflict" plugin that people could install to try to fix some jQuery that
isn't working. Then again I tend toward optimist more than realist.
1. Leave it as it is. The biggest advantage is that we don't change
anything so back-compat is perfect, and also we protect people from one
kind of issue (accidentally excluding other JS libraries). The problem is
that we usually try to be flexible and allow a developer to do whatever
they want. I understand they still can if they include their own jQuery,
unregister ours and register theirs, but that's a lot of duplicated code
that could be avoided with a single filter.
Having said all that I'm fine with closing this as wontfix, I just wanted
make sure I advocated for my preference.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16494#comment:25>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list