Fix non-alphanumeric abbreviations

This commit is contained in:
Brian Miyaji
2018-05-04 09:42:44 +10:00
parent d7c0899d38
commit e71f3e3fef
5 changed files with 5 additions and 5 deletions

View File

@@ -323,7 +323,7 @@ class SP_Team extends SP_Custom_Post {
$outcome = reset( $outcomes );
$abbreviation = get_post_meta( $outcome->ID, 'sp_abbreviation', true );
if ( ! $abbreviation )
$abbreviation = substr( $outcome->post_title, 0, 1 );
$abbreviation = mb_substr( $outcome->post_title, 0, 1 );
$totals['streak'] = $abbreviation . $streak['count'];
endif;