Constructor.
Do not use this constructor directly. Instead, use the WP_Block_Bindings_Registry::register method or the register_block_bindings_source function.
$namestringrequired
$source_propertiesarrayrequired
public function __construct( string $name, array $source_properties ) {
$this->name = $name;
foreach ( $source_properties as $property_name => $property_value ) {
$this->$property_name = $property_value;
}
}
| Version | Description |
|---|---|
| 6.5.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_block_bindings_source/__construct