esc_html_e

Display translated text that has been escaped for safe use in HTML output.

Description

esc_html_e( (string) $text, (string) $domain = 'default' ); 

Parameters (2)

0. $text (string)
Text to translate
1. $domain — Optional. (string) => 'default'
Domain to retrieve the translated text

Usage

  1. if ( !function_exists( 'esc_html_e' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-l10n.php'; 
  3.  
  4. // Text to translate 
  5. $text = ''; 
  6.  
  7. // Optional. Domain to retrieve the translated text 
  8. $domain = 'default'; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = esc_html_e($text, $domain); 
  12.  

Defined (1)

The function is defined in the following location(s).

/bp-forums/bbpress/bb-includes/functions.bb-l10n.php  
  1. function esc_html_e( $text, $domain = 'default' ) { 
  2. echo esc_html( translate( $text, $domain ) );