Un motore di ricerca WordPress per sviluppatori e autori di temi



esc_attr__ ›

Da2.8.0
Deprecaton/a
esc_attr__ ( $text, $domain = 'default' )
Parametri: (2)
  • (string) $text Text to translate.
    Richiesto:
  • (string) $domain Optional. Text domain. Unique identifier for retrieving translated strings. Default 'default'.
    Richiesto: No
    Default: 'default'
Ritorna:
  • (string) Translated text on success, original text on failure.
Definito a:
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.



Sorgenti

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