Changeset 22865
- Timestamp:
- 11/27/2012 02:58:08 PM (12 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/media-editor.js
r22847 r22865 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 ); -
trunk/wp-includes/js/media-models.js
r22842 r22865 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 … … 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 ); … … 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 -
trunk/wp-includes/js/media-views.js
r22851 r22865 12 12 media.view.settings = l10n.settings || {}; 13 13 delete l10n.settings; 14 15 // Copy the `postId` setting over to the model settings. 16 media.model.settings.postId = media.view.settings.postId; 14 17 15 18 // Check if the browser supports CSS 3.0 transitions -
trunk/wp-includes/script-loader.php
r22833 r22865 325 325 'saveAttachmentNonce' => wp_create_nonce( 'save-attachment' ), 326 326 'ajaxurl' => admin_url( 'admin-ajax.php', 'relative' ), 327 'postId' => 0, 327 328 ), 328 329 ) );
Note: See TracChangeset
for help on using the changeset viewer.