From 165bdc2bd64741e45d3139d6900d938d93566598 Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Thu, 22 Jul 2021 17:59:50 -0300 Subject: [PATCH] Brings back our categories to the inserter even in the widgets editor. --- .../gutenberg-blocks/class-tainacan-gutenberg-block.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/views/gutenberg-blocks/class-tainacan-gutenberg-block.php b/src/views/gutenberg-blocks/class-tainacan-gutenberg-block.php index 0ae62629b..25cbc26fe 100644 --- a/src/views/gutenberg-blocks/class-tainacan-gutenberg-block.php +++ b/src/views/gutenberg-blocks/class-tainacan-gutenberg-block.php @@ -134,15 +134,9 @@ function unregister_tainacan_blocks() { /** * Registers the Tainacan category on the blocks inserter - * In case we are in WP > 5.8, we if we are in a post edition page first, - * as we don't want our blocks inside the Widgets area so far. */ function tainacan_blocks_register_categories($categories, $editor_context) { - if ( class_exists('WP_Block_Editor_Context') && empty( $editor_context->post ) ) { // Introduced WP 5.8 - return $categories; - } - return array_merge( $categories, array(