esc_html_x() – Translate string with gettext context, and escapes it for safe use in HTML output.
You appear to be a bot. Output may be restricted
Description
Translates string with gettext context, and escapes it for safe use in HTML output.
If there is no translation, or the text domain isn't loaded, the original text is escaped and returned.
Usage
$string = esc_html_x( $text, $context, $domain );
Parameters
- $text
- ( string ) required – Text to translate.
- $context
- ( string ) required – Context information for the translators.
- $domain
- ( string ) optional default: default – Optional. Text domain. Unique identifier for retrieving translated strings. Default 'default'.
Returns
string Translated text.
Source
File name: wordpress/wp-includes/l10n.php
Lines:
1 to 3 of 3
function esc_html_x( $text, $context, $domain = 'default' ) { return esc_html( translate_with_gettext_context( $text, $context, $domain ) ); }