mirror of
https://github.com/10h30/wp-strava.git
synced 2026-06-05 15:10:01 +09:00
Merge branch 'master' into feature/refresh-auth
This commit is contained in:
@@ -34,9 +34,11 @@ class WPStrava_Settings {
|
||||
* @since 0.62
|
||||
*/
|
||||
public function hook() {
|
||||
add_action( 'admin_init', array( $this, 'register_strava_settings' ), 20 );
|
||||
add_action( 'admin_init', array( $this, 'register_strava_settings' ) );
|
||||
add_action( 'admin_menu', array( $this, 'add_strava_menu' ) );
|
||||
add_filter( 'plugin_action_links_' . WPSTRAVA_PLUGIN_NAME, array( $this, 'settings_link' ) );
|
||||
add_action( 'in_plugin_update_message-wp-strava/wp-strava.php', array( $this, 'plugin_update_message' ), 10, 2 );
|
||||
add_action( 'after_plugin_row_wp-strava/wp-strava.php', array( $this, 'ms_plugin_update_message' ), 10, 2 );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -699,4 +701,39 @@ class WPStrava_Settings {
|
||||
$links[] = $settings_link;
|
||||
return $links;
|
||||
}
|
||||
|
||||
/**
|
||||
* Plugin Upgrade Notice.
|
||||
*
|
||||
* @param array $data Plugin data with readme additions.
|
||||
* @param array $response Response from wp.org.
|
||||
* @author Justin Foell <justin.foell@webdevstudios.com>
|
||||
* @since 1.7.3
|
||||
*/
|
||||
public function plugin_update_message( $data, $response ) {
|
||||
if ( isset( $data['upgrade_notice'] ) ) {
|
||||
echo wp_kses_post( $data['upgrade_notice'] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Plugin Upgrade Notice (multisite).
|
||||
*
|
||||
* @param string $file Relative path to plugin, i.e. wp-strava/wp-strava.php.
|
||||
* @param array $plugin Plugin data with readme additions.
|
||||
* @author Justin Foell <justin.foell@webdevstudios.com>
|
||||
* @since 1.7.3
|
||||
*/
|
||||
public function ms_plugin_update_message( $file, $plugin ) {
|
||||
if ( is_multisite() && ! is_network_admin() && version_compare( $plugin['Version'], $plugin['new_version'], '<' ) ) {
|
||||
$wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
|
||||
printf(
|
||||
'<tr class="plugin-update-tr"><td colspan="%s" class="plugin-update update-message notice inline notice-warning notice-alt"><div class="update-message"><h4 style="margin: 0; font-size: 14px;">%s</h4>%s</div></td></tr>',
|
||||
$wp_list_table->get_column_count(),
|
||||
$plugin['Name'],
|
||||
wp_kses_post( $plugin['upgrade_notice'] )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+16
-3
@@ -1,10 +1,10 @@
|
||||
=== WP-Strava ===
|
||||
|
||||
Contributors: cmanon, jrfoell, lancewillett, dlintott, sebastianerb
|
||||
Tags: strava, activity, bicycle, cycling, biking, running, run, swimming, swim, gps, shortcode, widget, plugin
|
||||
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.1
|
||||
Stable tag: 1.7.2
|
||||
Stable tag: 1.7.3
|
||||
Requires PHP: 5.2
|
||||
License: GPLv2 or later
|
||||
|
||||
@@ -17,7 +17,7 @@ This plugin uses the Strava API to embed maps and activity for athletes and club
|
||||
|
||||
= Cron =
|
||||
|
||||
Using WP-Strava after September 2019 requires a working WordPress cron configuration. By default, WordPress has a built-in cron system to run scheduled events, but it relies on your website getting frequent visitors. The Strava authentication token system expires after 6 hours if not refreshed. If you think your site will not get any visitors over the span on 6 hours, you might want to set up a _real_ cron: https://developer.wordpress.org/plugins/cron/hooking-wp-cron-into-the-system-task-scheduler/. Setting up this sort of cron is beyond the scope of support for this free plugin, so you should seek assistance through your host.
|
||||
Using WP-Strava 2.0+ requires a working WordPress cron configuration. By default, WordPress has a built-in cron system to run scheduled events, but it relies on your website getting frequent visitors. The Strava authentication token system expires after 6 hours if not refreshed. If you think your site will not get any visitors over the span on 6 hours, you might want to set up a _real_ cron: https://developer.wordpress.org/plugins/cron/hooking-wp-cron-into-the-system-task-scheduler/. Setting up this sort of cron is beyond the scope of support for this free plugin, so you should seek assistance through your host. Force-running the WordPress cron once an hour is good enough for WP-Strava.
|
||||
|
||||
|
||||
= Shortcodes =
|
||||
@@ -97,6 +97,11 @@ WP-Strava caches activity for one hour so your site doesn't hit the Strava API o
|
||||
Added new Strava "refresh tokens" ala https://developers.strava.com/docs/oauth-updates/#migration-instructions
|
||||
|
||||
|
||||
= 1.7.3 =
|
||||
|
||||
Added update notice.
|
||||
|
||||
|
||||
= 1.7.2 =
|
||||
|
||||
Added setting to hide elevation.
|
||||
@@ -111,6 +116,7 @@ Fixed swimpace calculation.
|
||||
Fixed seconds display on pace.
|
||||
Added Hide Activity Time option to hide time display from Latest Activities List.
|
||||
|
||||
|
||||
= 1.7.0 =
|
||||
|
||||
Added Sebastian Erb to contributors.
|
||||
@@ -236,3 +242,10 @@ Added option to select unit of measurements on the widget. https://wordpress.org
|
||||
= 0.6 =
|
||||
|
||||
Initial version.
|
||||
|
||||
|
||||
== Upgrade Notice ==
|
||||
|
||||
= 1.7.3 =
|
||||
|
||||
Version 2.0 will be mandatory after October 15th, 2019. Try the 2.0 beta: <a href="https://github.com/cmanon/wp-strava/releases">https://github.com/cmanon/wp-strava/releases</a>. 2.0 settings upgrade instructions: <a href="https://github.com/cmanon/wp-strava/wiki/2.0-Upgrade">https://github.com/cmanon/wp-strava/wiki/2.0-Upgrade</a>.
|
||||
|
||||
+1
-1
@@ -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: 1.7.2
|
||||
* Version: 1.7.3
|
||||
* Author: Carlos Santa Cruz, Justin Foell, Lance Willett, Daniel Lintott, Sebastian Erb
|
||||
* License: GPL2
|
||||
* Text Domain: wp-strava
|
||||
|
||||
Reference in New Issue
Block a user