From 8bf5bd44b8a4504e7f76132d82223000d0b005ab Mon Sep 17 00:00:00 2001 From: Dominik Date: Wed, 22 Dec 2021 11:26:54 +0100 Subject: [PATCH] update acf_get_truncated method Change substr to mb_substr for better experience with special characters. --- includes/api/api-helpers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/api-helpers.php b/includes/api/api-helpers.php index 8578f9bc..813d83b3 100644 --- a/includes/api/api-helpers.php +++ b/includes/api/api-helpers.php @@ -3092,7 +3092,7 @@ function acf_get_truncated( $text, $length = 64 ) { $the_length = strlen( $text ); // cut - $return = substr( $text, 0, ( $length - 3 ) ); + $return = mb_substr( $text, 0, ( $length - 3 ) ); // ... if ( $the_length > ( $length - 3 ) ) {