Skip to content

Commit

Permalink
Fixed formatting and bumped version
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfoell committed Mar 23, 2018
1 parent 3f08061 commit 1556977
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lib/WPStrava.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ private function __construct() {
if ( is_admin() ) {
$this->settings->hook();
} else {
add_action( 'init', array( $this, 'register_shortcodes') );
add_action( 'init', array( $this, 'register_shortcodes' ) );
add_action( 'wp_enqueue_scripts', array( $this, 'register_scripts' ) );
}

Expand Down
4 changes: 2 additions & 2 deletions lib/WPStrava/LatestActivities.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ public static function get_activities_html( $args ) {
$response .= "<div class='activity-item'>";

if ( ! empty( $activity->start_date_local ) ) {
$unixtime = strtotime( $activity->start_date_local );
$unixtime = strtotime( $activity->start_date_local );
// Translators: Shows something like "On <date> <[went 10 miles] [during 2 hours] [climbing 100 feet]>."
$response .= sprintf( __( 'On %1$s %2$s', 'wp-strava' ), date_i18n( get_option( 'date_format' ), $unixtime ), date_i18n( get_option( 'time_format' ), $unixtime ) );
}

if ( is_numeric( $args['strava_club_id'] ) ) {
$name = $activity->athlete->firstname . ' ' . $activity->athlete->lastname;
$name = $activity->athlete->firstname . ' ' . $activity->athlete->lastname;
$response .= empty( $activity->athlete->id ) ?
" {$name}" :
" <a href='" . WPStrava_Activity::ATHLETES_URL . $activity->athlete->id . "'>" . $name . '</a>';
Expand Down
4 changes: 4 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
</rule>

<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>

</ruleset>
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Contributors: cmanon, jrfoell, lancewillett, dlintott
Tags: strava, activity, bicycle, cycling, biking, running, run, swimming, swim, gps, shortcode, widget, plugin
Requires at least: 4.6
Tested up to: 4.9
Stable tag: 1.4.3
Stable tag: 1.5.0
Requires PHP: 5.2
License: GPLv2 or later

Expand Down
25 changes: 13 additions & 12 deletions wp-strava.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,28 @@
* 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.5.0-rc2
* Version: 1.5.0
* Author: Carlos Santa Cruz, Justin Foell, Lance Willett, Daniel Lintott
* License: GPL2
* Text Domain: wp-strava
* Domain Path: /lang
*/

/* Copyright 2017 Carlos Santa Cruz (email : cmanon at gmail dot com)
/*
Copyright 2018 Carlos Santa Cruz (email : cmanon at gmail dot com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/


Expand Down

0 comments on commit 1556977

Please sign in to comment.