Skip to content

Commit

Permalink
Adds charset to mb_substr when truncanting excerpt
Browse files Browse the repository at this point in the history
  • Loading branch information
cabrerahector committed Jul 2, 2014
1 parent 382cbb9 commit daa263b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wordpress-popular-posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -2508,7 +2508,7 @@ protected function _get_summary($id, $instance){
} else { // by characters

if ( strlen($excerpt) > $instance['post-excerpt']['length'] ) {
$excerpt = mb_substr( $excerpt, 0, $instance['post-excerpt']['length'] ) . "...";
$excerpt = mb_substr( $excerpt, 0, $instance['post-excerpt']['length'], $this->charset ) . "...";
}

}
Expand Down

0 comments on commit daa263b

Please sign in to comment.