WordPress Version: 5.5
/**
* Register archives block.
*/
function register_block_core_archives()
{
register_block_type_from_metadata(__DIR__ . '/archives', array('render_callback' => 'render_block_core_archives'));
}
The timeline below displays how wordpress function register_block_core_archives has changed across different WordPress versions. If a version is not listed, refer to the next available version below.
/**
* Register archives block.
*/
function register_block_core_archives()
{
register_block_type_from_metadata(__DIR__ . '/archives', array('render_callback' => 'render_block_core_archives'));
}
/**
* Register archives block.
*/
function register_block_core_archives()
{
register_block_type('core/archives', array('attributes' => array('align' => array('type' => 'string', 'enum' => array('left', 'center', 'right', 'wide', 'full')), 'className' => array('type' => 'string'), 'displayAsDropdown' => array('type' => 'boolean', 'default' => false), 'showPostCounts' => array('type' => 'boolean', 'default' => false)), 'render_callback' => 'render_block_core_archives'));
}
/**
* Register archives block.
*/
function register_block_core_archives()
{
register_block_type('core/archives', array('attributes' => array('align' => array('type' => 'string'), 'className' => array('type' => 'string'), 'displayAsDropdown' => array('type' => 'boolean', 'default' => false), 'showPostCounts' => array('type' => 'boolean', 'default' => false)), 'render_callback' => 'render_block_core_archives'));
}