mirror of
https://github.com/10h30/wp-strava.git
synced 2026-07-18 22:23:45 +09:00
Updated version to 1.1
Added Lance Willet Tested WP 4.2 Check for WP error on Strava POST Fix static method in RideShortcode Add Title to Latest Map Widget
This commit is contained in:
@@ -30,7 +30,7 @@ class WPStrava_LatestRidesWidget extends WP_Widget {
|
||||
?>
|
||||
<?php echo $before_widget; ?>
|
||||
<?php if ( $title ) echo $before_title . $title . $after_title; ?>
|
||||
<?php echo $this->strava_request_handler( $strava_club_id, $strava_som_option, $quantity ); ?>
|
||||
<?php echo $this->strava_request_handler( $strava_club_id, $quantity ); ?>
|
||||
<?php echo $after_widget; ?>
|
||||
<?php
|
||||
}
|
||||
@@ -39,11 +39,6 @@ class WPStrava_LatestRidesWidget extends WP_Widget {
|
||||
public function update( $new_instance, $old_instance ) {
|
||||
$instance = $old_instance;
|
||||
$instance['title'] = strip_tags( $new_instance['title'] );
|
||||
if( in_array( $new_instance['strava_som_option'], array( 'metric', 'english' ) ) ) {
|
||||
$instance['strava_som_option'] = $new_instance['strava_som_option'];
|
||||
} else {
|
||||
$instance['strava_som_option'] = 'metric';
|
||||
}
|
||||
$instance['strava_club_id'] = strip_tags( $new_instance['strava_club_id'] );
|
||||
$instance['quantity'] = $new_instance['quantity'];
|
||||
|
||||
@@ -74,7 +69,7 @@ class WPStrava_LatestRidesWidget extends WP_Widget {
|
||||
|
||||
// The handler to the ajax call, we will avoid this if Strava support jsonp request and we can do it
|
||||
// the parsing directly on the jQuery ajax call, the returned text will be enclosed in the $response variable.
|
||||
private function strava_request_handler( $strava_club_id, $strava_som_option, $quantity ) {
|
||||
private function strava_request_handler( $strava_club_id, $quantity ) {
|
||||
|
||||
$strava_rides = WPStrava::get_instance()->rides;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user