WordPress Version: 5.5
/**
* Registers the `core/search` block on the server.
*/
function register_block_core_search()
{
register_block_type_from_metadata(__DIR__ . '/search', array('render_callback' => 'render_block_core_search'));
}
The timeline below displays how wordpress function register_block_core_search has changed across different WordPress versions. If a version is not listed, refer to the next available version below.
/**
* Registers the `core/search` block on the server.
*/
function register_block_core_search()
{
register_block_type_from_metadata(__DIR__ . '/search', array('render_callback' => 'render_block_core_search'));
}
/**
* Registers the `core/search` block on the server.
*/
function register_block_core_search()
{
register_block_type('core/search', array('attributes' => array('align' => array('type' => 'string', 'enum' => array('left', 'center', 'right', 'wide', 'full')), 'className' => array('type' => 'string'), 'label' => array('type' => 'string', 'default' => __('Search')), 'placeholder' => array('type' => 'string', 'default' => ''), 'buttonText' => array('type' => 'string', 'default' => __('Search'))), 'render_callback' => 'render_block_core_search'));
}
/**
* Registers the `core/search` block on the server.
*/
function register_block_core_search()
{
register_block_type('core/search', array('attributes' => array('label' => array('type' => 'string', 'default' => __('Search')), 'placeholder' => array('type' => 'string', 'default' => ''), 'buttonText' => array('type' => 'string', 'default' => __('Search'))), 'render_callback' => 'render_block_core_search'));
}