From 2e02b91cf6d018666cdfd1c2c465aa71f2445f38 Mon Sep 17 00:00:00 2001 From: ThemeBoy Date: Wed, 27 Nov 2013 19:33:59 +1100 Subject: [PATCH] Replace strings when displaying equations --- sportspress-actions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sportspress-actions.php b/sportspress-actions.php index e7768b9f..6351248e 100644 --- a/sportspress-actions.php +++ b/sportspress-actions.php @@ -47,7 +47,11 @@ function sp_manage_posts_custom_column( $column, $post_id ) { echo get_post_meta ( $post_id, 'sp_team' ) ? sp_the_posts( $post_id, 'sp_team', '', '
', $result, ( empty( $result ) ? ' — ' : ' ' ) ) : '—'; break; case 'sp_equation': - echo get_post_meta ( $post_id, 'sp_equation', true ); + echo str_replace( + array( '+', '-', '*', '/', '==', '!=', '<', '<=', '>', '>=' ), + array( '+', '−', '×', '÷', '=', '≠', '<', '≤', '>', '≥' ), + get_post_meta ( $post_id, 'sp_equation', true ) + ); break; case 'sp_player': echo sp_the_posts( $post_id, 'sp_player' );