mirror of
https://github.com/10h30/wp-strava.git
synced 2026-07-12 03:06:34 +09:00
Add the option to display a marker at the start & finish points of an activity or route
This commit is contained in:
@@ -10,7 +10,7 @@ class WPStrava_ActivityShortcode {
|
||||
}
|
||||
|
||||
// Shortcode handler function
|
||||
// [ride id=id som=metric map_width="100%" map_height="400px"]
|
||||
// [ride id=id som=metric map_width="100%" map_height="400px" markers=false]
|
||||
public static function handler( $atts ) {
|
||||
self::$add_script = true;
|
||||
|
||||
@@ -20,6 +20,7 @@ class WPStrava_ActivityShortcode {
|
||||
'map_width' => '480',
|
||||
'map_height' => '320',
|
||||
'athlete_token' => WPStrava::get_instance()->settings->get_default_token(),
|
||||
'markers' => false,
|
||||
);
|
||||
|
||||
extract( shortcode_atts( $defaults, $atts ) );
|
||||
@@ -67,7 +68,7 @@ class WPStrava_ActivityShortcode {
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>' .
|
||||
WPStrava_StaticMap::get_image_tag( $ride_details, $map_height, $map_width ) .
|
||||
WPStrava_StaticMap::get_image_tag( $ride_details, $map_height, $map_width, $markers ) .
|
||||
'</div>';
|
||||
} // End if( $ride_details ).
|
||||
} // handler
|
||||
|
||||
Reference in New Issue
Block a user