mirror of
https://github.com/10h30/wp-strava.git
synced 2026-06-05 15:10:01 +09:00
Updated 1.7.3
This commit is contained in:
@@ -28,6 +28,8 @@ class WPStrava_Settings {
|
||||
add_action( 'admin_menu', array( $this, 'add_strava_menu' ) );
|
||||
add_filter( 'pre_set_transient_settings_errors', array( $this, 'maybe_oauth' ) );
|
||||
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 );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -701,4 +703,43 @@ 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
|
||||
* @see https://wisdomplugin.com/add-inline-plugin-update-message/
|
||||
*/
|
||||
public function plugin_update_message( $data, $response ) {
|
||||
if ( isset( $data['upgrade_notice'] ) ) {
|
||||
printf(
|
||||
'<div class="update-message">%s</div>',
|
||||
wpautop( $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() && 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'],
|
||||
wpautop( $plugin['upgrade_notice'] )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+16
-2
@@ -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
|
||||
|
||||
@@ -16,6 +16,11 @@ Show your Strava activity on your WordPress site.
|
||||
This plugin uses the Strava API to embed maps and activity for athletes and clubs on your WordPress site. Included are several widgets and shortcodes for showing maps and activity summaries.
|
||||
|
||||
|
||||
= Cron =
|
||||
|
||||
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 =
|
||||
|
||||
[activity id=NUMBER] - add to any page or post. Shows a summary of the activity plus a map if a google maps key has been added.
|
||||
@@ -83,6 +88,10 @@ WP-Strava caches activity for one hour so your site doesn't hit the Strava API o
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 1.7.3 =
|
||||
|
||||
Added update notice.
|
||||
|
||||
= 1.7.2 =
|
||||
|
||||
Added setting to hide elevation.
|
||||
@@ -222,3 +231,8 @@ Added option to select unit of measurements on the widget. https://wordpress.org
|
||||
= 0.6 =
|
||||
|
||||
Initial version.
|
||||
|
||||
|
||||
== upgrade_notice ==
|
||||
|
||||
The version 2.0 upgrade is coming soon and will be mandatory to use the Strava API after October 15th, 2019. To participate in the 2.0 beta program please visit https://github.com/cmanon/wp-strava/releases. After upgrading to version 2.0, you must upgrade your settings to continue to use WP-Strava 2.0. See https://github.com/cmanon/wp-strava/wiki/2.0-Upgrade.
|
||||
|
||||
+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