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.
Метод класса: WP_Block_Bindings_Source{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$WP_Block_Bindings_Source = new WP_Block_Bindings_Source(); $WP_Block_Bindings_Source->__construct( $name, $source_properties );
- $name(строка) (обязательный)
- The name of the source.
- $source_properties(массив) (обязательный)
- The properties of the source.
Список изменений
| С версии 6.5.0 | Введена. |
Код WP_Block_Bindings_Source::__construct() WP Block Bindings Source:: construct WP 7.1.4
public function __construct( string $name, array $source_properties ) {
$this->name = $name;
foreach ( $source_properties as $property_name => $property_value ) {
$this->$property_name = $property_value;
}
}