Meta Boxes: Use a unique name for the nonce of the meta box loader.
Fixes a case where saving in the block editor fails if there are two `_wpnonce` arguments in the request, one overriding the other so that `use_block_editor_for_post()` wasn't able to check the nonce properly. Props Chouby. See #45253. Built from https://develop.svn.wordpress.org/trunk@44938 git-svn-id: http://core.svn.wordpress.org/trunk@44769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fae24d54fe
commit
c32bc04fdc
|
@ -120,7 +120,7 @@ $meta_box_url = add_query_arg(
|
|||
'post' => $post->ID,
|
||||
'action' => 'edit',
|
||||
'meta-box-loader' => true,
|
||||
'_wpnonce' => wp_create_nonce( 'meta-box-loader' ),
|
||||
'meta-box-loader-nonce' => wp_create_nonce( 'meta-box-loader' ),
|
||||
),
|
||||
$meta_box_url
|
||||
);
|
||||
|
|
|
@ -2071,7 +2071,7 @@ function use_block_editor_for_post( $post ) {
|
|||
|
||||
// We're in the meta box loader, so don't use the block editor.
|
||||
if ( isset( $_GET['meta-box-loader'] ) ) {
|
||||
check_admin_referer( 'meta-box-loader' );
|
||||
check_admin_referer( 'meta-box-loader', 'meta-box-loader-nonce' );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.2-alpha-44937';
|
||||
$wp_version = '5.2-alpha-44938';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue