Skip to content

Commit

Permalink
Use mb_strcut instead of mb_substr. fixes #2163
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.automattic.com/wordpress/trunk@3369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
ryan committed Dec 28, 2005
1 parent f1e77a8 commit b64e336
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wp-trackback.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ function trackback_response($error = 0, $error_message = '') {

$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;
Expand Down

0 comments on commit b64e336

Please sign in to comment.