WordPress at a glance
function is not described

register_block_type() WP 5.0.0

Registers a block type.

No Hooks.


WP_Block_Type/false. The registered block type on success, or false on failure.


register_block_type( $name, $args );
$name(string/WP_Block_Type) (required)
Block type name including namespace, or alternatively a complete WP_Block_Type instance. In case a WP_Block_Type is provided, the $args parameter will be ignored.

Array of block type arguments. Any arguments may be defined, however the ones described below are supported by default.

  • $render_callback (callable)
    Callback used to render blocks of this block type.

Default: empty array

Code of register block type: wp-includes/blocks.php WP 5.2.2

function register_block_type( $name, $args = array() ) {
	return WP_Block_Type_Registry::get_instance()->register( $name, $args );