From ad8b66c27c12d26f01491b863904cdfb84f44a1d Mon Sep 17 00:00:00 2001 From: Zurawel Date: Wed, 5 Sep 2018 15:17:49 -0400 Subject: [PATCH] updated people-table.php. If a phone number is displayed we now do a str_replace on hyphens to make them non-break hyphens --- inc/people-table.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/inc/people-table.php b/inc/people-table.php index d99ffb0..3f7da41 100644 --- a/inc/people-table.php +++ b/inc/people-table.php @@ -118,12 +118,18 @@ if ( $the_query->have_posts() ) { echo ''.get_field('email').''; echo ''; }; - createTextCell('phone', 'phone'); + // If the phone number ('phone') is part of the information being displayed than we should replace any hyphens with the html entity for a non-break hyphen (‑) + if (in_array('phone', $information_to_display)) { + $phoneStrReplace = str_replace('-', '‑', get_field('phone')); + echo ''.$phoneStrReplace.''; + } + //createTextCell('phone', 'phone'); createTextCell('phone_(alternate)', 'phone_(alternate)'); createTextCell('fax', 'fax'); //createTextCell('mailing_address', 'mailing_address'); if (in_array('mailing_address', $information_to_display)) { echo ''; + echo str_replace(';','
',get_field('mailing_address')); echo ''; }