WordPress at a glance

unregister_sidebar() WP 1.0

Removes a sidebar from the list.

No Hooks.

Return

Null. Nothing.

Usage

unregister_sidebar( $sidebar_id );
$sidebar_id(string/int) (required)
The ID of the sidebar when it was registered.

Notes

  • Global. Array. $wp_registered_sidebars Registered sidebars.

Changelog

Since 2.2.0 Introduced.

Code of unregister_sidebar() WP 5.5.1

<?php
function unregister_sidebar( $sidebar_id ) {
	global $wp_registered_sidebars;

	unset( $wp_registered_sidebars[ $sidebar_id ] );
}

From tag: Sidebar (widgets)

No comments
    Log In . Register