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
+5 -5
View File
@@ -44,6 +44,11 @@ class WPStrava_ActivityShortcode {
* @since 1.0
*/
public function handler( $atts ) {
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 WP-Strava version 2 and should be replaced with <code>client_id</code>.', 'wp-strava' );
}
$this->add_script = true;
$defaults = array(
@@ -58,11 +63,6 @@ class WPStrava_ActivityShortcode {
$atts = shortcode_atts( $defaults, $atts, 'activity' );
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 WP-Strava 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
*/