mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-11 22:29:48 +01: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. Built from https://develop.svn.wordpress.org/trunk@57515 git-svn-id: http://core.svn.wordpress.org/trunk@57016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a2786a3785
commit
3664cc3698
@ -2986,7 +2986,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;
|
||||
}
|
||||
|
||||
|
2
wp-includes/js/media-views.min.js
vendored
2
wp-includes/js/media-views.min.js
vendored
File diff suppressed because one or more lines are too long
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.5-alpha-57514';
|
||||
$wp_version = '6.5-alpha-57515';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user