WP_Widget::widget
Echoes the widget content.
Subclasses should override this function to generate their widget code.
Method of the class: WP_Widget{}
No Hooks.
Returns
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() WP Widget::widget code WP 7.0
public function widget( $args, $instance ) {
die( 'function WP_Widget::widget() must be overridden in a subclass.' );
}