WP_REST_Sidebars_Controller::get_sidebar( string|int $id ): array|null

Retrieves the registered sidebar with the given id.

Parameters

$id string|int Required
ID of the sidebar.

Return

array|null The discovered sidebar, or null if it is not registered.

Source

File: wp-includes/rest-api/endpoints/class-wp-rest-sidebars-controller.php. View all references

protected function get_sidebar( $id ) {
	return wp_get_sidebar( $id );
}

Uses

Uses Description

Used By

Used By Description

Changelog

Version Description
5.8.0 Introduced.

© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_sidebars_controller/get_sidebar