WP_Widget::widget()publicWP 2.8.0

Echoes the widget content.

Subclasses should override this function to generate their widget code.

Метод класса: WP_Widget{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WP_Widget = new WP_Widget();
$WP_Widget->widget( $args, $instance );
$args(массив) (обязательный)
Display arguments including 'before_title', 'after_title', 'before_widget', and 'after_widget'.
$instance(массив) (обязательный)
The settings for the particular instance of the widget.

Список изменений

С версии 2.8.0 Введена.

Код WP_Widget::widget() WP 6.5.2

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