From e4f28306181b851652b02e8ef6b5d0ecabdac487 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Thu, 7 Jul 2022 12:19:41 +0000 Subject: [PATCH] REST API: Consolidate menu item `type_label` schema declaration. This changeset removes a duplicate definition of the `type_label` property and consolidates the description of this property. Props dlh, SergeyBiryukov. Fixes #56072. git-svn-id: https://develop.svn.wordpress.org/trunk@53678 602fd350-edb4-49c9-b593-d223f7449a82 --- .../endpoints/class-wp-rest-menu-items-controller.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.php index 8b57909169..7d4102a483 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.php @@ -745,7 +745,7 @@ class WP_REST_Menu_Items_Controller extends WP_REST_Posts_Controller { ); $schema['properties']['type_label'] = array( - 'description' => __( 'Name of type.' ), + 'description' => __( 'The singular label used to describe this type of menu item.' ), 'type' => 'string', 'context' => array( 'view', 'edit', 'embed' ), 'readonly' => true, @@ -842,13 +842,6 @@ class WP_REST_Menu_Items_Controller extends WP_REST_Posts_Controller { ), ); - $schema['properties']['type_label'] = array( - 'description' => __( 'The singular label used to describe this type of menu item.' ), - 'context' => array( 'view', 'edit', 'embed' ), - 'type' => 'string', - 'readonly' => true, - ); - $schema['properties']['url'] = array( 'description' => __( 'The URL to which this menu item points.' ), 'type' => 'string',