WP_Block_Type::__construct( string $block_type, array|string $args = array() )

Constructor.


Description Description

Will populate object properties from the provided arguments.

See also See also


Top ↑

Parameters Parameters

$block_type

(string) (Required) Block type name including namespace.

$args

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

Default value: array()


Top ↑

Source Source

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

	public function __construct( $block_type, $args = array() ) {
		$this->name = $block_type;

		$this->set_props( $args );
	}


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.