From e2f9cdb0002e5503f94c97c77bb0131212b637c7 Mon Sep 17 00:00:00 2001 From: codepuncher Date: Wed, 19 Jun 2024 09:45:32 +0100 Subject: [PATCH] refactor: rename `getAssets` to `enqueueAssets` and add phpdoc --- src/Block.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Block.php b/src/Block.php index 6723a70..acef40c 100644 --- a/src/Block.php +++ b/src/Block.php @@ -288,7 +288,12 @@ public function getBlockData(): array ]; } - public function getAssets(): void + /** + * Callback method to enqueue block assets + * + * @since 0.6.0 + */ + public function enqueueAssets(): void { } @@ -296,7 +301,7 @@ 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);