WP_REST_Sidebars_Controller::check_read_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_Sidebars_Controller::check_read_permission( $sidebar );

Parameters

$sidebar
( array ) required – The registered sidebar configuration.

Returns

bool Whether the side can be read.

Source

File name: wordpress/wp-includes/rest-api/endpoints/class-wp-rest-sidebars-controller.php


Lines:

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

 View on GitHub View on Trac