On this page
WP_Widget::widget( array $args, array $instance )
Echoes the widget content.
Description
Subclasses should override this function to generate their widget code.
Parameters
$argsarray Required-
Display arguments including
'before_title','after_title','before_widget', and'after_widget'. $instancearray Required-
The settings for the particular instance of the widget.
Source
File: wp-includes/class-wp-widget.php. View all references
public function widget( $args, $instance ) {
die( 'function WP_Widget::widget() must be overridden in a subclass.' );
}
Related
Used By
| Used By | Description |
|---|---|
| WP_Widget::display_callback() wp-includes/class-wp-widget.php | Generates the actual widget content (Do NOT override). |
Changelog
| Version | Description |
|---|---|
| 2.8.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/WP_Widget/widget