WP_Widget::WP_Widget( string $id_base, string $name, array $widget_options = array(), array $control_options = array() )

This method has been deprecated. Use WP_Widget::__construct() instead.

PHP4 constructor.

Description

See also

Parameters

$id_basestringrequired
Base ID for the widget, lowercase and unique. If left empty, a portion of the widget’s PHP class name will be used. Has to be unique.
$namestringrequired
Name for the widget displayed on the configuration page.
$widget_optionsarrayoptional
Widget options. See wp_register_sidebar_widget() for information on accepted arguments.

Default:array()

$control_optionsarrayoptional
Widget control options. See wp_register_widget_control() for information on accepted arguments.

Default:array()

Source

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 );
}

Changelog

VersionDescription
4.3.0Use __construct() instead.
2.8.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.