Skip to content

Commit

Permalink
refactor: rename getAssets to enqueueAssets and add phpdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
codepuncher committed Jun 19, 2024
1 parent 5bee7d9 commit e2f9cdb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,15 +288,20 @@ public function getBlockData(): array
];
}

public function getAssets(): void
/**
* Callback method to enqueue block assets
*
* @since 0.6.0
*/
public function enqueueAssets(): void
{
}

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

acf_register_block($block_data);
Expand Down

0 comments on commit e2f9cdb

Please sign in to comment.