register_block_type_args
Filters the arguments for registering a block type.
Usage
add_filter( 'register_block_type_args', 'wp_kama_register_block_type_args_filter', 10, 2 ); /** * Function for `register_block_type_args` filter-hook. * * @param array $args Array of arguments for registering a block type. * @param string $block_type Block type name including namespace. * * @return array */ function wp_kama_register_block_type_args_filter( $args, $block_type ){ // filter... return $args; }
- $args(array)
- Array of arguments for registering a block type.
- $block_type(string)
- Block type name including namespace.
Changelog
Since 5.5.0 | Introduced. |
Where the hook is called
register_block_type_args
wp-includes/class-wp-block-type.php 573
$args = apply_filters( 'register_block_type_args', $args, $this->name );