Changeset 24652
- Timestamp:
- 07/11/2013 12:20:36 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
wp-admin/js/revisions.js (modified) (1 diff)
-
wp-includes/js/media-models.js (modified) (2 diffs)
-
wp-includes/js/wp-util.js (modified) (4 diffs)
-
wp-includes/script-loader.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/js/revisions.js
r24646 r24652 208 208 }); 209 209 210 var deferred = wp. xhr.send( options );210 var deferred = wp.ajax.send( options ); 211 211 var requests = this.requests; 212 212 -
trunk/wp-includes/js/media-models.js
r24369 r24652 102 102 * 103 103 * Sends a POST request to WordPress. 104 * See wp. xhr.post() in `wp-includes/js/wp-util.js`.104 * See wp.ajax.post() in `wp-includes/js/wp-util.js`. 105 105 */ 106 post: wp. xhr.post,106 post: wp.ajax.post, 107 107 108 108 /** … … 110 110 * 111 111 * Sends an XHR request to WordPress. 112 * See wp. xhr.send() in `wp-includes/js/wp-util.js`.112 * See wp.ajax.send() in `wp-includes/js/wp-util.js`. 113 113 */ 114 ajax: wp. xhr.send,114 ajax: wp.ajax.send, 115 115 116 116 // Scales a set of dimensions to fit within bounding dimensions. -
trunk/wp-includes/js/wp-util.js
r24369 r24652 29 29 }); 30 30 31 // wp. xhr31 // wp.ajax 32 32 // ------ 33 33 // 34 34 // Tools for sending ajax requests with JSON responses and built in error handling. 35 35 // Mirrors and wraps jQuery's ajax APIs. 36 wp. xhr= {37 settings: settings. xhr|| {},36 wp.ajax = { 37 settings: settings.ajax || {}, 38 38 39 39 /** 40 * wp. xhr.post( [action], [data] )40 * wp.ajax.post( [action], [data] ) 41 41 * 42 42 * Sends a POST request to WordPress. … … 47 47 */ 48 48 post: function( action, data ) { 49 return wp. xhr.send({49 return wp.ajax.send({ 50 50 data: _.isObject( action ) ? action : _.extend( data || {}, { action: action }) 51 51 }); … … 53 53 54 54 /** 55 * wp. xhr.send( [action], [options] )55 * wp.ajax.send( [action], [options] ) 56 56 * 57 57 * Sends a POST request to WordPress. … … 71 71 options = _.defaults( options || {}, { 72 72 type: 'POST', 73 url: wp. xhr.settings.url,73 url: wp.ajax.settings.url, 74 74 context: this 75 75 }); -
trunk/wp-includes/script-loader.php
r24578 r24652 270 270 $scripts->add( 'wp-util', "/wp-includes/js/wp-util$suffix.js", array('underscore', 'jquery'), false, 1 ); 271 271 did_action( 'init' ) && $scripts->localize( 'wp-util', '_wpUtilSettings', array( 272 ' xhr' => array(272 'ajax' => array( 273 273 'url' => admin_url( 'admin-ajax.php', 'relative' ), 274 274 ),
Note: See TracChangeset
for help on using the changeset viewer.