Registers an instance of the widget class.
$numberintoptional
Default:-1
public function _register_one( $number = -1 ) {
wp_register_sidebar_widget(
$this->id,
$this->name,
$this->_get_display_callback(),
$this->widget_options,
array( 'number' => $number )
);
_register_widget_update_callback(
$this->id_base,
$this->_get_update_callback(),
$this->control_options,
array( 'number' => -1 )
);
_register_widget_form_callback(
$this->id,
$this->name,
$this->_get_form_callback(),
$this->control_options,
array( 'number' => $number )
);
}
| Version | Description |
|---|---|
| 2.8.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_widget/_register_one