From e3983f5131480a6f4343c4cbc5f3f6a88ec6298d Mon Sep 17 00:00:00 2001 From: Daniel Sturm <384815+dsturm@users.noreply.github.com> Date: Wed, 12 Aug 2020 09:48:01 +0200 Subject: [PATCH] Registration of core blocks fails on WordPress 5.5 In WordPress 5.5 a lot changed to block registration (i.e. adding the [`register_core_block_types_from_metadata` function](https://core.trac.wordpress.org/changeset/48279)), so overriding core blocks will not succeed without decreasing the priority and run into a notice `Block type "core/columns" is already registered.` --- src/Providers/BlockTemplatesServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Providers/BlockTemplatesServiceProvider.php b/src/Providers/BlockTemplatesServiceProvider.php index 8cbfe0a..aba85a5 100644 --- a/src/Providers/BlockTemplatesServiceProvider.php +++ b/src/Providers/BlockTemplatesServiceProvider.php @@ -19,7 +19,7 @@ public function register(): void { $this->blocks = Collection::make(); - add_action('init', [$this, 'registerBlockTemplates']); + add_action('init', [$this, 'registerBlockTemplates'], 9); } /**