Make WordPress Core


Ignore:
Timestamp:
02/08/2021 09:37:34 PM (3 years ago)
Author:
ocean90
Message:

Block Editor: Use a unique name for the nonce of the custom fields toggle form.

Avoids a browser warning for having two elements with a non-unique id #_wpnonce on the post edit screen.

See #23165.
Fixes #51483.
Props vandestouwe, Mista-Flo.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/post.php

    r49936 r50255  
    23042304    </form>
    23052305    <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' ); ?>
     2306        <?php wp_nonce_field( 'toggle-custom-fields', 'toggle-custom-fields-nonce' ); ?>
    23072307        <input type="hidden" name="action" value="toggle-custom-fields" />
    23082308    </form>
Note: See TracChangeset for help on using the changeset viewer.