wp_sidebar_description( string $id ): string|void

Retrieve description for a sidebar.

Description

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

Parameters

$idstringrequired
sidebar ID.

Return

string|void Sidebar description, if available.

Source

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' );
	}
}

Changelog

VersionDescription
2.9.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.