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

esc_attr_x ›

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:

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.


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