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
- esc_attr()Escaping for HTML attributes.
- translate()Retrieves the translation of $text.
Used by · 45
- Custom_Background::admin_page()Displays the custom background page.
- Custom_Image_Header::step_1()Displays first step of custom header image page.
- Twenty_Twenty_One_Dark_Mode::the_html()Prints the dark-mode switch HTML.
- WP_Admin_Bar::_render()
- WP_Customize_Header_Image_Control::render_content()Renders the control's content.
- WP_Customize_Manager::render_control_templates()Renders JS templates for all registered control types.
- WP_Customize_Nav_Menu_Control::content_template()JS/Underscore template for the control UI.
- WP_Customize_Nav_Menu_Location_Control::render_content()Render content just like a normal select control.
- WP_Customize_Nav_Menus::print_custom_links_available_menu_item()Prints the markup for available menu item custom links.
- WP_Customize_Themes_Panel::render_template()An Underscore (JS) template for rendering this panel's container.
- WP_Customize_Themes_Section::render_template()Renders a themes section as a JS template.
- WP_Media_List_Table::views()Overrides parent views to use the filter bar display.
Show all 45
- WP_Screen::render_screen_meta()Renders the screen's help section.
- WP_Theme_Install_List_Table::theme_installer()Prints the wrapper for the theme installer.
- WP_Widget_Area_Customize_Control::render_content()Renders the control's content.
- _WP_Editors::wp_link_dialog()Dialog for internal linking.
- attachment_submit_meta_box()Displays attachment submit form fields.
- display_setup_form()Displays installer setup form.
- find_posts_div()Outputs the modal window used for attaching media to posts or pages in the media-listing screen.
- install_plugins_favorites_form()Shows a username form for the favorites page.
- link_categories_meta_box()Displays link categories form fields.
- link_submit_meta_box()Displays link create form fields.
- list_plugin_updates()Display the upgrade plugins form.
- list_theme_updates()Display the upgrade themes form.
- list_translation_updates()Display the update translations form.
- login_footer()Outputs the footer for the login page.
- media_upload_form()Outputs the legacy media upload form.
- media_upload_gallery_form()Adds gallery form to upload iframe.
- post_submit_meta_box()Displays post submit form fields.
- post_tags_meta_box()Displays post tags form fields.
- print_embed_sharing_button()Prints the necessary markup for the embed sharing button.
- print_embed_sharing_dialog()Prints the necessary markup for the embed sharing dialog.
- request_filesystem_credentials()Displays a form to the user to request for their FTP/SSH details in order to connect to the filesystem.
- signup_another_blog()Shows a form for returning users to sign up for another site.
- signup_blog()Shows a form for a user or visitor to sign up for a new site.
- signup_user()Shows a form for a visitor to sign up for a new user account.
- twentyeleven_settings_field_link_color()Renders the Link Color setting field.
- wp_dashboard_quick_press()Displays the Quick Draft widget.
- wp_image_editor()Loads the WP image-editing interface.
- wp_nav_menu_item_link_meta_box()Displays a meta box for the custom links menu item.
- wp_nav_menu_item_post_type_meta_box()Displays a meta box for a post type menu item.
- wp_nav_menu_item_taxonomy_meta_box()Displays a meta box for a taxonomy menu item.
- wp_print_community_events_markup()Prints the markup for the Community Events section of the Events and News Dashboard widget.
- wp_print_media_templates()Prints the templates used in the media manager.
- wp_print_revision_templates()Print JavaScript templates required for the revisions experience.
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.
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.