mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Editor: Correctly back up the global $post
in wp-admin/edit-form-blocks.php
.
To create a copy of the object, instead of a reference to the same object, the `clone` keyword should be used. Props scarolan. Fixes #50775. Built from https://develop.svn.wordpress.org/trunk@48700 git-svn-id: http://core.svn.wordpress.org/trunk@48462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
07b4429203
commit
3f83523b4e
@ -69,7 +69,7 @@ $preload_paths = apply_filters( 'block_editor_preload_paths', $preload_paths, $p
|
||||
* Because API preloading can call the_content and other filters, plugins
|
||||
* can unexpectedly modify $post.
|
||||
*/
|
||||
$backup_global_post = $post;
|
||||
$backup_global_post = clone $post;
|
||||
|
||||
$preload_data = array_reduce(
|
||||
$preload_paths,
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.6-alpha-48699';
|
||||
$wp_version = '5.6-alpha-48700';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user