Updated documentation and version for 2.0.0

This commit is contained in:
Justin Foell
2019-10-04 16:07:07 -05:00
parent 330a65feb0
commit bc9f8f6468
9 changed files with 18 additions and 17 deletions
+2 -2
View File
@@ -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 ) {
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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'] );
+4 -4
View File
@@ -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 ) {
+1 -1
View File
@@ -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
+3 -3
View File
@@ -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