WordPress升级4.3后无法统计中文摘要字数的解决方法

WordPress升级4.3之后,首页摘要以及搜索结果摘要字数统计不正确,只统计了英文而不统计中文,导致中文摘要几乎要包含到全篇的内容。
解决方法为,打开/wp-includes/formatting.php,找到如下内容:

参考注释,根据需要把这一行
strpos( _x( ‘words’, ‘Word count type. Do not translate!’ ), ‘characters’ )
中的’words’改为’characters_excluding_spaces’或者’characters_including_spaces’。

======
转载自nex3z’s blog

One thought on “WordPress升级4.3后无法统计中文摘要字数的解决方法

  1. 自动引用通知: iuui | Making Lives Easier

发布留言

发布留言必须填写的电子邮件地址不会公开。 必填字段标示为 *