WordPress at a glance
function is not described

WP_Widget::WP_Widget() public WP 2.8.0

Deprecated from version 4.3.0. It is no longer supported and can be removed in future releases. Use __construct() instead.

PHP4 constructor.

{} It's a method of the class: WP_Widget{}

No Hooks.

Return

null. Nothing.

Usage

$WP_Widget = new WP_Widget();
$WP_Widget->WP_Widget( $id_base, $name, $widget_options, $control_options );
$id_base(string) (required)
Base ID for the widget, lowercase and unique. If left empty, a portion of the widget's class name will be used. Has to be unique.
$name(string) (required)
Name for the widget displayed on the configuration page.
$widget_options(array)
Widget options. See wp_register_sidebar_widget()() for information on accepted arguments.
Default: empty array
$control_options(array)
Widget control options. See wp_register_widget_control()() for information on accepted arguments.
Default: empty array

Notes

  • See: WP_Widget::__construct()

Changelog

Since 2.8.0 Introduced.
Deprecated Since 4.3.0 Use __construct() instead.

Code of WP_Widget::WP_Widget() WP 5.7.2

<?php
public function WP_Widget( $id_base, $name, $widget_options = array(), $control_options = array() ) {
	_deprecated_constructor( 'WP_Widget', '4.3.0', get_class( $this ) );
	WP_Widget::__construct( $id_base, $name, $widget_options, $control_options );
}