Skip to content

Commit

Permalink
Merge pull request #38 from cmanon/fix/37-cant-add-athlete-wp-53
Browse files Browse the repository at this point in the history
Fixed athlete addition in WP 5.3;
  • Loading branch information
jrfoell authored Dec 22, 2019
2 parents 166ee78 + 632898f commit ed1a432
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion includes/WPStrava/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function maybe_oauth( $value ) {

$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();
}

Expand Down
2 changes: 1 addition & 1 deletion includes/WPStrava/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ public function delete_id_secret() {
* @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'] ) );
}

/**
Expand Down
14 changes: 12 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand All @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion wp-strava.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ed1a432

Please sign in to comment.