WP_Block_Type::set_props( array|string $args )

Sets block type properties.


Description Description


Parameters Parameters

$args

(array|string) (Required) Array or string of arguments for registering a block type.


Top ↑

Source Source

File: wp-includes/class-wp-block-type.php

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

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

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

Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.