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
This commit is contained in:
Jb Audras 2022-07-07 12:19:41 +00:00
parent e94cd298c6
commit e4f2830618

View File

@ -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',