0, 'som' => WPStrava::get_instance()->settings->som, 'map_width' => '480', 'map_height' => '320', 'athlete_token' => WPStrava::get_instance()->settings->get_default_token(), 'markers' => false, ); extract( shortcode_atts( $defaults, $atts ) ); $strava_som = WPStrava_SOM::get_som( $som ); $route = WPStrava::get_instance()->routes; $route_details = $route->getRoute( $id ); //sanitize width & height $map_width = str_replace( '%', '', $map_width ); $map_height = str_replace( '%', '', $map_height ); $map_width = str_replace( 'px', '', $map_width ); $map_height = str_replace( 'px', '', $map_height ); if ( $route_details ) { return '
' . __( 'Est. Moving Time', 'wp-strava' ) . ' ' . __( 'Distance', 'wp-strava' ) . ' ' . __( 'Elevation Gain', 'wp-strava' ) . '
' . $strava_som->time( $route_details->estimated_moving_time ) . ' ' . $strava_som->distance( $route_details->distance ) . ' ' . $strava_som->elevation( $route_details->elevation_gain ) . '
' . $strava_som->get_time_label() . ' ' . $strava_som->get_distance_label() . ' ' . $strava_som->get_elevation_label() . '
' . WPStrava_StaticMap::get_image_tag( $route_details, $map_height, $map_width, $markers ) . '
'; } // End if( $route_details ). } // handler public static function print_scripts() { if ( self::$add_script ) { wp_enqueue_style( 'wp-strava-style' ); //wp_print_scripts('google-maps'); //wp_print_scripts('wp-strava-script'); } } } // Initialize short code WPStrava_RouteShortcode::init();