Changeset 23516
- Timestamp:
- 02/28/2013 06:02:26 PM (12 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/jquery/jquery-migrate.js
r23421 r23516 1 1 /*! 2 * jQuery Migrate - v1.1. 0 - 2013-01-312 * jQuery Migrate - v1.1.1 - 2013-02-16 3 3 * https://github.com/jquery/jquery-migrate 4 4 * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT 5 5 */ 6 6 (function( jQuery, window, undefined ) { 7 "use strict"; 7 // See http://bugs.jquery.com/ticket/13335 8 // "use strict"; 8 9 9 10 … … 79 80 80 81 81 var attrFn = {},82 var attrFn = jQuery( "<input/>", { size: 1 } ).attr("size") && jQuery.attrFn, 82 83 oldAttr = jQuery.attr, 83 84 valueAttrGet = jQuery.attrHooks.value && jQuery.attrHooks.value.get || … … 91 92 92 93 // jQuery.attrFn 93 migrateWarnProp( jQuery, "attrFn", attrFn , "jQuery.attrFn is deprecated" );94 migrateWarnProp( jQuery, "attrFn", attrFn || {}, "jQuery.attrFn is deprecated" ); 94 95 95 96 jQuery.attr = function( elem, name, value, pass ) { … … 97 98 nType = elem && elem.nodeType; 98 99 99 // Since pass is used internally, we only warn and shim for new jQuery 100 // versions where there isn't a pass arg in the formal params 101 if ( pass && oldAttr.length < 4 ) { 102 migrateWarn("jQuery.fn.attr( props, pass ) is deprecated"); 103 if ( elem && !rnoAttrNodeType.test( nType ) && jQuery.isFunction( jQuery.fn[ name ] ) ) { 100 if ( pass ) { 101 // Since pass is used internally, we only warn for new jQuery 102 // versions where there isn't a pass arg in the formal params 103 if ( oldAttr.length < 4 ) { 104 migrateWarn("jQuery.fn.attr( props, pass ) is deprecated"); 105 } 106 if ( elem && !rnoAttrNodeType.test( nType ) && 107 (attrFn ? name in attrFn : jQuery.isFunction(jQuery.fn[name])) ) { 104 108 return jQuery( elem )[ name ]( value ); 105 109 } … … 238 242 }; 239 243 240 matched = jQuery.uaMatch( navigator.userAgent ); 241 browser = {}; 242 243 if ( matched.browser ) { 244 browser[ matched.browser ] = true; 245 browser.version = matched.version; 246 } 247 248 // Chrome is Webkit, but Webkit is also Safari. 249 if ( browser.chrome ) { 250 browser.webkit = true; 251 } else if ( browser.webkit ) { 252 browser.safari = true; 253 } 254 255 jQuery.browser = browser; 244 // Don't clobber any existing jQuery.browser in case it's different 245 if ( !jQuery.browser ) { 246 matched = jQuery.uaMatch( navigator.userAgent ); 247 browser = {}; 248 249 if ( matched.browser ) { 250 browser[ matched.browser ] = true; 251 browser.version = matched.version; 252 } 253 254 // Chrome is Webkit, but Webkit is also Safari. 255 if ( browser.chrome ) { 256 browser.webkit = true; 257 } else if ( browser.webkit ) { 258 browser.safari = true; 259 } 260 261 jQuery.browser = browser; 262 } 256 263 257 264 // Warn if the code tries to get jQuery.browser 258 migrateWarnProp( jQuery, "browser", browser, "jQuery.browser is deprecated" );265 migrateWarnProp( jQuery, "browser", jQuery.browser, "jQuery.browser is deprecated" ); 259 266 260 267 jQuery.sub = function() { … … 279 286 return jQuerySub; 280 287 }; 288 289 290 // Ensure that $.ajax gets the new parseJSON defined in core.js 291 jQuery.ajaxSetup({ 292 converters: { 293 "text json": jQuery.parseJSON 294 } 295 }); 281 296 282 297 … … 368 383 rhoverHack = /(?:^|\s)hover(\.\S+|)\b/, 369 384 hoverHack = function( events ) { 370 if ( typeof( events ) != "string" || jQuery.event.special.hover ) {385 if ( typeof( events ) !== "string" || jQuery.event.special.hover ) { 371 386 return events; 372 387 } … … 463 478 // Turn global events into document-triggered events 464 479 jQuery.event.trigger = function( event, data, elem, onlyHandlers ){ 465 if ( !elem & !rajaxEvent.test( event ) ) {480 if ( !elem && !rajaxEvent.test( event ) ) { 466 481 migrateWarn( "Global events are undocumented and deprecated" ); 467 482 } -
trunk/wp-includes/script-loader.php
r23507 r23516 133 133 $scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ) ); 134 134 $scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.9.1' ); 135 $scripts->add( 'jquery-migrate', '/wp-includes/js/jquery/jquery-migrate.js', array(), '1.1. 0' );135 $scripts->add( 'jquery-migrate', '/wp-includes/js/jquery/jquery-migrate.js', array(), '1.1.1' ); 136 136 137 137 // full jQuery UI
Note: See TracChangeset
for help on using the changeset viewer.