WordPress.org

Make WordPress Core

Ticket #38736: 38736.2.diff

File 38736.2.diff, 919 bytes (added by ocean90, 3 years ago)
  • src/wp-includes/l10n.php

     
    12321232 * won't suffer from that problem.
    12331233 *
    12341234 * @since 2.8.0
     1235 * @since 5.2.0 Added the `$domain` parameter.
    12351236 *
    1236  * @param string $name The role name.
     1237 * @param string $name   The role name.
     1238 * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
     1239 *                       Default 'default'.
    12371240 * @return string Translated role name on success, original name on failure.
    12381241 */
    1239 function translate_user_role( $name ) {
    1240         return translate_with_gettext_context( before_last_bar( $name ), 'User role' );
     1242function translate_user_role( $name, $domain = 'default' ) {
     1243        return translate_with_gettext_context( before_last_bar( $name ), 'User role', $domain );
    12411244}
    12421245
    12431246/**