Updated readme and versions

This commit is contained in:
Justin Foell
2021-12-30 14:14:07 -06:00
parent 51cc4b7abe
commit 9abd2e9ac2
5 changed files with 11 additions and 10 deletions
+2 -1
View File
@@ -135,7 +135,8 @@ On the WP-Strava settings page you cannot currently remove and add another athle
== Changelog == == Changelog ==
= 2.11.0 = = 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 = = 2.10.1 =
+1 -1
View File
@@ -193,7 +193,7 @@ class WPStrava {
* Register/enqueue admin javascript. * Register/enqueue admin javascript.
* *
* @author Justin Foell <justin@foell.org> * @author Justin Foell <justin@foell.org>
* @since next * @since 2.11
*/ */
public function register_admin_scripts() { public function register_admin_scripts() {
if ( $this->settings->is_settings_page() ) { if ( $this->settings->is_settings_page() ) {
+4 -4
View File
@@ -170,7 +170,7 @@ class WPStrava_Settings {
* Print the map type selection. * Print the map type selection.
* *
* @author Justin Foell <justin@foell.org> * @author Justin Foell <justin@foell.org>
* @since next * @since 2.11
*/ */
public function print_map_type_input() { public function print_map_type_input() {
$gmaps_url = 'https://developers.google.com/maps/documentation/static-maps/'; $gmaps_url = 'https://developers.google.com/maps/documentation/static-maps/';
@@ -234,7 +234,7 @@ class WPStrava_Settings {
* @param string $map_type * @param string $map_type
* @return string * @return string
* @author Justin Foell <justin@foell.org> * @author Justin Foell <justin@foell.org>
* @since next * @since 2.11
*/ */
public function sanitize_map_type_input( $map_type ) { public function sanitize_map_type_input( $map_type ) {
if ( in_array( $map_type, array( 'gmaps', 'mapbox' ), true ) ) { if ( in_array( $map_type, array( 'gmaps', 'mapbox' ), true ) ) {
@@ -489,7 +489,7 @@ class WPStrava_Settings {
* Print the Mapbox token input. * Print the Mapbox token input.
* *
* @author Justin Foell <justin@foell.org> * @author Justin Foell <justin@foell.org>
* @since next * @since 2.11
*/ */
public function print_mapbox_token_input() { public function print_mapbox_token_input() {
?> ?>
@@ -503,7 +503,7 @@ class WPStrava_Settings {
* @param string $token * @param string $token
* @return string * @return string
* @author Justin Foell <justin@foell.org> * @author Justin Foell <justin@foell.org>
* @since next * @since 2.11
*/ */
public function sanitize_mapbox_token( $token ) { public function sanitize_mapbox_token( $token ) {
return $token; return $token;
+2 -2
View File
@@ -21,7 +21,7 @@ abstract class WPStrava_StaticMap {
* *
* @return WPStrava_StaticMap Instance of StaticMap * @return WPStrava_StaticMap Instance of StaticMap
* @author Justin Foell <justin@foell.org> * @author Justin Foell <justin@foell.org>
* @since NEXT * @since 2.11
*/ */
public static function get_map() { public static function get_map() {
if ( 'mapbox' === WPStrava::get_instance()->settings->map_type ) { if ( 'mapbox' === WPStrava::get_instance()->settings->map_type ) {
@@ -95,7 +95,7 @@ abstract class WPStrava_StaticMap {
* @param mixed $polyline Polyline string. * @param mixed $polyline Polyline string.
* @return int Polyline string length. * @return int Polyline string length.
* @author Justin Foell <justin@foell.org> * @author Justin Foell <justin@foell.org>
* @since next * @since 2.11
*/ */
protected function polyline_length( $polyline ) { protected function polyline_length( $polyline ) {
return strlen( $polyline ); return strlen( $polyline );
+2 -2
View File
@@ -56,7 +56,7 @@ class WPStrava_StaticMapbox extends WPStrava_StaticMap {
* @param bool $markers Display start and finish markers. * @param bool $markers Display start and finish markers.
* @return string Image URL. * @return string Image URL.
* @author Justin Foell <justin@foell.org> * @author Justin Foell <justin@foell.org>
* @since next * @since 2.11
*/ */
private function build_url( $polyline, $height = 320, $width = 480, $markers = false ) { 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. * @param mixed $polyline Polyline string.
* @return int Encoded polyline string length. * @return int Encoded polyline string length.
* @author Justin Foell <justin@foell.org> * @author Justin Foell <justin@foell.org>
* @since next * @since 2.11
*/ */
protected function polyline_length( $polyline ) { protected function polyline_length( $polyline ) {
return strlen( rawurlencode( $polyline ) ); return strlen( rawurlencode( $polyline ) );