wp_unregister_sidebar_widget( int|string $id )
Remove widget from sidebar.
Parameters
- $id
-
(Required) Widget ID.
Source
File: wp-includes/widgets.php
function wp_unregister_sidebar_widget($id) {
/**
* Fires just before a widget is removed from a sidebar.
*
* @since WP-3.0.0
*
* @param int $id The widget ID.
*/
do_action( 'wp_unregister_sidebar_widget', $id );
wp_register_sidebar_widget($id, '', '');
wp_unregister_widget_control($id);
}
Changelog
Version | Description |
---|---|
WP-2.2.0 | Introduced. |