unregister_sidebar()

unregister_sidebar( string|int $sidebar_id ) 从列表中删除边栏。 …

unregister_sidebar( string|int $sidebar_id )

从列表中删除边栏。
Removes a sidebar from the list.

目录锚点:#参数#源码#笔记


参数(Parameters)

参数 类型 说明
$sidebar_id (string | int) 侧边栏注册时的ID。

源码(Source)

/**
 * 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 ] );
}
更新版本 源码位置 使用 被使用
2.2.0 wp-includes/widgets.php 7 3

笔记(Notes)

基本示例

类别:WordPress 函数手册

本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。

评论 (0)COMMENT

登录 账号发表你的看法,还没有账号?立即免费 注册