mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Media: Prevent local edits during media upload.
Prevent `options.allowLocalEdits` from toggling to true during the upload cycle. Otherwise, media meta fields can be edited, but the data will be lost as soon as the upload process is completed. Props codepo8, oglekler, nicolefurlan, antpb, syamraj24, joedolson. Fixes #58783, #23374. git-svn-id: https://develop.svn.wordpress.org/trunk@57515 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1e564ad6c0
commit
67e9ffb9fd
@ -120,7 +120,7 @@ Attachment = View.extend(/** @lends wp.media.view.Attachment.prototype */{
|
||||
options.can.save = !! options.nonces.update;
|
||||
}
|
||||
|
||||
if ( this.controller.state().get('allowLocalEdits') ) {
|
||||
if ( this.controller.state().get('allowLocalEdits') && ! options.uploading ) {
|
||||
options.allowLocalEdits = true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user