From e82474c53673e7b6ba5081bc2c7f98c52d18dd09 Mon Sep 17 00:00:00 2001 From: "K. Adam White" Date: Thu, 24 Aug 2023 20:21:35 +0000 Subject: [PATCH] REST API: Remove misleading comment in WP_REST_Blocks_Controller->get_item_schema. In r56093 schema caching was added above a comment instructing developers not to cache that controller's schema. However, there is no obvious penalty for re-caching schema that is partially derived from a parent. Caching schema in the same way in every controller is beneficial consistency, and discussion at WCUS2023 contributor day concluded we could remove this comment. Props ahardyjpl, davidbinda, johnjamesjacoby, TimothyBlynJacobs. Fixes #59193. See #58657. git-svn-id: https://develop.svn.wordpress.org/trunk@56459 602fd350-edb4-49c9-b593-d223f7449a82 --- .../rest-api/endpoints/class-wp-rest-blocks-controller.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-blocks-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-blocks-controller.php index 37178bb837..a270e0ff48 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-blocks-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-blocks-controller.php @@ -75,7 +75,6 @@ class WP_REST_Blocks_Controller extends WP_REST_Posts_Controller { return $this->add_additional_fields_schema( $this->schema ); } - // Do not cache this schema because all properties are derived from parent controller. $schema = parent::get_item_schema(); /*