WordPress at Your Fingertips
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.


null. Nothing.


$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.


Since 2.8.0 Introduced.

Code of WP_Widget::widget() WP 5.9

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