Promoted athelete_token check

This commit is contained in:
Justin Foell
2019-10-05 21:54:35 -05:00
parent 65658b75d4
commit 5bf4dad1e4
4 changed files with 20 additions and 16 deletions
+6 -1
View File
@@ -97,7 +97,12 @@ class WPStrava_LatestMapWidget extends WP_Widget {
try {
$activities = $strava_activity->get_activities( $client_id, $strava_club_id );
} catch ( WPStrava_Exception $e ) {
echo $e->to_html();
if ( isset( $instance['athlete_token'] ) ) {
// Translators: Message shown when using deprecated athlete_token parameter.
echo wp_kses_post( __( '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' ) );
} else {
echo $e->to_html();
}
}
if ( ! empty( $activities ) ) {