Skip to content

Commit

Permalink
Fix fictioneer_truncate()
Browse files Browse the repository at this point in the history
  • Loading branch information
Tetrakern committed Aug 21, 2024
1 parent bdd7395 commit b4a500d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/functions/_utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -2918,7 +2918,7 @@ function fictioneer_truncate( string $string, int $length, string $ellipsis = nu
$ellipsis = $ellipsis ?? FICTIONEER_TRUNCATION_ELLIPSIS;

// Return truncated string
if ( ! function_exists( 'mb_strimwidth' ) ) {
if ( function_exists( 'mb_strimwidth' ) ) {
return mb_strimwidth( $string, 0, $length, $ellipsis );
} else {
return strlen( $string ) > $length ? substr( $string, 0, $length ) . $ellipsis : $string;
Expand Down

0 comments on commit b4a500d

Please sign in to comment.