Switch calls to use Client ID instead of Access Token

This commit is contained in:
Justin Foell
2019-06-03 16:07:15 -05:00
parent 33c0deb870
commit 520bd1b649
10 changed files with 125 additions and 57 deletions
+12 -7
View File
@@ -47,17 +47,22 @@ class WPStrava_RouteShortcode {
$this->add_script = true;
$defaults = array(
'id' => 0,
'som' => WPStrava::get_instance()->settings->som,
'map_width' => '480',
'map_height' => '320',
'athlete_token' => WPStrava::get_instance()->settings->get_default_token(),
'markers' => false,
'image_only' => false,
'id' => 0,
'som' => WPStrava::get_instance()->settings->som,
'map_width' => '480',
'map_height' => '320',
'client_id' => WPStrava::get_instance()->settings->get_default_id(),
'markers' => false,
'image_only' => false,
);
$atts = shortcode_atts( $defaults, $atts, 'route' );
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' );
}
/* Make sure boolean values are actually boolean
* @see https://wordpress.stackexchange.com/a/119299
*/