Make WordPress Core


Ignore:
Timestamp:
01/06/2020 05:07:52 PM (5 years ago)
Author:
SergeyBiryukov
Message:

REST API: Display the actual conflicting value in addition to the taxonomy name in the _doing_it_wrong() message for a conflicting rest_base or name property.

Follow-up to [47037] and [47045].

Props TimothyBlynJacobs.
See #48401.

File:
1 edited

Legend:

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

    r47045 r47046  
    22502250                    'register_taxonomy',
    22512251                    sprintf(
    2252                         /* translators: 1. The taxonomy name, 2. The property name, either 'rest_base' or 'name'. */
    2253                         __( 'The "%1$s" taxonomy "%2$s" conflicts with an existing property on the REST API Posts Controller. Specify a custom "rest_base" when registering the taxonomy to avoid this error.' ),
     2252                        /* translators: 1. The taxonomy name, 2. The property name, either 'rest_base' or 'name', 3. The conflicting value. */
     2253                        __( 'The "%1$s" taxonomy "%2$s" property (%3$s) conflicts with an existing property on the REST API Posts Controller. Specify a custom "rest_base" when registering the taxonomy to avoid this error.' ),
    22542254                        $taxonomy->name,
    2255                         $taxonomy_field_name_with_conflict
     2255                        $taxonomy_field_name_with_conflict,
     2256                        $base
    22562257                    ),
    22572258                    '5.4.0'
Note: See TracChangeset for help on using the changeset viewer.