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

updated uc-people-widget #22

Merged
merged 2 commits into from
Sep 5, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions uc-people-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ private function get_people_table( $args, $information_to_display ){
$out .= '</td>';
} else if( $f == 'mailing_address' && in_array('mailing_address', $information_to_display) ){
$out .= '<td class="person-'.$f.'">'.str_replace(';','<br>',get_field($f, $id )).'</td>';
// If the value($f) is a phone number than we should replace any hyphens with the html entity for a non-break hyphen (&#8209;)
} elseif ($f == 'phone' && in_array('phone', $information_to_display) ) {
$phoneStrReplace = str_replace('-', '&#8209;', get_field('phone', $id ));
$out .= '<td>'.$phoneStrReplace.'</td>';
} elseif( $f == 'url' && in_array( 'url', $information_to_display ) ){
$out .= '<td class="person-url"><a href="'.get_field('url', $id ).'">'.get_field('url', $id ).'</a>'.'</td>';
} else {
Expand Down