Skip to content

Commit e17b51a

Browse files
authored
🔧 Lower the render template hook priority (#282)
1 parent 568540c commit e17b51a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AcfComposer.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public function handleWidgets(): void
198198
*/
199199
protected function handleBlocks(): void
200200
{
201-
add_filter('acf_block_render_template', function ($block, $content, $is_preview, $post_id, $wp_block, $context) {
201+
add_action('acf_block_render_template', function ($block, $content, $is_preview, $post_id, $wp_block, $context) {
202202
if (! class_exists($composer = $block['render_template'] ?? '')) {
203203
return;
204204
}
@@ -212,7 +212,7 @@ protected function handleBlocks(): void
212212
method_exists($composer, 'assets') && $composer->assets($block);
213213

214214
echo $composer->render($block, $content, $is_preview, $post_id, $wp_block, $context);
215-
}, 10, 6);
215+
}, 9, 6);
216216
}
217217

218218
/**

0 commit comments

Comments
 (0)