WordPress at a glance

wp_unregister_sidebar_widget() WP 1.0

Remove widget from sidebar.

Hooks from function:
Return

Nothing (null).

Usage

wp_unregister_sidebar_widget( $id );
$id(int/string) (required)
Widget ID.

Code of wp_unregister_sidebar_widget: wp-includes/widgets.php VER 4.9.8

<?php
function wp_unregister_sidebar_widget($id) {

	/**
	 * Fires just before a widget is removed from a sidebar.
	 *
	 * @since 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);
}

Related Functions

From tag: Sidebar (widgets)

No comments
    Hello, !     Log In . Register