Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



esc_attr_x ›

Seit2.8.0
Veraltetn/v
esc_attr_x ( $text, $context, $domain = 'default' )
Parameter: (3)
  • (string) $text Text to translate.
    Erforderlich: Ja
  • (string) $context Context information for the translators.
    Erforderlich: Ja
  • (string) $domain Optional. Text domain. Unique identifier for retrieving translated strings. Default 'default'.
    Erforderlich: Nein
    Standard: 'default'
Gibt zurück:
  • (string) Translated text.
Definiert in:
Codex:

Translate string with gettext context, and escapes it for safe use in an attribute.

If there is no translation, or the text domain isn't loaded, the original text is escaped and returned.


Quellcode

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