kses_init 连接到init 使用默认优先级挂钩,并且(在第一次删除任何kses过滤器后)添加去除标记的过滤器(wp_filter_post_kses 对于职位和wp_filter_kses 如果用户不具备“unfiltered\\u html”功能,则返回。
由于该功能决定了用户是否可以发布“unfiltered\\uHTML”评论和帖子,因此您可能不想仅仅删除该功能。
相反,钩住init, 之后kses_init, 说优先级为20,然后重新添加过滤器,去除不在$allowedtags 白名单:
add_action(\'init\',\'wpse56687_filter_everyones_comments\',20);
function wpse56687_filter_everyones_comments(){
add_filter( \'pre_comment_content\', \'wp_filter_kses\' );
}