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:
parent
f1e77a800a
commit
b64e33619d
|
@ -69,9 +69,9 @@ if ( !empty($tb_url) && !empty($title) && !empty($tb_url) ) {
|
|||
|
||||
$title = wp_specialchars( strip_tags( $title ) );
|
||||
$excerpt = strip_tags($excerpt);
|
||||
if ( function_exists('mb_substr') ) { // For international trackbacks
|
||||
$excerpt = mb_substr($excerpt, 0, 252, get_settings('blog_charset')) . '...';
|
||||
$title = mb_substr($title, 0, 250, get_settings('blog_charset')) . '...';
|
||||
if ( function_exists('mb_strcut') ) { // For international trackbacks
|
||||
$excerpt = mb_strcut($excerpt, 0, 252, get_settings('blog_charset')) . '...';
|
||||
$title = mb_strcut($title, 0, 250, get_settings('blog_charset')) . '...';
|
||||
} else {
|
||||
$excerpt = (strlen($excerpt) > 255) ? substr($excerpt, 0, 252) . '...' : $excerpt;
|
||||
$title = (strlen($title) > 250) ? substr($title, 0, 250) . '...' : $title;
|
||||
|
|
Loading…
Reference in New Issue