function register_legacy_post_comments_block() { $registry = WP_Block_Type_Registry::
get_instance();
/*
* Remove the old `post-comments` block if it was already registered, as it
* is about to be replaced by the type defined below.
*/
if ( $registry->
is_registered( 'core/post-comments'
) ) { unregister_block_type( 'core/post-comments'
);
} // Recreate the legacy block metadata.
$metadata = array
( 'name' => 'core/post-comments',
'category' => 'theme',
'attributes' => array
( 'textAlign' => array
( 'type' => 'string',
),
),