diff --git a/readme.txt b/readme.txt index 54bd778..3ff3fca 100755 --- a/readme.txt +++ b/readme.txt @@ -135,7 +135,8 @@ On the WP-Strava settings page you cannot currently remove and add another athle == Changelog == = 2.11.0 = -Added additional block transformations for "Activity" (from: Paragraph, Classic Shortcode; to: Paragraph) +Add additional block transformations for "Activity" (from: Paragraph, Classic Shortcode; to: Paragraph) +Add Mapbox Static Map support https://github.com/cmanon/wp-strava/issues/26 = 2.10.1 = diff --git a/src/WPStrava.php b/src/WPStrava.php index 5abe531..212b100 100644 --- a/src/WPStrava.php +++ b/src/WPStrava.php @@ -193,7 +193,7 @@ class WPStrava { * Register/enqueue admin javascript. * * @author Justin Foell - * @since next + * @since 2.11 */ public function register_admin_scripts() { if ( $this->settings->is_settings_page() ) { diff --git a/src/WPStrava/Settings.php b/src/WPStrava/Settings.php index 40ba711..d4b8401 100644 --- a/src/WPStrava/Settings.php +++ b/src/WPStrava/Settings.php @@ -170,7 +170,7 @@ class WPStrava_Settings { * Print the map type selection. * * @author Justin Foell - * @since next + * @since 2.11 */ public function print_map_type_input() { $gmaps_url = 'https://developers.google.com/maps/documentation/static-maps/'; @@ -234,7 +234,7 @@ class WPStrava_Settings { * @param string $map_type * @return string * @author Justin Foell - * @since next + * @since 2.11 */ public function sanitize_map_type_input( $map_type ) { if ( in_array( $map_type, array( 'gmaps', 'mapbox' ), true ) ) { @@ -489,7 +489,7 @@ class WPStrava_Settings { * Print the Mapbox token input. * * @author Justin Foell - * @since next + * @since 2.11 */ public function print_mapbox_token_input() { ?> @@ -503,7 +503,7 @@ class WPStrava_Settings { * @param string $token * @return string * @author Justin Foell - * @since next + * @since 2.11 */ public function sanitize_mapbox_token( $token ) { return $token; diff --git a/src/WPStrava/StaticMap.php b/src/WPStrava/StaticMap.php index 7818dc2..d52348c 100644 --- a/src/WPStrava/StaticMap.php +++ b/src/WPStrava/StaticMap.php @@ -21,7 +21,7 @@ abstract class WPStrava_StaticMap { * * @return WPStrava_StaticMap Instance of StaticMap * @author Justin Foell - * @since NEXT + * @since 2.11 */ public static function get_map() { if ( 'mapbox' === WPStrava::get_instance()->settings->map_type ) { @@ -95,7 +95,7 @@ abstract class WPStrava_StaticMap { * @param mixed $polyline Polyline string. * @return int Polyline string length. * @author Justin Foell - * @since next + * @since 2.11 */ protected function polyline_length( $polyline ) { return strlen( $polyline ); diff --git a/src/WPStrava/StaticMapbox.php b/src/WPStrava/StaticMapbox.php index 8711a4a..ffe28d3 100644 --- a/src/WPStrava/StaticMapbox.php +++ b/src/WPStrava/StaticMapbox.php @@ -56,7 +56,7 @@ class WPStrava_StaticMapbox extends WPStrava_StaticMap { * @param bool $markers Display start and finish markers. * @return string Image URL. * @author Justin Foell - * @since next + * @since 2.11 */ private function build_url( $polyline, $height = 320, $width = 480, $markers = false ) { @@ -86,7 +86,7 @@ class WPStrava_StaticMapbox extends WPStrava_StaticMap { * @param mixed $polyline Polyline string. * @return int Encoded polyline string length. * @author Justin Foell - * @since next + * @since 2.11 */ protected function polyline_length( $polyline ) { return strlen( rawurlencode( $polyline ) );