wppaste
WordPress

esc_attr_e( string $text, string $domain = 'default' )

Since
2.8.0
Source
wp-includes/l10n.php:370
Displays translated text that has been escaped for safe use in an attribute.

Description

Encodes < > & " ' (less than, greater than, ampersand, double quote, single quote).Will never double encode entities. If you need the value for use in PHP, use esc_attr__().

Parameters

$textstring
Text to translate.
$domainstringoptional
Text domain. Unique identifier for retrieving translated strings. Default 'default'.Default: 'default'

Uses · 2

Used by · 45

Show all 45

Source

function esc_attr_e( $text, $domain = 'default' ) {	echo esc_attr( translate( $text, $domain ) );}

History

Introduced in 2.8.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/l10n.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.