Registers an instance of the widget class.
Parameters
$number
intoptional- The unique order number of this widget instance compared to other instances of the same class.
Default:
-1
Source
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 )
);
}
Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.