Correctly access the nonce to save attachment fields. Fixes firing attachment_fields_to_save.
Props koopersmith fixes #22577 git-svn-id: https://develop.svn.wordpress.org/trunk@22842 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
65f7674216
commit
1368fae5b6
@ -269,7 +269,7 @@ window.wp = window.wp || {};
|
|||||||
|
|
||||||
return media.post( 'save-attachment-compat', _.defaults({
|
return media.post( 'save-attachment-compat', _.defaults({
|
||||||
id: this.id,
|
id: this.id,
|
||||||
nonce: l10n.saveAttachmentNonce
|
nonce: media.model.settings.saveAttachmentNonce
|
||||||
}, data ) ).done( function( resp, status, xhr ) {
|
}, data ) ).done( function( resp, status, xhr ) {
|
||||||
model.set( model.parse( resp, xhr ), options );
|
model.set( model.parse( resp, xhr ), options );
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user