Tribe__Events__Pro__Geo_Loc::add_event_distance( string $html )
Adds the distance of each event in the resulting list, when the user makes a location search.
Contents
Parameters
- $html
-
(string) (Required) The current HTML of the event.
Return
(string)
Source
File: src/Tribe/Geo_Loc.php
public function add_event_distance( $html ) {
global $post;
if ( ! empty( $post->distance ) ) {
$html .= '<span class="tribe-events-distance">' . tribe_get_distance_with_unit( $post->distance ) . '</span>';
}
return $html;
}