diff --git a/uc-people-widget.php b/uc-people-widget.php index c0a0a84..202ceee 100644 --- a/uc-people-widget.php +++ b/uc-people-widget.php @@ -36,12 +36,13 @@ Class UC_People_Widget extends WP_Widget { private function createTextCell( $field, $information_to_display, $id ){ $cell = ''; if (in_array($field, $information_to_display)) { - $cell .= ''.get_field($field, $id ).''; + //$cell .= ''.get_field($field, $id ).''; } return $cell; } private function get_people_grid( $args, $information_to_display ){ + $the_query = new WP_Query( $args ); $out = ''; if( $the_query->have_posts() ){ @@ -196,6 +197,10 @@ Class UC_People_Widget extends WP_Widget { $out .= ''; } else if( $f == 'mailing_address' && in_array('mailing_address', $information_to_display) ){ $out .= ''.str_replace(';','
',get_field($f, $id )).''; + // If the value($f) is a phone number than we should replace any hyphens with the html entity for a non-break hyphen (‑) + } elseif ($f == 'phone' && in_array('phone', $information_to_display) ) { + $phoneStrReplace = str_replace('-', '‑', get_field('phone', $id )); + $out .= ''.$phoneStrReplace.''; } elseif( $f == 'url' && in_array( 'url', $information_to_display ) ){ $out .= ''.get_field('url', $id ).''.''; } else {