Make WordPress Core

Changeset 44698


Ignore:
Timestamp:
01/26/2019 12:28:15 PM (3 years ago)
Author:
ocean90
Message:

REST API: Prevent translating the hook name in a _doing_it_wrong() message by using a placeholder.

See #45265.

File:
1 edited

Legend:

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

    r44568 r44698  
    4646
    4747    if ( ! did_action( 'rest_api_init' ) ) {
    48         _doing_it_wrong( 'register_rest_route', __( 'REST API routes must be registered on the rest_api_init action.' ), '5.1.0' );
     48        _doing_it_wrong(
     49            'register_rest_route',
     50            sprintf(
     51                /* translators: %s: rest_api_init */
     52                __( 'REST API routes must be registered on the %s action.' ),
     53                '<code>rest_api_init</code>'
     54            ),
     55            '5.1.0'
     56        );
    4957    }
    5058
Note: See TracChangeset for help on using the changeset viewer.