$instance =
unserialize( $serialized_instance );
} else { $instance = array
();
} $args = array
( 'widget_id' =>
$widget_object->id,
'widget_name' =>
$widget_object->name,
);
ob_start();
the_widget( $widget_key,
$instance,
$args );
return ob_get_clean();
}/**
* Registers the 'core/legacy-widget' block.
*/
function register_block_core_legacy_widget() { register_block_type_from_metadata( __DIR__ . '/legacy-widget',
array
( 'render_callback' => 'render_block_core_legacy_widget',
)