On this page
WP_REST_Sidebars_Controller::check_read_permission( array $sidebar ): bool
Checks if a sidebar can be read publicly.
Parameters
$sidebararray Required-
The registered sidebar configuration.
Return
bool Whether the side can be read.
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-sidebars-controller.php. View all references
protected function check_read_permission( $sidebar ) {
return ! empty( $sidebar['show_in_rest'] );
}
Related
Used By
| Used By | Description |
|---|---|
| WP_REST_Sidebars_Controller::get_items_permissions_check() wp-includes/rest-api/endpoints/class-wp-rest-sidebars-controller.php | Checks if a given request has access to get sidebars. |
| WP_REST_Sidebars_Controller::get_items() wp-includes/rest-api/endpoints/class-wp-rest-sidebars-controller.php | Retrieves the list of sidebars (active or inactive). |
| WP_REST_Sidebars_Controller::get_item_permissions_check() wp-includes/rest-api/endpoints/class-wp-rest-sidebars-controller.php | Checks if a given request has access to get a single sidebar. |
Changelog
| Version | Description |
|---|---|
| 5.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_sidebars_controller/check_read_permission