WordPress Version: 5.5
/**
* Registers the `core/social-link` blocks.
*/
function register_block_core_social_link()
{
register_block_type_from_metadata(__DIR__ . '/social-link', array('render_callback' => 'render_block_core_social_link'));
}
The timeline below displays how wordpress function register_block_core_social_link has changed across different WordPress versions. If a version is not listed, refer to the next available version below.
/**
* Registers the `core/social-link` blocks.
*/
function register_block_core_social_link()
{
register_block_type_from_metadata(__DIR__ . '/social-link', array('render_callback' => 'render_block_core_social_link'));
}
/**
* Registers the `core/social-link` blocks.
*/
function register_block_core_social_link()
{
$path = __DIR__ . '/social-link/block.json';
$metadata = json_decode(file_get_contents($path), true);
register_block_type($metadata['name'], array_merge($metadata, array('render_callback' => 'render_block_core_social_link')));
}