Editor: Fix incorrect usage of ID attributes on custom fields.

Repeated containers used for custom fields have duplicate ID attributes. Duplicate IDs are incorrect HTML, and will also cause unexpected results when trying to manipulate using JS. Duplicate IDs are changed to matching classes; CSS & JS updated to match. 

Props jankimoradiya, audrasjb, donmhico, afercia.
Fixes #46964.


git-svn-id: https://develop.svn.wordpress.org/trunk@47222 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Joe Dolson
2020-02-09 19:39:54 +00:00
parent 3fb063f705
commit 1d7cdbeab7
10 changed files with 50 additions and 50 deletions

View File

@@ -2271,8 +2271,8 @@ function the_block_editor_meta_boxes() {
</form>
<?php foreach ( $locations as $location ) : ?>
<form class="metabox-location-<?php echo esc_attr( $location ); ?>" onsubmit="return false;">
<div id="poststuff" class="sidebar-open">
<div id="postbox-container-2" class="postbox-container">
<div class="poststuff" class="sidebar-open">
<div class="postbox-container-2 postbox-container">
<?php
do_meta_boxes(
$current_screen,