Skip to content

Commit

Permalink
feat: enqueue per-block assets
Browse files Browse the repository at this point in the history
  • Loading branch information
codepuncher committed Jun 19, 2024
1 parent 49381f6 commit 3d1bf44
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,15 @@ public function getBlockData(): array
];
}

public function getAssets(): void
{
}

public function init(): void
{
$block_data = $this->getBlockData();
$block_data['render_callback'] = [$this, 'renderBlockCallback'];
$block_data['enqueue_assets'] = $this->getAssets();
$fields = $this->getFields();

acf_register_block($block_data);
Expand Down

0 comments on commit 3d1bf44

Please sign in to comment.