WordPress 教程:使分类和标签描述支持 HTML

2019年12月15日15:22:28 发表评论 热度350 ℃

默认 WordPress 后台分类和标签的编辑页面,分类和标签的描述是不支持 HTML 代码的,我们可以通过在当前主题的 functions.php 文件添加如下代码让分类和标签的描述支持 HTML 代码:

  1. remove_filter( 'pre_term_description', 'wp_filter_kses' );  
  2. remove_filter( 'pre_link_description', 'wp_filter_kses' );  
  3. remove_filter( 'pre_link_notes', 'wp_filter_kses' );  
  4. remove_filter( 'term_description', 'wp_kses_data' );  
瓜皮猪

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: