register_core_block_types_from_metadata() – Registers core block types using metadata files.

You appear to be a bot. Output may be restricted

Description

Registers core block types using metadata files.

Dynamic core blocks are registered separately.

Usage

register_core_block_types_from_metadata();

Parameters

Returns

void

Source

File name: wordpress/wp-includes/blocks/index.php


Lines:

1 to 39 of 39
function register_core_block_types_from_metadata() {
  $block_folders = array(
    'audio',
    'button',
    'buttons',
    'code',
    'column',
    'columns',
    'comments-query-loop',
    'embed',
    'freeform',
    'group',
    'heading',
    'html',
    'list',
    'media-text',
    'missing',
    'more',
    'nextpage',
    'paragraph',
    'preformatted',
    'pullquote',
    'quote',
    'separator',
    'social-links',
    'spacer',
    'table',
    'text-columns',
    'verse',
    'video',
  );

  foreach ( $block_folders as $block_folder ) {
    register_block_type(
      ABSPATH . WPINC . '/blocks/' . $block_folder
    );
  }
}
 

 View on GitHub View on Trac