WP_Widget::WP_Widget

DeprecatedDeprecated

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

SummerySummery

PHP4 constructor.

Syntax

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

ParametersParameters

$id_base

(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.

$name

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

$widget_options

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

Default value: array()

$control_options

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

Default value: array()

SourceSource

File: wp-includes/class-wp-widget.php


			

ChangelogChangelog

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

See alsoSee also

Scroll to Top