WordPress开发者和主题制作者的搜索引擎



wp_sidebar_description ›

Since2.9.0
已弃用n/a
wp_sidebar_description ( $id )
参数:
  • (string) $id sidebar ID.
    Required: Yes
返回:
  • (string|void) Sidebar description, if available.
定义在:
文档:

Retrieve description for a sidebar.

When registering sidebars a 'description' parameter can be included that describes the sidebar for display on the widget administration panel.



源码

function wp_sidebar_description( $id ) {
	if ( ! is_scalar( $id ) ) {
		return;
	}

	global $wp_registered_sidebars;

	if ( isset( $wp_registered_sidebars[ $id ]['description'] ) ) {
		return wp_kses( $wp_registered_sidebars[ $id ]['description'], 'sidebar_description' );
	}
}