REST API: Make strings translatable in `register_rest_route`.

Adds i18n to the `doing_it_wrong()` messages for invalid parameters within `register_rest_route()`.

Props Latz,danielbachhuber.
Fixes #34902



git-svn-id: https://develop.svn.wordpress.org/trunk@35822 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Rachel Baker 2015-12-07 22:39:25 +00:00
parent 5b025834f9
commit 5ddbe89dc8
1 changed files with 2 additions and 2 deletions

View File

@ -39,10 +39,10 @@ function register_rest_route( $namespace, $route, $args = array(), $override = f
* and namespace indexes. If you really need to register a * and namespace indexes. If you really need to register a
* non-namespaced route, call `WP_REST_Server::register_route` directly. * non-namespaced route, call `WP_REST_Server::register_route` directly.
*/ */
_doing_it_wrong( 'register_rest_route', 'Routes must be namespaced with plugin or theme name and version.', '4.4.0' ); _doing_it_wrong( 'register_rest_route', __( 'Routes must be namespaced with plugin or theme name and version.' ), '4.4.0' );
return false; return false;
} else if ( empty( $route ) ) { } else if ( empty( $route ) ) {
_doing_it_wrong( 'register_rest_route', 'Route must be specified.', '4.4.0' ); _doing_it_wrong( 'register_rest_route', __( 'Route must be specified.' ), '4.4.0' );
return false; return false;
} }