From e17b51a6afe4f2a9273de4b568160e55248836d1 Mon Sep 17 00:00:00 2001 From: Mathias De Beyser Date: Fri, 30 Aug 2024 14:31:49 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Lower=20the=20render=20template?= =?UTF-8?q?=20hook=20priority=20(#282)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AcfComposer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AcfComposer.php b/src/AcfComposer.php index 825be15..a319622 100644 --- a/src/AcfComposer.php +++ b/src/AcfComposer.php @@ -198,7 +198,7 @@ public function handleWidgets(): void */ protected function handleBlocks(): void { - add_filter('acf_block_render_template', function ($block, $content, $is_preview, $post_id, $wp_block, $context) { + add_action('acf_block_render_template', function ($block, $content, $is_preview, $post_id, $wp_block, $context) { if (! class_exists($composer = $block['render_template'] ?? '')) { return; } @@ -212,7 +212,7 @@ protected function handleBlocks(): void method_exists($composer, 'assets') && $composer->assets($block); echo $composer->render($block, $content, $is_preview, $post_id, $wp_block, $context); - }, 10, 6); + }, 9, 6); } /**