wpseek.com
A WordPress-centric search engine for devs and theme authors



register_block_type › WordPress Function

Since5.0.0
Deprecatedn/a
register_block_type ( $name, $args = array() )
Parameters: (2)
  • (string|WP_Block_Type) $name 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.
    Required: Yes
  • (array) $args Optional. Array of block type arguments. Accepts any public property of `WP_Block_Type`. See WP_Block_Type::__construct() for information on accepted arguments. Default empty array.
    Required: No
    Default: array()
Returns:
  • (WP_Block_Type|false) The registered block type on success, or false on failure.
Defined at:
Codex:

Registers a block type.



Source

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