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



esc_attr__ ›

Desde2.8.0
Obsoleton/a
esc_attr__ ( $text, $domain = 'default' )
Parâmetros: (2)
  • (string) $text Text to translate.
    Required: Yes
  • (string) $domain Optional. Text domain. Unique identifier for retrieving translated strings. Default 'default'.
    Required: No
    Padrão: 'default'
Retorna:
  • (string) Translated text on success, original text on failure.
Definido em:
Codex:

Retrieve the translation of $text 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 returned.



Fonte

function esc_attr__( $text, $domain = 'default' ) {
	return esc_attr( translate( $text, $domain ) );
}