From 105375cce7e1afc0708da724e5466239b0365519 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 6 Jan 2020 16:45:58 +0000 Subject: [PATCH] REST API: Display the taxonomy name in the `_doing_it_wrong()` message for a conflicting `rest_base` or `name` property, to match the translator comment. Follow-up to [47037]. See #48401. git-svn-id: https://develop.svn.wordpress.org/trunk@47045 602fd350-edb4-49c9-b593-d223f7449a82 --- .../rest-api/endpoints/class-wp-rest-posts-controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php index f97a2e898a..511cb34efa 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php @@ -2249,9 +2249,9 @@ class WP_REST_Posts_Controller extends WP_REST_Controller { _doing_it_wrong( 'register_taxonomy', sprintf( - /* translators: 1. The taxonomy name, 2. The property name, either rest_base or name. */ + /* translators: 1. The taxonomy name, 2. The property name, either 'rest_base' or 'name'. */ __( '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.' ), - $base, + $taxonomy->name, $taxonomy_field_name_with_conflict ), '5.4.0'