WordPress at Your Fingertips
function is not described

WP_Widget::_set() public WP 2.8.0

Sets the internal order number for the widget instance.

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

No Hooks.


null. Nothing.


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

Code of WP_Widget::_set() WP 5.8.3

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