首页 WordPress函数大全 format_for_editor()

format_for_editor()

2020-05-01 / 4574阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

format_for_editor( string $text, string $default_editor = null )

Formats text for the editor.

描述

Generally the browsers treat everything inside a textarea as text, but it is still a good idea to HTML entity encode <, > and & in the content.

The filter ‘format_for_editor’ is applied here. If $text is empty the filter will be applied to an empty string.

See also See also

  • _WP_Editors::editor()

Top ↑

参数

$text

(string)
(Required)
The text to be formatted.

$default_editor

(string)
(Optional)
The default editor for the current user. It is usually either 'html' or 'tinymce'.

Default value: null

返回

(string) The formatted text after filter is applied.

大家谈论
    我的见解