Skip to content

Commit

Permalink
refactor: simplify block registration script
Browse files Browse the repository at this point in the history
  • Loading branch information
pauloiankoski committed Jan 15, 2025
1 parent 5f63fe0 commit 597f643
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Campaigns/Actions/RegisterCampaignBlocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ public function __invoke()
{
$blocks = glob(dirname(__DIR__) . '/Blocks/*', GLOB_ONLYDIR);

foreach ($blocks as $block) {
register_block_type(dirname(__DIR__) . '/Blocks/' . basename($block));
}
array_map('register_block_type', $blocks);

$this->enqueueBlocksAssets();
}
Expand Down

0 comments on commit 597f643

Please sign in to comment.