From 9a22b8597db1e220228a7504700d76d92d9e3d01 Mon Sep 17 00:00:00 2001 From: Harry Scheiner Date: Mon, 19 May 2025 17:19:45 -0400 Subject: [PATCH] Fix block type registration in WordPress 6.8 --- src/Block.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Block.php b/src/Block.php index aef4c35..df76531 100644 --- a/src/Block.php +++ b/src/Block.php @@ -271,7 +271,6 @@ public function compose() 'category' => $this->category, 'icon' => $this->icon, 'keywords' => $this->keywords, - 'parent' => $this->parent ?: [], 'post_types' => $this->post_types, 'mode' => $this->mode, 'align' => $this->align, @@ -294,6 +293,10 @@ public function compose() }, ]; + if (filled($this->parent)) { + $settings = Arr::add($settings, 'parent', $this->parent); + } + if ($this->example !== false) { $settings = Arr::add($settings, 'example', [ 'attributes' => [