From df0c776d1f781742b8cf96103c88686f778ca9cd Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Mon, 8 Feb 2021 21:37:34 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@50255 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/post.php | 2 +- src/wp-admin/post.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php index 77aadb2135..87f1fcac5c 100644 --- a/src/wp-admin/includes/post.php +++ b/src/wp-admin/includes/post.php @@ -2303,7 +2303,7 @@ function the_block_editor_meta_boxes() {
- +
diff --git a/src/wp-admin/post.php b/src/wp-admin/post.php index c4a0ab17e5..a1113ed35f 100644 --- a/src/wp-admin/post.php +++ b/src/wp-admin/post.php @@ -339,7 +339,7 @@ switch ( $action ) { exit; case 'toggle-custom-fields': - check_admin_referer( 'toggle-custom-fields' ); + check_admin_referer( 'toggle-custom-fields', 'toggle-custom-fields-nonce' ); $current_user_id = get_current_user_id(); if ( $current_user_id ) {