From fe73f310d4502c978650da998fe985c9c6f9dba0 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Sat, 26 Jan 2019 12:29:54 +0000 Subject: [PATCH] REST API: Prevent translating the hook name in a `_doing_it_wrong()` message by using a placeholder. See #45265. Built from https://develop.svn.wordpress.org/trunk@44698 git-svn-id: http://core.svn.wordpress.org/trunk@44529 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/rest-api.php | 10 +++++++++- wp-includes/version.php | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/wp-includes/rest-api.php b/wp-includes/rest-api.php index d0066ff0fe..a2e3363951 100644 --- a/wp-includes/rest-api.php +++ b/wp-includes/rest-api.php @@ -45,7 +45,15 @@ function register_rest_route( $namespace, $route, $args = array(), $override = f } if ( ! did_action( 'rest_api_init' ) ) { - _doing_it_wrong( 'register_rest_route', __( 'REST API routes must be registered on the rest_api_init action.' ), '5.1.0' ); + _doing_it_wrong( + 'register_rest_route', + sprintf( + /* translators: %s: rest_api_init */ + __( 'REST API routes must be registered on the %s action.' ), + 'rest_api_init' + ), + '5.1.0' + ); } if ( isset( $args['args'] ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 7dec39a496..f6040a906f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.1-beta2-44697'; +$wp_version = '5.1-beta2-44698'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.