WordPress.org

Make WordPress Core

Ticket #38736: 38736.patch

File 38736.patch, 798 bytes (added by johnjamesjacoby, 5 years ago)

Add $domain parameter

  • src/wp-includes/l10n.php

    diff --git src/wp-includes/l10n.php src/wp-includes/l10n.php
    index 39346c4..3a7f001 100644
     
    933933 * won't suffer from that problem.
    934934 *
    935935 * @since 2.8.0
     936 * @since 4.8.0 Added $domain parameter
    936937 *
    937938 * @param string $name The role name.
     939 * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings. Default 'default'.
    938940 * @return string Translated role name on success, original name on failure.
    939941 */
    940 function translate_user_role( $name ) {
    941         return translate_with_gettext_context( before_last_bar($name), 'User role' );
     942function translate_user_role( $name, $domain = 'default' ) {
     943        return translate_with_gettext_context( before_last_bar($name), 'User role', $domain );
    942944}
    943945
    944946/**