Automattic\WooCommerce\Blocks
BlockTypesController::register_blocks
Register blocks, hooking up assets and render functions as needed.
Метод класса: BlockTypesController{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$BlockTypesController = new BlockTypesController(); $BlockTypesController->register_blocks();
Код BlockTypesController::register_blocks() BlockTypesController::register blocks WC 11.1.0
public function register_blocks() {
// Set before registering rather than after: it guards against re-entry through the on-demand
// registration in Bootstrap, and a registration failure must not be retried on later filter fires.
self::$register_blocks_has_run = true;
$this->register_block_metadata();
$block_types = $this->get_block_types();
foreach ( $block_types as $block_type ) {
$block_type_class = __NAMESPACE__ . '\\BlockTypes\\' . $block_type;
new $block_type_class( $this->asset_api, $this->asset_data_registry, new IntegrationRegistry() );
}
}