diff --git a/lib/Settings.class.php b/lib/Settings.class.php index 09d37fe..393a908 100644 --- a/lib/Settings.class.php +++ b/lib/Settings.class.php @@ -92,23 +92,26 @@ class WPStrava_Settings { } public function print_api_instructions() { - ?>

Steps:

+ $signup_url = 'http://www.strava.com/developers'; + $settings_url = 'https://www.strava.com/settings/api'; + $blog_name = get_bloginfo( 'name' ); + $app_name = $blog_name . ' Strava'; + $url_parts = parse_url( site_url() ); + $site_url = $url_parts['host']; //strip http/https for copying/pasting into strava + $description = 'WP-Strava for ' . $blog_name; + printf( __( "

Steps:

    -
  1. Create your app here: http://www.strava.com/developers
  2. -

    Use the following information:

    +
  3. Create your API Application here: %s using the following information:
  4. -
  5. Once you've created your application, enter the Client ID and Client Secret below, which can be found at https://www.strava.com/settings/api
  6. -
  7. You'll be redirected to strava to authorize your app after saving your Client ID and Secret. If successful, your Strava Token will display
  8. -
  9. Erase your Strava Token if you need to re-authorize
  10. -
- - Once you've created your API Application at strava.com, enter the Client ID and Client Secret below, which can be found at %s +
  • After saving your Client ID and Secret, you'll be redirected to strava to authorize your API Application. If successful, your Strava Token will display instead of Client ID and Client Secret.
  • +
  • If you need to re-authorize your API Application, erase your Strava Token here and click 'Save Changes' to start over.
  • + ", 'wp-strava' ), $signup_url, $signup_url, $app_name, $site_url, $description, $site_url, $settings_url, $settings_url ); } public function print_strava_options() {