wp-includes/rest-api/endpoints/class-wp-rest-view-config-controller.php:70Checks if a given request has access to read view config.
$requestWP_REST_Requesttrue|WP_Error public function get_items_permissions_check( $request ) { $kind = $request->get_param( 'kind' ); $name = $request->get_param( 'name' ); $capability = $this->get_required_capability( $kind, $name ); if ( null === $capability ) { return new WP_Error( 'rest_view_config_invalid_entity', __( 'Invalid entity kind or name.' ), array( 'status' => 404 ) ); } if ( ! current_user_can( $capability ) ) { return new WP_Error( 'rest_cannot_read', __( 'Sorry, you are not allowed to read view config.' ), array( 'status' => rest_authorization_required_code() ) ); } return true; }Introduced in 7.1.0.
Signature, return type and hooks compared across 1 parsed release.
src/wp-includes/rest-api/endpoints/class-wp-rest-view-config-controller.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.