From 1634a100256f48a7184e72b43745d7af6193a3cb Mon Sep 17 00:00:00 2001 From: spacedmonkey Date: Mon, 5 Jun 2023 09:31:23 +0000 Subject: [PATCH] Editor: Use register_block_type_from_metadata in register_core_block_types_from_metadata. Use `register_block_type_from_metadata` in `register_core_block_types_from_metadata` function instead of `register_block_type`. This saves an unnecessary call to `file_exists` in `register_block_type` as core block files will always exist. Props nihar007, spacedmonkey, mukesh27, gziolo, sudipatel007. Fixes #58342. Built from https://develop.svn.wordpress.org/trunk@55879 git-svn-id: http://core.svn.wordpress.org/trunk@55391 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/blocks/index.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/blocks/index.php b/wp-includes/blocks/index.php index e372a74a48..654e2fd02c 100644 --- a/wp-includes/blocks/index.php +++ b/wp-includes/blocks/index.php @@ -21,7 +21,7 @@ require BLOCKS_PATH . 'require-dynamic-blocks.php'; function register_core_block_types_from_metadata() { $block_folders = require BLOCKS_PATH . 'require-static-blocks.php'; foreach ( $block_folders as $block_folder ) { - register_block_type( + register_block_type_from_metadata( BLOCKS_PATH . $block_folder ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 0fcc32498a..f7487a723a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-55878'; +$wp_version = '6.3-alpha-55879'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.