WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/unregister sidebar widget


This function has been deprecated since Version 2.8. That means it has been replaced by a new function or is no longer supported, and may be removed from future versions. All code that uses this function should be converted to use its replacement if one exists. See also wp-includes/deprecated.php. Use wp_unregister_sidebar_widget instead.

Description

Makes a previously available widget unavailable. This is most commonly used within a theme's functions.php to disable a widget that does not work well in that theme's sidebar.

Usage

 <?php unregister_sidebar_widget$id ); ?> 

Parameters

$id
(string/int) (required) Widget ID.
Default: None

Example

Notes

Change Log

  • Deprecated: 2.8.0
  • Since: 2.2.0

Source File

unregister_sidebar_widget() was located in wp-includes/widgets.php. Upon deprecation it was moved to wp-includes/deprecated.php.

Related

Widgets: is_active_widget(), the_widget(), register_widget(), unregister_widget(), wp_register_widget_control(), wp_unregister_widget_control(), wp_convert_widget_settings(), wp_get_widget_defaults(), wp_widget_description()

See also index of Function Reference and index of Template Tags.