esc_attr__() – Retrieve the translation of $text and escapes it for safe use in an attribute.
You appear to be a bot. Output may be restricted
Description
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.
Usage
$string = esc_attr__( $text, $domain );
Parameters
- $text
- ( string ) required – Text to translate.
- $domain
- ( string ) optional default: default – Optional. Text domain. Unique identifier for retrieving translated strings. Default 'default'.
Returns
string Translated text on success, original text on failure.
Source
File name: wordpress/wp-includes/l10n.php
Lines:
1 to 3 of 3
function esc_attr__( $text, $domain = 'default' ) { return esc_attr( translate( $text, $domain ) ); }