WordPress at a glance
function is not described

WP_Block_Type::set_props() public WP 5.0.0

Sets block type properties.

{} It's a method of the class: WP_Block_Type{}

Hooks from the method
Return

null. Nothing.

Usage

$WP_Block_Type = new WP_Block_Type();
$WP_Block_Type->set_props( $args );
$args(array|string) (required)
Array or string of arguments for registering a block type. See WP_Block_Type::__construct()() for information on accepted arguments.

Changelog

Since 5.0.0 Introduced.

Code of WP_Block_Type::set_props() WP 5.7.2

<?php
public function set_props( $args ) {
	$args = wp_parse_args(
		$args,
		array(
			'render_callback' => null,
		)
	);

	$args['name'] = $this->name;

	/**
	 * Filters the arguments for registering a block type.
	 *
	 * @since 5.5.0
	 *
	 * @param array  $args       Array of arguments for registering a block type.
	 * @param string $block_type Block type name including namespace.
	 */
	$args = apply_filters( 'register_block_type_args', $args, $this->name );

	foreach ( $args as $property_name => $property_value ) {
		$this->$property_name = $property_value;
	}
}