I18N: Add `$domain` argument to `translate_user_role()`.
The text domain is optional and gets passed to `translate_with_gettext_context()`. Props johnjamesjacoby . Fixes #38736. Built from https://develop.svn.wordpress.org/trunk@44830 git-svn-id: http://core.svn.wordpress.org/trunk@44662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7d952a7930
commit
24e2829eb9
|
@ -1232,12 +1232,15 @@ function is_textdomain_loaded( $domain ) {
|
|||
* won't suffer from that problem.
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @since 5.2.0 Added the `$domain` parameter.
|
||||
*
|
||||
* @param string $name The role name.
|
||||
* @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
|
||||
* Default 'default'.
|
||||
* @return string Translated role name on success, original name on failure.
|
||||
*/
|
||||
function translate_user_role( $name ) {
|
||||
return translate_with_gettext_context( before_last_bar( $name ), 'User role' );
|
||||
function translate_user_role( $name, $domain = 'default' ) {
|
||||
return translate_with_gettext_context( before_last_bar( $name ), 'User role', $domain );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.2-alpha-44829';
|
||||
$wp_version = '5.2-alpha-44830';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue