mirror of
https://github.com/10h30/wp-strava.git
synced 2026-07-12 11:16:52 +09:00
Promoted athelete_token check
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user