WP_REST_Sidebars_Controller::check_read_permission()protectedWP 5.9.0

Checks if a sidebar can be read publicly.

{} It's a method of the class: WP_REST_Sidebars_Controller{}

No Hooks.

Return

true|false. Whether the side can be read.

Usage

// protected - for code of main (parent) or child class
$result = $this->check_read_permission( $sidebar );
$sidebar(array) (required)
The registered sidebar configuration.

Changelog

Since 5.9.0 Introduced.

Code of WP_REST_Sidebars_Controller::check_read_permission() WP 6.0

protected function check_read_permission( $sidebar ) {
	return ! empty( $sidebar['show_in_rest'] );
}