From 219d92f75b40844cbf255e908d0eb3acc3792fe6 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Mon, 8 Feb 2021 21:39:16 +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. Built from https://develop.svn.wordpress.org/trunk@50255 git-svn-id: http://core.svn.wordpress.org/trunk@49900 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/post.php | 2 +- wp-admin/post.php | 2 +- wp-includes/version.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 77aadb2135..87f1fcac5c 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -2303,7 +2303,7 @@ function the_block_editor_meta_boxes() {
- +
diff --git a/wp-admin/post.php b/wp-admin/post.php index c4a0ab17e5..a1113ed35f 100644 --- a/wp-admin/post.php +++ b/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 ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index b1bdd72957..49e916b9ef 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.7-beta1-50238'; +$wp_version = '5.7-beta1-50255'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.