Use mb_strcut instead of mb_substr. fixes #2163

git-svn-id: http://svn.automattic.com/wordpress/trunk@3369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-12-28 01:06:57 +00:00
parent f1e77a800a
commit b64e33619d
1 changed files with 3 additions and 3 deletions

View File

@ -69,9 +69,9 @@ if ( !empty($tb_url) && !empty($title) && !empty($tb_url) ) {
$title = wp_specialchars( strip_tags( $title ) ); $title = wp_specialchars( strip_tags( $title ) );
$excerpt = strip_tags($excerpt); $excerpt = strip_tags($excerpt);
if ( function_exists('mb_substr') ) { // For international trackbacks if ( function_exists('mb_strcut') ) { // For international trackbacks
$excerpt = mb_substr($excerpt, 0, 252, get_settings('blog_charset')) . '...'; $excerpt = mb_strcut($excerpt, 0, 252, get_settings('blog_charset')) . '...';
$title = mb_substr($title, 0, 250, get_settings('blog_charset')) . '...'; $title = mb_strcut($title, 0, 250, get_settings('blog_charset')) . '...';
} else { } else {
$excerpt = (strlen($excerpt) > 255) ? substr($excerpt, 0, 252) . '...' : $excerpt; $excerpt = (strlen($excerpt) > 255) ? substr($excerpt, 0, 252) . '...' : $excerpt;
$title = (strlen($title) > 250) ? substr($title, 0, 250) . '...' : $title; $title = (strlen($title) > 250) ? substr($title, 0, 250) . '...' : $title;