wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



esc_html_x › WordPress Function

Depuis2.9.0
Dépréciéen/a
esc_html_x ( $text, $context, $domain = 'default' )
Paramètres: (3)
  • (string) $text Text to translate.
    Requis: Oui
  • (string) $context Context information for the translators.
    Requis: Oui
  • (string) $domain Optional. Text domain. Unique identifier for retrieving translated strings. Default 'default'.
    Requis: Non
    Défaut: 'default'
Retourne:
  • (string) Translated text.
Défini(e) dans:
Codex:

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.


Fonctions en relation: esc_html_e, esc_html__, esc_html, esc_xml, esc_attr_x

Source

function esc_html_x( $text, $context, $domain = 'default' ) {
	return esc_html( translate_with_gettext_context( $text, $context, $domain ) );
}