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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions uc-people-widget.php
Expand Up @@ -196,6 +196,10 @@ Class UC_People_Widget extends WP_Widget {
$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