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



esc_attr_x › WordPress Function

Depuis2.8.0
Dépréciéen/a
esc_attr_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 an attribute.

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


Source

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