} } } add_action( 'init', 'register_core_block_style_handles', 9 ); /** * Registers core block types using metadata files. * Dynamic core blocks are registered separately. * * @since 5.5.0 */ 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_from_metadata( BLOCKS_PATH . $block_folder ); } } add_action( 'init', 'register_core_block_types_from_metadata' ); /** * Registers the core block metadata collection. * * This function is hooked into the 'init' action with a priority of 9, * ensuring that the core block metadata is registered before the regular * block initialization that happens at priority 10. * * @since 6.7.0 */ function wp_register_core_block_metadata_collection() { wp_register_block_metadata_collection( BLOCKS_PATH, BLOCKS_PATH . 'blocks-json.php' ); } add_action( 'init', 'wp_register_core_block_metadata_collection', 9 ); Horizontal filer - LucyJan Skip to main content