Make WordPress Core

Ticket #58342: 58342.diff

File 58342.diff, 639 bytes (added by nihar007, 12 months ago)

Replaced register_block_type with register_block_type_from_metadata

  • src/wp-includes/blocks/index.php

    diff --git a/src/wp-includes/blocks/index.php b/src/wp-includes/blocks/index.php
    index e372a74a48..05d1674f72 100644
    a b require BLOCKS_PATH . 'require-dynamic-blocks.php'; 
    2121function register_core_block_types_from_metadata() {
    2222        $block_folders = require BLOCKS_PATH . 'require-static-blocks.php';
    2323        foreach ( $block_folders as $block_folder ) {
    24                 register_block_type(
    25                         BLOCKS_PATH . $block_folder
    26                 );
     24                register_block_type_from_metadata(BLOCKS_PATH . $block_folder);
    2725        }
    2826}
    2927add_action( 'init', 'register_core_block_types_from_metadata' );