From 632898fc86b42bd222f7e09db986fed17d0a3c72 Mon Sep 17 00:00:00 2001 From: Justin Foell <630830+jrfoell@users.noreply.github.com> Date: Sun, 22 Dec 2019 11:29:56 -0600 Subject: [PATCH] Fixed athlete addition in WP 5.3; Bumped version Updated changelog Added FAQ about adding/removing at the same time --- includes/WPStrava/Auth.php | 2 +- includes/WPStrava/Settings.php | 2 +- readme.txt | 14 ++++++++++++-- wp-strava.php | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/includes/WPStrava/Auth.php b/includes/WPStrava/Auth.php index 0ae62ba..d286040 100644 --- a/includes/WPStrava/Auth.php +++ b/includes/WPStrava/Auth.php @@ -52,7 +52,7 @@ abstract class WPStrava_Auth { $input = filter_input_array( INPUT_POST, $input_args ); - if ( $settings->ids_empty( $input['strava_id'] ) ) { + if ( is_array( $input['strava_id'] ) && $settings->ids_empty( $input['strava_id'] ) ) { return array(); } diff --git a/includes/WPStrava/Settings.php b/includes/WPStrava/Settings.php index 237e8a3..fcb0eb1 100644 --- a/includes/WPStrava/Settings.php +++ b/includes/WPStrava/Settings.php @@ -646,7 +646,7 @@ class WPStrava_Settings { * @since 2.0.0 */ public function is_settings_updated( $value ) { - return isset( $value[0]['type'] ) && 'updated' === $value[0]['type']; + return ( isset( $value[0]['type'] ) && ( 'updated' === $value[0]['type'] || 'success' === $value[0]['type'] ) ); } /** diff --git a/readme.txt b/readme.txt index a2cd2fb..3577321 100755 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: cmanon, jrfoell, lancewillett, dlintott, sebastianerb Tags: strava, activity, bicycle, cycling, biking, running, run, swimming, swim, paddle, kayak, gps, shortcode, widget, plugin Requires at least: 4.6 -Tested up to: 5.2 -Stable tag: 2.0.1 +Tested up to: 5.3 +Stable tag: 2.1.0 Requires PHP: 5.2 License: GPLv2 or later @@ -81,6 +81,11 @@ If your API key works with other Google Maps plugins but not WP Strava, you may WP-Strava caches activity for one hour so your site doesn't hit the Strava API on every page load. If you recently uploaded activity and want to see it right away, go to the Settings -> Strava in the wp-admin dashboard, check the checkbox labeled "Clear cache (images & transient data)" and then click Save Changes. +- Why can't I remove and add an athlete at the same time? - + +On the WP-Strava settings page you cannot currently remove and add another athlete at the same time. This is a known limitation. WP-Strava will remove the athlete(s) that you cleared the ID/Nickname fields for, but the new athlete will no be added. Please complete the add/remove operations as separate save actions on the WP-Strava settings page. + + == Screenshots == 1. WP Strava settings - this walks you through connecting the WP Strava plugin to your strava account. You can connect multiple accounts by authenticating each one here. Add your Google Maps key for map display here. You can also set the system of measurement (miles/kilometers) and clear any saved data. @@ -98,6 +103,11 @@ WP-Strava caches activity for one hour so your site doesn't hit the Strava API o == Changelog == += 2.1.0 = + +Updated settings to work with WP 5.3. + + = 2.0.1 = Added [latest_map] shortcode https://wordpress.org/support/topic/show-latest-map-not-in-widget/ diff --git a/wp-strava.php b/wp-strava.php index 04d721e..9f073ff 100755 --- a/wp-strava.php +++ b/wp-strava.php @@ -3,7 +3,7 @@ * Plugin Name: WP Strava * Plugin URI: https://wordpress.org/plugins/wp-strava/ * Description: Show your strava.com activity on your WordPress site. Some Icons are Copyright © Yusuke Kamiyamane. All rights reserved. Licensed under a Creative Commons Attribution 3.0 license. - * Version: 2.0.1 + * Version: 2.1.0 * Author: Carlos Santa Cruz, Justin Foell, Lance Willett, Daniel Lintott, Sebastian Erb * License: GPL2 * Text Domain: wp-strava