Un motore di ricerca WordPress per sviluppatori e autori di temi



register_block_type ›

Da5.0.0
Deprecaton/a
register_block_type ( $name, $args = array() )
Parametri: (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.
    Richiesto:
  • (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.
    Richiesto: No
    Default: array()
Ritorna:
  • (WP_Block_Type|false) The registered block type on success, or false on failure.
Definito a:
Codex:

Registers a block type.



Sorgenti

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