WP_Block_Bindings_Source::__construct
Constructor.
Do not use this constructor directly. Instead, use the WP_Block_Bindings_Registry::register method or the register_block_bindings_source function.
Method of the class: WP_Block_Bindings_Source{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WP_Block_Bindings_Source = new WP_Block_Bindings_Source(); $WP_Block_Bindings_Source->__construct( $name, $source_properties );
- $name(string) (required)
- The name of the source.
- $source_properties(array) (required)
- The properties of the source.
Changelog
| Since 6.5.0 | Introduced. |
WP_Block_Bindings_Source::__construct() WP Block Bindings Source:: construct code WP 6.9
public function __construct( string $name, array $source_properties ) {
$this->name = $name;
foreach ( $source_properties as $property_name => $property_value ) {
$this->$property_name = $property_value;
}
}