WP_REST_Widgets_Controller::check_read_sidebar_permission() – Checks if a sidebar can be read publicly.
You appear to be a bot. Output may be restricted
Description
Checks if a sidebar can be read publicly.
Usage
$bool = WP_REST_Widgets_Controller::check_read_sidebar_permission( $sidebar_id );
Parameters
- $sidebar_id
- ( string ) required – The sidebar ID.
Returns
bool Whether the sidebar can be read.
Source
File name: wordpress/wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php
Lines:
1 to 6 of 6
protected function check_read_sidebar_permission( $sidebar_id ) { $sidebar = wp_get_sidebar( $sidebar_id ); return ! empty( $sidebar['show_in_rest'] ); }