From e73ff3a9f163de39c91be09eba2d9b59de9d8e94 Mon Sep 17 00:00:00 2001 From: mricoul Date: Thu, 27 Aug 2026 17:59:58 +0200 Subject: [PATCH 1/2] feat(Editor): add core block to default black list --- inc/Services/Editor.php | 85 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 84 insertions(+), 1 deletion(-) diff --git a/inc/Services/Editor.php b/inc/Services/Editor.php index 931a8c8..6ea6660 100644 --- a/inc/Services/Editor.php +++ b/inc/Services/Editor.php @@ -338,7 +338,90 @@ public function gutenberg_blocks_allowed( $allowed_blocks, \WP_Block_Editor_Cont } // List of disallowed blocks. - $disallowed_blocks = []; + $disallowed_blocks = [ + // Code & raw content. + 'core/html', + 'core/freeform', + 'core/code', + 'core/preformatted', + 'core/verse', + 'core/footnotes', + 'core/shortcode', + 'core/math', + // Layout & media (unused). + 'core/text-columns', + 'core/nextpage', + 'core/read-more', + // Embeds & widgets. + 'core/embed', + 'core/legacy-widget', + 'core/widget-group', + // Accordion. + 'core/accordion', + 'core/accordion-heading', + 'core/accordion-item', + 'core/accordion-panel', + 'core/icon', + // Theme & site (unused). + 'core/archives', + 'core/calendar', + 'core/categories', + 'core/latest-comments', + 'core/latest-posts', + 'core/rss', + 'core/search', + 'core/tag-cloud', + 'core/site-tagline', + 'core/site-title', + 'core/breadcrumbs', + 'core/navigation-overlay-close', + // Post meta & author (unused). + 'core/post-author', + 'core/post-author-biography', + 'core/post-author-name', + 'core/post-navigation-link', + 'core/post-terms', + 'core/post-time-to-read', + 'core/avatar', + // Comments (unused). + 'core/comments', + 'core/comments-pagination', + 'core/comments-pagination-next', + 'core/comments-pagination-numbers', + 'core/comments-pagination-previous', + 'core/comments-title', + 'core/comment-author-name', + 'core/comment-content', + 'core/comment-date', + 'core/comment-edit-link', + 'core/comment-reply-link', + 'core/comment-template', + 'core/post-comments', + 'core/post-comments-count', + 'core/post-comments-form', + 'core/post-comments-link', + // Query loop (unused). + 'core/query', + 'core/query-no-results', + 'core/query-pagination', + 'core/query-pagination-next', + 'core/query-pagination-numbers', + 'core/query-pagination-previous', + 'core/query-title', + 'core/query-total', + 'core/post-template', + // Terms (unused). + 'core/term-count', + 'core/term-description', + // Lists & navigation (unused). + 'core/page-list', + 'core/page-list-item', + // Reusable & misc. + 'core/loginout', + 'core/more', + 'core/social-link', + 'core/social-links', + ]; // Remove disallowed blocks from allowed blocks. foreach ( $disallowed_blocks as $block ) { From 1dae58b4629cf74218d9f2a00834722cf832cc2d Mon Sep 17 00:00:00 2001 From: mricoul Date: Fri, 28 Aug 2026 12:13:43 +0200 Subject: [PATCH 2/2] feat(Editor): remove query blocks from black list --- inc/Services/Editor.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/inc/Services/Editor.php b/inc/Services/Editor.php index 6ea6660..2188bf9 100644 --- a/inc/Services/Editor.php +++ b/inc/Services/Editor.php @@ -400,15 +400,6 @@ public function gutenberg_blocks_allowed( $allowed_blocks, \WP_Block_Editor_Cont 'core/post-comments-count', 'core/post-comments-form', 'core/post-comments-link', - // Query loop (unused). - 'core/query', - 'core/query-no-results', - 'core/query-pagination', - 'core/query-pagination-next', - 'core/query-pagination-numbers', - 'core/query-pagination-previous', - 'core/query-title', - 'core/query-total', 'core/post-template', // Terms (unused). 'core/term-count',