WP_Widget::_set()publicWP 2.8.0

Sets the internal order number for the widget instance.

Method of the class: WP_Widget{}

No Hooks.

Return

null. Nothing (null).

Usage

$WP_Widget = new WP_Widget();
$WP_Widget->_set( $number );
$number(int) (required)
The unique order number of this widget instance compared to other instances of the same class.

Changelog

Since 2.8.0 Introduced.

WP_Widget::_set() code WP 6.5.2

public function _set( $number ) {
	$this->number = $number;
	$this->id     = $this->id_base . '-' . $number;
}