Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

已经在使用了,发现一个小问题 #7

Closed
Re-keto opened this issue Jan 15, 2017 · 2 comments
Closed

已经在使用了,发现一个小问题 #7

Re-keto opened this issue Jan 15, 2017 · 2 comments

Comments

@Re-keto
Copy link

Re-keto commented Jan 15, 2017

因为我的个人站点需要写一些多语言的东西,所以wp框架选择了英文版,这样一来主页的摘要就出问题了,原版的wp获取的字数统计是单词数,无法正确截取汉字(和日文,韩文)所以设置好以后英文截取的长度是正常的,其他文字截取的长度就远远超出了一个post的框子,希望能改进function解决该问题

@ghost
Copy link

ghost commented Jan 29, 2017

收到

@Re-keto
Copy link
Author

Re-keto commented Jan 29, 2017

已经解决了…摘要直接mb_strimwidth()通过字符串字节数截取。因为wp_trim_words()是通过WP内置的wordcount获取字数的。有语言限制

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant