Deprecated Deprecated

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

Summery Summery

PHP4 constructor.

Syntax Syntax

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

Parameters Parameters


(string) (Optional) 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.


(string) (Optional) Name for the widget displayed on the configuration page.


(array) (Optional) Widget options. See wp_register_sidebar_widget() for information on accepted arguments.

Default value: array()


(array) (Optional) Widget control options. See wp_register_widget_control() for information on accepted arguments.

Default value: array()

Source Source

File: wp-includes/class-wp-widget.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 );


Changelog Changelog

Version Description
4.3.0 Use __construct() instead.
2.8.0 Introduced.

See also See also


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.