function gutenberg_register_block_core_categories in Gutenberg 8
Same name and namespace in other branches
- 8.2 vendor/gutenberg/block-library/blocks/categories.php \gutenberg_register_block_core_categories()
Registers the `core/categories` block on server.
1 string reference to 'gutenberg_register_block_core_categories'
- categories.php in vendor/
gutenberg/ block-library/ blocks/ categories.php
File
- vendor/
gutenberg/ block-library/ blocks/ categories.php, line 91
Code
function gutenberg_register_block_core_categories() {
register_block_type('core/categories', array(
'attributes' => array(
'align' => array(
'type' => 'string',
'enum' => array(
'left',
'center',
'right',
'wide',
'full',
),
),
'className' => array(
'type' => 'string',
),
'displayAsDropdown' => array(
'type' => 'boolean',
'default' => false,
),
'showHierarchy' => array(
'type' => 'boolean',
'default' => false,
),
'showPostCounts' => array(
'type' => 'boolean',
'default' => false,
),
),
'render_callback' => 'gutenberg_render_block_core_categories',
));
}