WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/esc attr e

Description

Displays translated text that has been escaped for safe use in an attribute. 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__().

Usage

<?php esc_attr_e$text$domain ?>

Parameters

$text
(string) (required) The text which is to be encoded.
Default: None
$textdomain
(string) (optional) Domain to retrieve the translated text.
Default: 'default'

Return Values

(void) 
This function does not return a value.

Examples

Change Log

Source File

esc_attr_e() is located in wp-includes/l10n.php.

Related

See: Data Validation article for an in-depth discussion of input and output sanitization.

L10n: translate(), __(), _e(), _n(), _x(), _ex(), _nx(), esc_attr__(), esc_attr_e(), esc_attr_x(), esc_html__(), esc_html_e(), esc_html_x(), _n_noop(), _nx_noop(), translate_nooped_plural()

See also index of Function Reference and index of Template Tags.