wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



esc_attr_x › WordPress Function

Desde2.8.0
Obsoleton/a
esc_attr_x ( $text, $context, $domain = 'default' )
Parâmetros: (3)
  • (string) $text Text to translate.
    Required: Yes
  • (string) $context Context information for the translators.
    Required: Yes
  • (string) $domain Optional. Text domain. Unique identifier for retrieving translated strings. Default 'default'.
    Required: No
    Padrão: 'default'
Retorna:
  • (string) Translated text.
Definido em:
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.


Fonte

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