Ticket #22588: 22588.3.diff
File 22588.3.diff, 3.0 KB (added by , 13 years ago) |
---|
-
wp-includes/js/media-editor.js
459 459 460 460 link: function( embed ) { 461 461 return media.post( 'send-link-to-editor', { 462 nonce: wp.media.view.settings.nonce.sendToEditor, 463 src: embed.linkUrl, 464 title: embed.title, 465 html: wp.media.string.link( embed ) 462 nonce: wp.media.view.settings.nonce.sendToEditor, 463 src: embed.linkUrl, 464 title: embed.title, 465 html: wp.media.string.link( embed ), 466 post_id: wp.media.view.settings.postId 466 467 }).done( function( resp ) { 467 468 wp.media.editor.insert( resp ); 468 469 }); -
wp-includes/js/media-views.js
12 12 media.view.settings = l10n.settings || {}; 13 13 delete l10n.settings; 14 14 15 // Copy the `postId` setting over to the model settings. 16 media.model.settings.postId = media.view.settings.postId; 17 15 18 // Check if the browser supports CSS 3.0 transitions 16 19 $.support.transition = (function(){ 17 20 var style = document.documentElement.style, -
wp-includes/js/media-models.js
235 235 236 236 // Set the action and ID. 237 237 options.data = _.extend( options.data || {}, { 238 action: 'save-attachment', 239 id: this.id, 240 nonce: media.model.settings.saveAttachmentNonce 238 action: 'save-attachment', 239 id: this.id, 240 nonce: media.model.settings.saveAttachmentNonce, 241 post_id: media.model.settings.postId 241 242 }); 242 243 243 244 // Record the values of the changed attributes. … … 268 269 var model = this; 269 270 270 271 return media.post( 'save-attachment-compat', _.defaults({ 271 id: this.id, 272 nonce: media.model.settings.saveAttachmentNonce 272 id: this.id, 273 nonce: media.model.settings.saveAttachmentNonce, 274 post_id: media.model.settings.postId 273 275 }, data ) ).done( function( resp, status, xhr ) { 274 276 model.set( model.parse( resp, xhr ), options ); 275 277 }); … … 609 611 options = options || {}; 610 612 options.context = this; 611 613 options.data = _.extend( options.data || {}, { 612 action: 'query-attachments' 614 action: 'query-attachments', 615 post_id: media.model.settings.postId 613 616 }); 614 617 615 618 // Clone the args so manipulation is non-destructive. -
wp-includes/script-loader.php
324 324 'settings' => array( 325 325 'saveAttachmentNonce' => wp_create_nonce( 'save-attachment' ), 326 326 'ajaxurl' => admin_url( 'admin-ajax.php', 'relative' ), 327 'postId' => 0, 327 328 ), 328 329 ) ); 329 330