WordPress at a glance

esc_attr__() WP 1.0

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.

Works based on: esc_attr()

No Hooks.


String. Translated text on success, original text on failure.


esc_attr__( $text, $domain );
$text(string) (required)
Text to translate.
Text domain. Unique identifier for retrieving translated strings.
Default: 'default'

Code of esc_attr__: wp-includes/l10n.php VER 4.9.8

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

Related Functions

From category: Localization

No comments
    Hello, !     Log In . Register