描述:
注销指定的主题侧边栏
用法:
<?php unregister_sidebar( $id ); ?>
参数:
$id
(string) (必填) 要注销的侧边栏ID
默认值: None
源文件:
/**
* Removes a sidebar from the list.
*
* @since 2.2.0
*
* @global array $wp_registered_sidebars Stores the new sidebar in this array by sidebar ID.
*
* @param string $name The ID of the sidebar when it was added.
*/
function unregister_sidebar( $name ) {
global $wp_registered_sidebars;
unset( $wp_registered_sidebars[ $name ] );
}