[wp-trac] [WordPress Trac] #24132: Add jQuery 2.0 to available scripts to enqueue
WordPress Trac
noreply at wordpress.org
Fri Apr 19 10:54:13 UTC 2013
#24132: Add jQuery 2.0 to available scripts to enqueue
--------------------------------+------------------------------
Reporter: tw2113 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: External Libraries | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch |
--------------------------------+------------------------------
Comment (by ryanduff):
Replying to [comment:8 ocean90]:
> Having the handle `jquery2` is weird. What happens when we drop the 1.x
branch? What happens on jQuery 3.x. `jquery3`? It's inconsistent with our
current handle naming.
>
> It's means also that we need to support both versions more or less.
[[BR]]
Correct. Without handling both versions this issue is moot because I don't
see WordPress supporting jQuery out of the box. How else would you propose
switching between which version is enqueued if we were to enqueue both
under the handle of jquery? A constant that we check on in scripts-
loader.php? I think the general consensus is not to make new constants
either, if all possible.
As far as handling future versions, I think using jquery2 is appropriate
because it's such a huge jump. The thought was that once we finally
defaulted to jQuery 2.x, we'd update the 'jquery' handle to use that and
just deprecate the jquery2 handle.
[[BR]][[BR]]
> Patch should also include the minified version. We doesn't add
unminified versions of external scripts.
[[BR]]
Where's jquery.min.js in core? I couldn't find it. I have no issue with
adding a minified file, but I was consistent with what was there now-- an
unminified version of jquery. Not to mention there are a fair number of js
files included in core that aren't minified--
http://codex.wordpress.org/Function_Reference/wp_register_script#Handles_and_Their_Script_Paths_Registered_by_WordPress
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24132#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list