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



esc_attr__ › WordPress Function

Depuis2.8.0
Dépréciéen/a
esc_attr__ ( $text, $domain = 'default' )
Paramètres: (2)
  • (string) $text Text to translate.
    Requis: Oui
  • (string) $domain Optional. Text domain. Unique identifier for retrieving translated strings. Default 'default'.
    Requis: Non
    Défaut: 'default'
Retourne:
  • (string) Translated text on success, original text on failure.
Défini(e) dans:
Codex:

Retrieves 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.


Source

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