register_core_block_types_from_metadata()WP 5.5.0

Registers core block types using metadata files. Dynamic core blocks are registered separately.

Хуков нет.

Возвращает

null. Ничего (null).

Использование

register_core_block_types_from_metadata();

Список изменений

С версии 5.5.0 Введена.

Код register_core_block_types_from_metadata() WP 6.5.3

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
		);
	}
}