wpseek.com
A WordPress-centric search engine for devs and theme authors



esc_html__ › WordPress Function

Since2.8.0
Deprecatedn/a
esc_html__ ( $text, $domain = 'default' )
Parameters: (2)
  • (string) $text Text to translate.
    Required: Yes
  • (string) $domain Optional. Text domain. Unique identifier for retrieving translated strings. Default 'default'.
    Required: No
    Default: 'default'
Returns:
  • (string) Translated text.
Defined at:
Codex:

Retrieves the translation of $text and escapes it for safe use in HTML output.

If there is no translation, or the text domain isn't loaded, the original text is escaped and returned.


Source

function esc_html__( $text, $domain = 'default' ) {
	return esc_html( translate( $text, $domain ) );
}