diff --git a/src/wp-includes/rest-api.php b/src/wp-includes/rest-api.php index d0066ff0fe..a2e3363951 100644 --- a/src/wp-includes/rest-api.php +++ b/src/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'] ) ) {