kses_init_filters()

 

File: wp-includes/kses.php

function kses_init_filters() {
	// Normal filtering
	add_filter( 'title_save_pre', 'wp_filter_kses' );

	// Comment filtering
	if ( current_user_can( 'unfiltered_html' ) ) {
		add_filter( 'pre_comment_content', 'wp_filter_post_kses' );
	} else {
		add_filter( 'pre_comment_content', 'wp_filter_kses' );
	}

	// Post filtering
	add_filter( 'content_save_pre', 'wp_filter_post_kses' );
	add_filter( 'excerpt_save_pre', 'wp_filter_post_kses' );
	add_filter( 'content_filtered_save_pre', 'wp_filter_post_kses' );
}

参数:kses_init_filters()

所有挂钩都具有默认优先级。wp_filter_kses()函数添加到‘pre_comment_content’和‘title_save_pre’挂钩中。

wp_filter_post_kses()函数添加到‘Content_save_pre6037、‘摘录_save_pre6037和‘Content_filtered_save_pre6037挂钩中。

{acontent5}{acontent3}

You must log in before being able to contribute a note or feedback.

80.00% (4) 次Google访问
20.00% (1) 次sm访问
  • 蜘蛛:Google,4次,更新时间:2019-05-13 03:52:34
  • 蜘蛛:sm,1次,更新时间:2019-05-15 11:41:33

参与评论