register_block_type


register_block_type ( $name, $args = array() )

Parameters:
  • (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.
  • (array) args { Optional. Array of block type arguments. Any arguments may be defined, however the ones described below are supported by default. Default empty array. @type callable $render_callback Callback used to render blocks of this block type. }
Returns:
  • (WP_Block_Type|bool) The registered block type on success, or false on failure.
Defined at:

Description

Registers a block type.

Related Functions

unregister_block_type, register_block_style, unregister_block_style, register_block_pattern, register_post_type

Top Google Results

User discussions

wpseek mobile