wp_register_sidebar_widget ( $id, $name, $output_callback, $options = array() )

  • (int|string) $id Widget ID.
  • (string) $name Widget display title.
  • (callable) $output_callback Run when widget is called.
  • (array) $options { Optional. An array of supplementary widget options for the instance.
  • (mixed) ...$params Optional additional parameters to pass to the callback function when it's called.
Defined at:


Register an instance of a widget.

The default widget option is 'classname' that can be overridden.

The function can also be used to un-register widgets when $output_callback parameter is an empty string.

Related Functions

wp_unregister_sidebar_widget, register_sidebar_widget, unregister_sidebar_widget, wp_set_sidebars_widgets, wp_get_sidebars_widgets

Top Google Results

User discussions

wpseek mobile