is_registered_sidebar() - WordPress 函数参考中文文档

返回介绍

is_registered_sidebar()

发布于 2017-09-11 字数1735 浏览 1089 评论 0

is_registered_sidebar( string|int $sidebar_id )

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 描述
4.4.0 Introduced.

相关函数

Used By

  • wp-includes/class-wp-customize-widgets.php:
    WP_Customize_Widgets::render_widget_partial()
  • wp-includes/class-wp-customize-widgets.php:
    WP_Customize_Widgets::filter_dynamic_sidebar_params()
  • wp-includes/widgets.php:
    register_sidebars()
  • wp-includes/class-wp-customize-widgets.php:
    WP_Customize_Widgets::tally_sidebars_via_is_active_sidebar_calls()
  • wp-includes/class-wp-customize-widgets.php:
    WP_Customize_Widgets::tally_sidebars_via_dynamic_sidebar_calls()
  • wp-includes/class-wp-customize-widgets.php:
    WP_Customize_Widgets::customize_register()
  • Show 1 more used by
    Hide more used by


User Contributed Notes

上一篇:is_redirect()

下一篇:is_robots()

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!