Skip to content

Commit

Permalink
adding blocks registration fix (#416)
Browse files Browse the repository at this point in the history
  • Loading branch information
iruzevic authored Jul 25, 2024
1 parent 9ebc547 commit 2df0cf4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.

This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/).

## [9.0.1]

### Fixed
- Blocks registration hooks now uses store registration hooks.

## [9.0.0]

### Changed
Expand Down Expand Up @@ -614,6 +619,7 @@ Init setup

[Unreleased]: https://github.com/infinum/eightshift-libs/compare/main...HEAD

[9.0.1]: https://github.com/infinum/eightshift-libs/compare/9.0.0...9.0.1
[9.0.0]: https://github.com/infinum/eightshift-libs/compare/8.0.7...9.0.0
[8.0.7]: https://github.com/infinum/eightshift-libs/compare/8.0.6...8.0.7
[8.0.6]: https://github.com/infinum/eightshift-libs/compare/8.0.5...8.0.6
Expand Down
4 changes: 2 additions & 2 deletions src/Blocks/AbstractBlocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function getAllAllowedBlocksList($allowedBlockTypes, WP_Block_Editor_Cont
$allowedBlockTypes = \array_values(\array_merge(
\array_map(
fn ($block) => $block['blockFullName'],
$this->manifestCache->getManifestCacheTopItem(AbstractManifestCache::BLOCKS_KEY)
Helpers::getBlocks()
),
$allowedBlockTypes,
));
Expand Down Expand Up @@ -175,7 +175,7 @@ public function registerBlocks(): void
return;
}

foreach ($this->manifestCache->getManifestCacheTopItem(AbstractManifestCache::BLOCKS_KEY) as $block) {
foreach (Helpers::getBlocks() as $block) {
$this->registerBlock($block);
}
}
Expand Down

0 comments on commit 2df0cf4

Please sign in to comment.