Skip to content

Commit

Permalink
🔧 Lower the render template hook priority (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasdb authored Aug 30, 2024
1 parent 568540c commit e17b51a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AcfComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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);
}

/**
Expand Down

0 comments on commit e17b51a

Please sign in to comment.