Fixes new Blocks Category reference. #764.
This commit is contained in:
parent
e623900c2a
commit
93ea87cc7f
|
@ -69,8 +69,6 @@ function tainacan_blocks_register_categories($categories, $editor_context) {
|
|||
'slug' => 'tainacan-blocks',
|
||||
'title' => __( 'Tainacan Blocks', 'tainacan' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'slug' => 'tainacan-blocks-variations',
|
||||
'title' => __( 'Tainacan Query Loop Variations', 'tainacan' ),
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
var g2 = el('g', { transform: 'translate(-85.490815,-209.14412)' });
|
||||
var svgIcon = el( 'svg', { width: 20, height: 20, viewBox: '0 0 20 20'}, path4, path6, path8, path10, path12, path14, path16, path18, path20, g1, g2);
|
||||
|
||||
if (wp.blocks.updateCategory)
|
||||
if (wp.blocks.updateCategory) {
|
||||
wp.blocks.updateCategory( 'tainacan-blocks', { icon: svgIcon } );
|
||||
wp.blocks.updateCategory( 'tainacan-blocks-variations', { icon: svgIcon } );
|
||||
}
|
||||
} )();
|
|
@ -12,6 +12,7 @@ Object.keys(POST_TYPES).forEach((postType) => {
|
|||
name: VARIATION_NAME,
|
||||
title: postName,
|
||||
icon: icon,
|
||||
category: 'tainacan-blocks-variations',
|
||||
description: __('Displays a list of Tainacan itens', 'tainacan'),
|
||||
isActive: ( { namespace, query } ) => {
|
||||
return (
|
||||
|
@ -20,7 +21,6 @@ Object.keys(POST_TYPES).forEach((postType) => {
|
|||
);
|
||||
},
|
||||
attributes: {
|
||||
category: 'tainacan-blocks-variations',
|
||||
namespace: VARIATION_NAME,
|
||||
query: {
|
||||
postType: postType,
|
||||
|
|
Loading…
Reference in New Issue