diff --git a/lib/WPStrava/ActivityShortcode.php b/lib/WPStrava/ActivityShortcode.php index 3b694de..0c09a26 100644 --- a/lib/WPStrava/ActivityShortcode.php +++ b/lib/WPStrava/ActivityShortcode.php @@ -70,7 +70,7 @@ class WPStrava_ActivityShortcode { try { $activity_details = $activity->get_activity( $atts['athlete_token'], $atts['id'] ); - } catch( WPStrava_Exception $e ) { + } catch ( WPStrava_Exception $e ) { return $e->to_html(); } @@ -83,6 +83,36 @@ class WPStrava_ActivityShortcode { if ( $activity_details ) { $activity_output = '
| ' . __( 'Elapsed Time', 'wp-strava' ) . ' | ' . __( 'Moving Time', 'wp-strava' ) . ' | ' . __( 'Distance', 'wp-strava' ) . ' | -' . __( 'Average Speed', 'wp-strava' ) . ' | -' . __( 'Max Speed', 'wp-strava' ) . ' | + ' . $avg_title . ' + ' . $max_title . '' . __( 'Elevation Gain', 'wp-strava' ) . ' | @@ -100,16 +130,16 @@ class WPStrava_ActivityShortcode {' . $strava_som->time( $activity_details->elapsed_time ) . ' | ' . $strava_som->time( $activity_details->moving_time ) . ' | ' . $strava_som->distance( $activity_details->distance ) . ' | -' . $strava_som->speed( $activity_details->average_speed ) . ' | -' . $strava_som->speed( $activity_details->max_speed ) . ' | + ' . $avg_speed . ' + ' . $max_speed . '' . $strava_som->elevation( $activity_details->total_elevation_gain ) . ' |
|---|---|---|---|---|---|
| ' . $strava_som->get_time_label() . ' | ' . $strava_som->get_time_label() . ' | ' . $strava_som->get_distance_label() . ' | -' . $strava_som->get_speed_label() . ' | -' . $strava_som->get_speed_label() . ' | + ' . $speed_label . ' + ' . $speed_label . '' . $strava_som->get_elevation_label() . ' |