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

@@ -46,6 +46,16 @@ add_filter('admin_head', function () {
])->toHtml();
});
add_action( 'enqueue_block_editor_assets', function(){
wp_enqueue_script(
'restrict-core-blocks',
Vite::asset('resources/js/admin/block-restrictions.js'),
array( 'wp-blocks', 'wp-dom-ready', 'wp-edit-blocks', 'wp-hooks' ),
'v1.0.0',
true
);
});
/**
* Use the generated theme.json file.
*