Make WordPress Core

Changeset 35822


Ignore:
Timestamp:
12/07/2015 10:39:25 PM (8 years ago)
Author:
rachelbaker
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api.php

    r35718 r35822  
    4040         * non-namespaced route, call `WP_REST_Server::register_route` directly.
    4141         */
    42         _doing_it_wrong( 'register_rest_route', 'Routes must be namespaced with plugin or theme name and version.', '4.4.0' );
     42        _doing_it_wrong( 'register_rest_route', __( 'Routes must be namespaced with plugin or theme name and version.' ), '4.4.0' );
    4343        return false;
    4444    } else if ( empty( $route ) ) {
    45         _doing_it_wrong( 'register_rest_route', 'Route must be specified.', '4.4.0' );
     45        _doing_it_wrong( 'register_rest_route', __( 'Route must be specified.' ), '4.4.0' );
    4646        return false;
    4747    }
Note: See TracChangeset for help on using the changeset viewer.