format_for_editor()
format_for_editor( string $text, string $default_editor = null )
格式化编辑器的文本。
Formats text for the editor.
说明(Description)
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$text | (string) | 必需 | 要格式化的文本。 |
$default_editor | (string) | 可选 | 当前用户的默认编辑器。通常是“html”或“tinymce”。 |
返回(Return)
(string)应用筛选器后的格式化文本。
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
4.3.0 | wp-includes/formatting.php:4207 | 0 | 3 |
format_for_editor() 为WP2原创文章,链接:https://www.wp2.cn/functions/format_for_editor/