Make WordPress Core

Changeset 53678


Ignore:
Timestamp:
07/07/2022 12:19:41 PM (17 months ago)
Author:
audrasjb
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.php

    r53504 r53678  
    746746
    747747        $schema['properties']['type_label'] = array(
    748             'description' => __( 'Name of type.' ),
     748            'description' => __( 'The singular label used to describe this type of menu item.' ),
    749749            'type'        => 'string',
    750750            'context'     => array( 'view', 'edit', 'embed' ),
     
    841841                '',
    842842            ),
    843         );
    844 
    845         $schema['properties']['type_label'] = array(
    846             'description' => __( 'The singular label used to describe this type of menu item.' ),
    847             'context'     => array( 'view', 'edit', 'embed' ),
    848             'type'        => 'string',
    849             'readonly'    => true,
    850843        );
    851844
Note: See TracChangeset for help on using the changeset viewer.