On this page
WP_Widget::_set( int $number )
Sets the internal order number for the widget instance.
Parameters
$numberint Required-
The unique order number of this widget instance compared to other instances of the same class.
Source
File: wp-includes/class-wp-widget.php. View all references
public function _set( $number ) {
$this->number = $number;
$this->id = $this->id_base . '-' . $number;
}
Related
Used By
| Used By | Description |
|---|---|
| WP_Widget::display_callback() wp-includes/class-wp-widget.php | Generates the actual widget content (Do NOT override). |
| WP_Widget::update_callback() wp-includes/class-wp-widget.php | Handles changed settings (Do NOT override). |
| WP_Widget::form_callback() wp-includes/class-wp-widget.php | Generates the widget control form (Do NOT override). |
| WP_Widget::_register() wp-includes/class-wp-widget.php | Register all widget instances of this widget class. |
Changelog
| Version | Description |
|---|---|
| 2.8.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_widget/_set