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

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *