WP_Block_Bindings_Source::__construct( string $name, array $source_properties )

In this article

Constructor.

Description

Do not use this constructor directly. Instead, use the WP_Block_Bindings_Registry::register method or the register_block_bindings_source function.

Parameters

$namestringrequired
The name of the source.
$source_propertiesarrayrequired
The properties of the source.

Source

public function __construct( string $name, array $source_properties ) {
	$this->name = $name;
	foreach ( $source_properties as $property_name => $property_value ) {
		$this->$property_name = $property_value;
	}
}

Changelog

VersionDescription
6.5.0Introduced.

User Contributed Notes

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