WP_Widget::widget()publicWP 2.8.0

Echoes the widget content.

Subclasses should override this function to generate their widget code.

Method of the class: WP_Widget{}

No Hooks.

Return

null. Nothing (null).

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.

WP_Widget::widget() code WP 6.5.2

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