Brings back our categories to the inserter even in the widgets editor.

This commit is contained in:
mateuswetah 2021-07-22 17:59:50 -03:00
parent 43d0d51795
commit 165bdc2bd6
1 changed files with 0 additions and 6 deletions

View File

@ -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(