
WordPress Cookies和PHP会话——你需要知道的一切
wp_htmledit_pre ( $output )
wp_htmledit_pre: 这是一个过滤钩,用于修改文章编辑器的HTML内容。它接受一个参数,即文章编辑器的HTML内容,并返回修改后的内容。
对HTML编辑器的文本进行格式化。
除非$output为空,否则在{@see ‘htmledit_pre’}过滤器被应用之前,它将通过htmlspecialchars。
function wp_htmledit_pre($output) { _deprecated_function( __FUNCTION__, '4.3.0', 'format_for_editor()' ); if ( !empty($output) ) $output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) ); // Convert only '< > &'. /** * Filters the text before it is formatted for the HTML editor. * * @since 2.5.0 * @deprecated 4.3.0 * * @param string $output The HTML-formatted text. */ return apply_filters( 'htmledit_pre', $output ); }