Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
updated people-table.php. If a phone number is displayed we now do a …
…str_replace on hyphens to make them non-break hyphens
  • Loading branch information
Zurawel committed Sep 5, 2018
1 parent 6a765ab commit ad8b66c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion inc/people-table.php
Expand Up @@ -118,12 +118,18 @@ if ( $the_query->have_posts() ) {
echo '<a href="mailto:'.get_field('email').'">'.get_field('email').'</a>';
echo '</td>';
};
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 (&#8209;)
if (in_array('phone', $information_to_display)) {
$phoneStrReplace = str_replace('-', '&#8209;', get_field('phone'));
echo '<td>'.$phoneStrReplace.'</td>';
}
//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 '<td class="person-mailing_address">';

echo str_replace(';','<br>',get_field('mailing_address'));
echo '</td>';
}
Expand Down

0 comments on commit ad8b66c

Please sign in to comment.