diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php
index cb2cd060dd..e103de0655 100644
|
a
|
b
|
function the_block_editor_meta_boxes() { |
| 2300 | 2300 | // Render meta boxes. |
| 2301 | 2301 | ?> |
| 2302 | 2302 | <form class="metabox-base-form"> |
| 2303 | | <?php the_block_editor_meta_box_post_form_hidden_fields( $post ); ?> |
| | 2303 | <?php the_block_editor_meta_box_post_form_hidden_fields( $post ); ?> |
| 2304 | 2304 | </form> |
| 2305 | 2305 | <form id="toggle-custom-fields-form" method="post" action="<?php echo esc_attr( admin_url( 'post.php' ) ); ?>"> |
| 2306 | | <?php wp_nonce_field( 'toggle-custom-fields' ); ?> |
| 2307 | | <input type="hidden" name="action" value="toggle-custom-fields" /> |
| | 2306 | <?php wp_nonce_field( 'toggle-custom-fields', 'toggle-custom-fields-nonce' ); ?> |
| | 2307 | <input type="hidden" name="action" value="toggle-custom-fields"/> |
| 2308 | 2308 | </form> |
| 2309 | 2309 | <?php foreach ( $locations as $location ) : ?> |
| 2310 | 2310 | <form class="metabox-location-<?php echo esc_attr( $location ); ?>" onsubmit="return false;"> |
| … |
… |
function the_block_editor_meta_box_post_form_hidden_fields( $post ) { |
| 2421 | 2421 | $referer = wp_get_referer(); |
| 2422 | 2422 | $current_user = wp_get_current_user(); |
| 2423 | 2423 | $user_id = $current_user->ID; |
| 2424 | | wp_nonce_field( $nonce_action ); |
| | 2424 | wp_nonce_field( $nonce_action, $nonce_action . '-nonce' ); |
| 2425 | 2425 | |
| 2426 | 2426 | /* |
| 2427 | 2427 | * Some meta boxes hook into these actions to add hidden input fields in the classic post form. For backwards |
| … |
… |
function the_block_editor_meta_box_post_form_hidden_fields( $post ) { |
| 2435 | 2435 | $classic_output = ob_get_clean(); |
| 2436 | 2436 | |
| 2437 | 2437 | $classic_elements = wp_html_split( $classic_output ); |
| 2438 | | $hidden_inputs = ''; |
| 2439 | 2438 | foreach ( $classic_elements as $element ) { |
| 2440 | 2439 | if ( 0 !== strpos( $element, '<input ' ) ) { |
| 2441 | 2440 | continue; |