Skip to content

Commit 03f512b

Browse files
committed
feat: add block to blacklist
1 parent 7574a60 commit 03f512b

1 file changed

Lines changed: 75 additions & 2 deletions

File tree

‎inc/Services/Editor.php‎

Lines changed: 75 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,88 @@ public function gutenberg_blocks_allowed( $allowed_blocks, \WP_Block_Editor_Cont
222222

223223
// List of disallowed blocks.
224224
$disallowed_blocks = [
225+
// Code & raw content.
225226
'core/html',
226227
'core/freeform',
227228
'core/code',
228229
'core/preformatted',
229230
'core/verse',
230231
'core/footnotes',
231-
'core/more',
232-
'core/loginout',
232+
'core/shortcode',
233+
'core/math',
234+
// Layout & media (unused).
235+
'core/text-columns',
236+
'core/nextpage',
237+
'core/read-more',
238+
// Embeds & widgets.
233239
'core/embed',
240+
'core/legacy-widget',
241+
'core/widget-group',
242+
// Accordion.
243+
'core/accordion',
244+
'core/accordion-heading',
245+
'core/accordion-item',
246+
'core/accordion-panel',
247+
'core/icon',
248+
// Theme & site (unused).
249+
'core/archives',
250+
'core/calendar',
251+
'core/categories',
252+
'core/latest-comments',
253+
'core/latest-posts',
254+
'core/rss',
255+
'core/search',
256+
'core/tag-cloud',
257+
'core/site-tagline',
258+
'core/site-title',
259+
'core/breadcrumbs',
260+
'core/navigation-overlay-close',
261+
// Post meta & author (unused).
262+
'core/post-author',
263+
'core/post-author-biography',
264+
'core/post-author-name',
265+
'core/post-navigation-link',
266+
'core/post-terms',
267+
'core/post-time-to-read',
268+
'core/avatar',
269+
// Comments (unused).
270+
'core/comments',
271+
'core/comments-pagination',
272+
'core/comments-pagination-next',
273+
'core/comments-pagination-numbers',
274+
'core/comments-pagination-previous',
275+
'core/comments-title',
276+
'core/comment-author-name',
277+
'core/comment-content',
278+
'core/comment-date',
279+
'core/comment-edit-link',
280+
'core/comment-reply-link',
281+
'core/comment-template',
282+
'core/post-comments',
283+
'core/post-comments-count',
284+
'core/post-comments-form',
285+
'core/post-comments-link',
286+
// Query loop (unused).
287+
'core/query',
288+
'core/query-no-results',
289+
'core/query-pagination',
290+
'core/query-pagination-next',
291+
'core/query-pagination-numbers',
292+
'core/query-pagination-previous',
293+
'core/query-title',
294+
'core/query-total',
295+
'core/post-template',
296+
// Terms (unused).
297+
'core/term-count',
298+
'core/term-description',
299+
// Lists & navigation (unused).
300+
'core/page-list',
301+
'core/page-list-item',
302+
// Reusable & misc.
303+
'core/loginout',
304+
'core/more',
305+
'core/social-link',
306+
'core/social-links',
234307
];
235308

236309
// Remove disallowed blocks from allowed blocks.

0 commit comments

Comments
 (0)