Block Editor: Prevent the meta box form from being accidentally submitted.

Meta boxes are loaded inside a wrapper form, that the block editor submits as part of the saving process. It shouldn't be submitted manually.

See #45284.


git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43880 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2018-11-09 08:32:19 +00:00
parent 55ccd0f2ee
commit cbc780e3c8

View File

@ -2065,7 +2065,7 @@ function the_block_editor_meta_boxes() {
<input type="hidden" name="action" value="toggle-custom-fields" /> <input type="hidden" name="action" value="toggle-custom-fields" />
</form> </form>
<?php foreach ( $locations as $location ) : ?> <?php foreach ( $locations as $location ) : ?>
<form class="metabox-location-<?php echo esc_attr( $location ); ?>"> <form class="metabox-location-<?php echo esc_attr( $location ); ?>" onsubmit="return false;">
<div id="poststuff" class="sidebar-open"> <div id="poststuff" class="sidebar-open">
<div id="postbox-container-2" class="postbox-container"> <div id="postbox-container-2" class="postbox-container">
<?php <?php