esc_html_e() - WordPress 函数参考中文文档

返回介绍

esc_html_e()

发布于 2017-09-10 字数2199 浏览 818 评论 0

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

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


描述


参数

$text

(string)
(Required)
Text to translate.

$domain

(string)
(Optional)
Text domain. Unique identifier for retrieving translated strings.

Default value: ‘default’


源代码

File: wp-includes/l10n.php

function esc_html_e( $text, $domain = 'default' ) {
	echo esc_html( translate( $text, $domain ) );
}

更新日志

Version 描述
2.8.0 Introduced.

相关函数

Uses

  • wp-includes/l10n.php:
    translate()
  • wp-includes/formatting.php:
    esc_html()

Used By

  • wp-includes/widgets/class-wp-widget-text.php:
    WP_Widget_Text::render_control_template_scripts()
  • wp-includes/widgets/class-wp-widget-media.php:
    WP_Widget_Media::render_control_template_scripts()
  • wp-includes/embed.php:
    print_embed_sharing_dialog()
  • wp-admin/includes/class-wp-press-this.php:
    WP_Press_This::html()
  • wp-admin/includes/revision.php:
    wp_print_revision_templates()
  • wp-admin/includes/class-wp-media-list-table.php:
    WP_Media_List_Table::views()
  • wp-admin/includes/network.php:
    network_step1()
  • wp-admin/includes/network.php:
    network_step2()
  • wp-admin/includes/image-edit.php:
    wp_image_editor()
  • wp-admin/includes/ms.php:
    confirm_delete_users()
  • wp-includes/media-template.php:
    wp_print_media_templates()
  • Show 6 more used by
    Hide more used by


User Contributed Notes

上一篇:esc_html()

下一篇:esc_html_x()

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!