WordPress at a glance
function is not described

WP_Widget::widget() public WP 2.8.0

Echoes the widget content.

Subclasses should override this function to generate their widget code.

{} It's a method of the class: WP_Widget{}

No Hooks.

Return

null. Nothing.

Usage

$WP_Widget = new WP_Widget();
$WP_Widget->widget( $args, $instance );
$args(array) (required)
Display arguments including 'before_title', 'after_title', 'before_widget', and 'after_widget'.
$instance(array) (required)
The settings for the particular instance of the widget.

Changelog

Since 2.8.0 Introduced.

Code of WP_Widget::widget() WP 5.7.2

<?php
public function widget( $args, $instance ) {
	die( 'function WP_Widget::widget() must be overridden in a subclass.' );
}