函数原型
is_registered_sidebar( string|int $sidebar_id ): bool
函数描述
Checks if a sidebar is registered.
是否弃用
未弃用
函数参数
-
$sidebar_id
string|int
Required - The ID of the sidebar when it was registered.
函数返回值
bool True if the sidebar is registered, false otherwise.
函数位置
File: wp-includes/widgets.php.
函数源码
function is_registered_sidebar( $sidebar_id ) {
global $wp_registered_sidebars;
return isset( $wp_registered_sidebars[ $sidebar_id ] );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |

