WP_REST_Sidebars_Controller::check_read_permission()
Checks if a sidebar can be read publicly.
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. |
WP_REST_Sidebars_Controller::check_read_permission() WP REST Sidebars Controller::check read permission code WP 6.6.2
protected function check_read_permission( $sidebar ) { return ! empty( $sidebar['show_in_rest'] ); }