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.

Built from https://develop.svn.wordpress.org/branches/5.0@43880


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2018-11-09 08:33:46 +00:00
parent 7c19654f33
commit 98e9bbdc19
2 changed files with 2 additions and 2 deletions

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

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.0-beta3-43879'; $wp_version = '5.0-beta3-43880';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.