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

返回介绍

esc_textarea()

发布于 2017-09-10 字数1983 浏览 1015 评论 0

esc_textarea( string $text )

Escaping for textarea values.


描述


参数

$text

(string)
(Required)


返回值

(string)


源代码

File: wp-includes/formatting.php

function esc_textarea( $text ) {
	$safe_text = htmlspecialchars( $text, ENT_QUOTES, get_option( 'blog_charset' ) );
	/**
	 * Filters a string cleaned and escaped for output in a textarea element.
	 *
	 * @since 3.1.0
	 *
	 * @param string $safe_text The text after it has been escaped.
 	 * @param string $text      The text prior to being escaped.
	 */
	return apply_filters( 'esc_textarea', $safe_text, $text );
}

更新日志

Version 描述
3.1.0 Introduced.

相关函数

Uses

  • wp-includes/formatting.php:
    esc_textarea
  • wp-includes/plugin.php:
    apply_filters()
  • wp-includes/option.php:
    get_option()

Used By

  • wp-includes/embed.php:
    print_embed_sharing_dialog()
  • wp-admin/includes/network.php:
    network_step2()
  • wp-admin/includes/template.php:
    get_inline_data()
  • wp-admin/includes/template.php:
    _list_meta_row()
  • wp-admin/includes/class-wp-comments-list-table.php:
    WP_Comments_List_Table::column_comment()
  • wp-includes/formatting.php:
    format_to_edit()
  • wp-includes/class-wp-customize-control.php:
    WP_Customize_Control::render_content()
  • Show 2 more used by
    Hide more used by


User Contributed Notes

上一篇:esc_sql()

下一篇:esc_url()

发布评论

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

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