Uma área de pesquisa sobre o WordPress para devs e autores do tema



get_dynamic_block_names ›

Desde5.0.0
Obsoleton/a
get_dynamic_block_names ( Sem parâmetros )
Retorna:
  • (array) Array of dynamic block names.
Definido em:
Codex:

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



Fonte

function get_dynamic_block_names() {
	$dynamic_block_names = array();

	$block_types = 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;
}