register_block_core_categories

The timeline below displays how wordpress function register_block_core_categories has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.5

/**
 * Registers the `core/categories` block on server.
 */
function register_block_core_categories()
{
    register_block_type_from_metadata(__DIR__ . '/categories', array('render_callback' => 'render_block_core_categories'));
}

WordPress Version: 5.3

/**
 * Registers the `core/categories` block on server.
 */
function 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' => 'render_block_core_categories'));
}

WordPress Version: 5.0

/**
 * Registers the `core/categories` block on server.
 */
function register_block_core_categories()
{
    register_block_type('core/categories', array('render_callback' => 'render_block_core_categories'));
}