diff --git a/wp-includes/block-editor.php b/wp-includes/block-editor.php index aaa249cb7b..a861ba3006 100644 --- a/wp-includes/block-editor.php +++ b/wp-includes/block-editor.php @@ -468,6 +468,17 @@ function block_editor_rest_api_preload( array $preload_paths, $block_editor_cont */ $backup_global_post = ! empty( $post ) ? clone $post : $post; + foreach ( $preload_paths as &$path ) { + if ( is_string( $path ) && ! str_starts_with( $path, '/' ) ) { + $path = '/' . $path; + continue; + } + + if ( is_array( $path ) && is_string( $path[0] ) && ! str_starts_with( $path[0], '/' ) ) { + $path[0] = '/' . $path[0]; + } + } + $preload_data = array_reduce( $preload_paths, 'rest_preload_api_request', diff --git a/wp-includes/version.php b/wp-includes/version.php index a95b9b8511..b18f14e4ab 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-beta1-52311'; +$wp_version = '5.9-beta1-52312'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.