get_dynamic_block_names() – Returns an array of the names of all registered dynamic block types.

You appear to be a bot. Output may be restricted

Description

Returns an array of the names of all registered dynamic block types.

Usage

$string[] = get_dynamic_block_names();

Parameters

Returns

string[] Array of dynamic block names.

Source

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

1 to 12 of 12
function get_dynamic_block_names() {
  $dynamic_block_names = array();

  $block_types = WP_Block_Type_Registry::WP_Block_Type_Registry::get_instance()->get_all_registered();
  foreach ( $block_types as $block_type ) {
    if ( $block_type->is_dynamic() ) {
      $dynamic_block_names[] = $block_type->name;
    }
  }

  return $dynamic_block_names;
}
 

 View on GitHub View on Trac