Correctly access the nonce to save attachment fields. Fixes firing attachment_fields_to_save.

Props koopersmith
fixes #22577


git-svn-id: http://core.svn.wordpress.org/trunk@22842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ryan Boren 2012-11-26 15:07:36 +00:00
parent 7469f91bc7
commit 2105efa5bf

View File

@ -269,7 +269,7 @@ window.wp = window.wp || {};
return media.post( 'save-attachment-compat', _.defaults({
id: this.id,
nonce: l10n.saveAttachmentNonce
nonce: media.model.settings.saveAttachmentNonce
}, data ) ).done( function( resp, status, xhr ) {
model.set( model.parse( resp, xhr ), options );
});