From bc9f8f6468e3dfb5dc26b1c7940c21463e244722 Mon Sep 17 00:00:00 2001
From: Justin Foell <630830+jrfoell@users.noreply.github.com>
Date: Fri, 4 Oct 2019 16:07:07 -0500
Subject: [PATCH] Updated documentation and version for 2.0.0
---
includes/WPStrava.php | 4 ++--
includes/WPStrava/API.php | 4 ++--
includes/WPStrava/ActivityShortcode.php | 2 +-
includes/WPStrava/LatestActivities.php | 2 +-
includes/WPStrava/LatestMapWidget.php | 8 ++++----
includes/WPStrava/RouteShortcode.php | 2 +-
includes/WPStrava/Settings.php | 6 +++---
readme.txt | 5 +++--
wp-strava.php | 2 +-
9 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/includes/WPStrava.php b/includes/WPStrava.php
index 07b7a93..edfd60e 100644
--- a/includes/WPStrava.php
+++ b/includes/WPStrava.php
@@ -107,9 +107,9 @@ class WPStrava {
}
/**
- * Get an API object for the given athlete token.
+ * Get an API object for the given Client ID.
*
- * @param string $token Athlete token.
+ * @param string $id Client ID.
* @return WPStrava_API
*/
public function get_api( $id = null ) {
diff --git a/includes/WPStrava/API.php b/includes/WPStrava/API.php
index fefb220..a5603de 100755
--- a/includes/WPStrava/API.php
+++ b/includes/WPStrava/API.php
@@ -155,8 +155,8 @@ class WPStrava_API {
return null;
}
- $settings = WPStrava::get_instance()->settings;
- $info = $settings->info;
+ $settings = WPStrava::get_instance()->settings;
+ $info = $settings->info;
if ( ! empty( $info[ $this->client_id ]->access_token ) ) {
return $info[ $this->client_id ]->access_token;
diff --git a/includes/WPStrava/ActivityShortcode.php b/includes/WPStrava/ActivityShortcode.php
index e6f8890..021482e 100644
--- a/includes/WPStrava/ActivityShortcode.php
+++ b/includes/WPStrava/ActivityShortcode.php
@@ -60,7 +60,7 @@ class WPStrava_ActivityShortcode {
if ( isset( $atts['athlete_token'] ) ) {
// Translators: Message shown when using deprecated athlete_token parameter.
- return __( 'The athlete_token parameter is deprecated as of version 2 and should be replaced with client_id.', 'wp-strava' );
+ return __( 'The athlete_token parameter is deprecated as of WP-Strava version 2 and should be replaced with client_id.', 'wp-strava' );
}
/* Make sure boolean values are actually boolean
diff --git a/includes/WPStrava/LatestActivities.php b/includes/WPStrava/LatestActivities.php
index b28ec10..e3bc61e 100644
--- a/includes/WPStrava/LatestActivities.php
+++ b/includes/WPStrava/LatestActivities.php
@@ -14,7 +14,7 @@ class WPStrava_LatestActivities {
if ( isset( $args['athlete_token'] ) ) {
// Translators: Message shown when using deprecated athlete_token parameter.
- return __( 'The athlete_token parameter is deprecated as of version 2 and should be replaced with client_id.', 'wp-strava' );
+ return __( 'The athlete_token parameter is deprecated as of WP-Strava version 2 and should be replaced with client_id.', 'wp-strava' );
}
$som = WPStrava_SOM::get_som( $args['som'] );
diff --git a/includes/WPStrava/LatestMapWidget.php b/includes/WPStrava/LatestMapWidget.php
index e911743..a58e44a 100644
--- a/includes/WPStrava/LatestMapWidget.php
+++ b/includes/WPStrava/LatestMapWidget.php
@@ -137,7 +137,7 @@ class WPStrava_LatestMapWidget extends WP_Widget {
* Get image for specific activity using Static Maps class.
*
* @author Justin Foell
- * @param string $id Athlete Token or Club ID.
+ * @param string $id Client ID or Club ID.
* @param object $activity Activity to get image for.
* @param boolean $build_new Whether to refresh the image from cache.
* @return string Image tag.
@@ -158,7 +158,7 @@ class WPStrava_LatestMapWidget extends WP_Widget {
*
* @author Justin Foell
* @since 1.2.0
- * @param string $id Athlete Token or Club ID.
+ * @param string $id Client ID or Club ID.
* @param string $img Image tag.
*/
private function update_map( $id, $img ) {
@@ -170,7 +170,7 @@ class WPStrava_LatestMapWidget extends WP_Widget {
*
* @author Justin Foell
* @since 1.2.0
- * @param string $id Athlete Token or Club ID.
+ * @param string $id Client ID or Club ID.
* @param object $activity stdClass Strava activity object.
*/
private function update_activity( $id, $activity ) {
@@ -182,7 +182,7 @@ class WPStrava_LatestMapWidget extends WP_Widget {
*
* @author Justin Foell
* @since 1.2.0
- * @param string $id Athlete Token or Club ID.
+ * @param string $id CLient ID or Club ID.
* @param object $activity stdClass Strava activity object.
*/
private function update_activity_transient( $id, $activity ) {
diff --git a/includes/WPStrava/RouteShortcode.php b/includes/WPStrava/RouteShortcode.php
index 33f8a1f..4bf1d63 100644
--- a/includes/WPStrava/RouteShortcode.php
+++ b/includes/WPStrava/RouteShortcode.php
@@ -60,7 +60,7 @@ class WPStrava_RouteShortcode {
if ( isset( $atts['athlete_token'] ) ) {
// Translators: Message shown when using deprecated athlete_token parameter.
- return __( 'The athlete_token parameter is deprecated as of version 2 and should be replaced with client_id.', 'wp-strava' );
+ return __( 'The athlete_token parameter is deprecated as of WP-Strava version 2 and should be replaced with client_id.', 'wp-strava' );
}
/* Make sure boolean values are actually boolean
diff --git a/includes/WPStrava/Settings.php b/includes/WPStrava/Settings.php
index 6240e96..65fdbbe 100644
--- a/includes/WPStrava/Settings.php
+++ b/includes/WPStrava/Settings.php
@@ -215,7 +215,7 @@ class WPStrava_Settings {
* Renamed from print_token_input().
*
* @author Justin Foell
- * @since 2.0
+ * @since 2.0.0
*/
public function print_id_input() {
foreach ( $this->get_all_ids() as $id => $nickname ) {
@@ -268,7 +268,7 @@ class WPStrava_Settings {
}
/**
- * Sanitize the nicknames - make sure we've got the same number of nicknames sa tokens.
+ * Sanitize the nicknames - make sure we've got the same number of nicknames sa IDs.
*
* @param array $nicknames Nicknames for the athletes saved.
* @return array
@@ -307,7 +307,7 @@ class WPStrava_Settings {
*
* Renamed from sanitize_token().
*
- * @param string $token
+ * @param string $id Client ID.
* @return string
* @author Justin Foell
* @since 2.0
diff --git a/readme.txt b/readme.txt
index ee0512e..e5553d9 100755
--- a/readme.txt
+++ b/readme.txt
@@ -4,7 +4,7 @@ Contributors: cmanon, jrfoell, lancewillett, dlintott, sebastianerb
Tags: strava, activity, bicycle, cycling, biking, running, run, swimming, swim, paddle, kayak, gps, shortcode, widget, plugin
Requires at least: 4.6
Tested up to: 5.1
-Stable tag: 2.0
+Stable tag: 2.0.0
Requires PHP: 5.2
License: GPLv2 or later
@@ -95,6 +95,7 @@ WP-Strava caches activity for one hour so your site doesn't hit the Strava API o
= 2.0.0 =
Added new Strava "refresh tokens" ala https://developers.strava.com/docs/oauth-updates/#migration-instructions
+Fixed long activity filter https://wordpress.org/support/topic/minimum-distance-on-last-activity-map-widget-not-working/
= 1.7.3 =
@@ -246,7 +247,7 @@ Initial version.
== Upgrade Notice ==
-= 2.0 =
+= 2.0.0 =
Version 2.0 is mandatory after October 15th, 2019. 2.0 settings upgrade instructions: https://github.com/cmanon/wp-strava/wiki/2.0-Upgrade.
diff --git a/wp-strava.php b/wp-strava.php
index 4310339..f955b3f 100755
--- a/wp-strava.php
+++ b/wp-strava.php
@@ -3,7 +3,7 @@
* Plugin Name: WP Strava
* Plugin URI: https://wordpress.org/plugins/wp-strava/
* Description: Show your strava.com activity on your WordPress site. Some Icons are Copyright © Yusuke Kamiyamane. All rights reserved. Licensed under a Creative Commons Attribution 3.0 license.
- * Version: 2.0b1
+ * Version: 2.0.0
* Author: Carlos Santa Cruz, Justin Foell, Lance Willett, Daniel Lintott, Sebastian Erb
* License: GPL2
* Text Domain: wp-strava