new text editor block that contains core blocks as inner blocks and prevents them from being used at top level

This commit is contained in:
2025-11-27 07:14:31 +00:00
parent 00d0861014
commit 0055a25420
17 changed files with 218 additions and 45 deletions

View File

@@ -1,7 +1,7 @@
<?php
namespace App\Admin;
use Blocks\Content;
use Blocks\Editor;
class Blocks
{
@@ -146,9 +146,9 @@ class Blocks
'core/social-links',
];
$Content = new Content\Content();
$Editor = new Editor\Editor();
$blacklist = array_diff($blacklist, $Content->inner_blocks());
$blacklist = array_diff($blacklist, $Editor->inner_blocks());
return array_values( array_diff( $blocks, $blacklist ) );
}