mirror of
https://github.com/10h30/wp-strava.git
synced 2026-07-15 12:43:41 +09:00
Updated documentation and version for 2.0.0
This commit is contained in:
@@ -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 ) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -60,7 +60,7 @@ class WPStrava_ActivityShortcode {
|
||||
|
||||
if ( isset( $atts['athlete_token'] ) ) {
|
||||
// Translators: Message shown when using deprecated athlete_token parameter.
|
||||
return __( 'The <code>athlete_token</code> parameter is deprecated as of version 2 and should be replaced with <code>client_id</code>.', 'wp-strava' );
|
||||
return __( 'The <code>athlete_token</code> parameter is deprecated as of WP-Strava version 2 and should be replaced with <code>client_id</code>.', 'wp-strava' );
|
||||
}
|
||||
|
||||
/* Make sure boolean values are actually boolean
|
||||
|
||||
@@ -14,7 +14,7 @@ class WPStrava_LatestActivities {
|
||||
|
||||
if ( isset( $args['athlete_token'] ) ) {
|
||||
// Translators: Message shown when using deprecated athlete_token parameter.
|
||||
return __( 'The <code>athlete_token</code> parameter is deprecated as of version 2 and should be replaced with <code>client_id</code>.', 'wp-strava' );
|
||||
return __( 'The <code>athlete_token</code> parameter is deprecated as of WP-Strava version 2 and should be replaced with <code>client_id</code>.', 'wp-strava' );
|
||||
}
|
||||
|
||||
$som = WPStrava_SOM::get_som( $args['som'] );
|
||||
|
||||
@@ -137,7 +137,7 @@ class WPStrava_LatestMapWidget extends WP_Widget {
|
||||
* Get image for specific activity using Static Maps class.
|
||||
*
|
||||
* @author Justin Foell <justin@foell.org>
|
||||
* @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 <justin@foell.org>
|
||||
* @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 <justin@foell.org>
|
||||
* @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 <justin@foell.org>
|
||||
* @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 ) {
|
||||
|
||||
@@ -60,7 +60,7 @@ class WPStrava_RouteShortcode {
|
||||
|
||||
if ( isset( $atts['athlete_token'] ) ) {
|
||||
// Translators: Message shown when using deprecated athlete_token parameter.
|
||||
return __( 'The <code>athlete_token</code> parameter is deprecated as of version 2 and should be replaced with <code>client_id</code>.', 'wp-strava' );
|
||||
return __( 'The <code>athlete_token</code> parameter is deprecated as of WP-Strava version 2 and should be replaced with <code>client_id</code>.', 'wp-strava' );
|
||||
}
|
||||
|
||||
/* Make sure boolean values are actually boolean
|
||||
|
||||
@@ -215,7 +215,7 @@ class WPStrava_Settings {
|
||||
* Renamed from print_token_input().
|
||||
*
|
||||
* @author Justin Foell <justin@foell.org>
|
||||
* @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 <justin@foell.org>
|
||||
* @since 2.0
|
||||
|
||||
+3
-2
@@ -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: <a href="https://github.com/cmanon/wp-strava/wiki/2.0-Upgrade">https://github.com/cmanon/wp-strava/wiki/2.0-Upgrade</a>.
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user