mirror of
https://github.com/10h30/wp-strava.git
synced 2026-07-16 13:13:41 +09:00
Formatting, added target="_blank" to widget hrefs
This commit is contained in:
+15
-12
@@ -9,11 +9,11 @@ require_once WPSTRAVA_PLUGIN_DIR . 'lib/StaticMap.class.php';
|
||||
|
||||
class WPStrava {
|
||||
|
||||
private static $instance = NULL;
|
||||
private $settings = NULL;
|
||||
private $api = NULL;
|
||||
private $rides = NULL;
|
||||
|
||||
private static $instance = null;
|
||||
private $settings = null;
|
||||
private $api = null;
|
||||
private $rides = null;
|
||||
|
||||
private function __construct() {
|
||||
$this->settings = new WPStrava_Settings();
|
||||
|
||||
@@ -24,8 +24,8 @@ class WPStrava {
|
||||
}
|
||||
|
||||
// Register StravaLatestRidesWidget widget
|
||||
add_action( 'widgets_init', create_function('', 'return register_widget( "WPStrava_LatestRidesWidget" );') );
|
||||
add_action( 'widgets_init', create_function('', 'return register_widget( "WPStrava_LatestMapWidget" );' ) );
|
||||
add_action( 'widgets_init', create_function( '', 'return register_widget( "WPStrava_LatestRidesWidget" );' ) );
|
||||
add_action( 'widgets_init', create_function( '', 'return register_widget( "WPStrava_LatestMapWidget" );' ) );
|
||||
}
|
||||
|
||||
public static function get_instance() {
|
||||
@@ -38,16 +38,19 @@ class WPStrava {
|
||||
|
||||
public function __get( $name ) {
|
||||
//on-demand classes
|
||||
if ( $name == 'api' )
|
||||
if ( $name == 'api' ) {
|
||||
return $this->get_api();
|
||||
}
|
||||
|
||||
if ( $name == 'rides' )
|
||||
if ( $name == 'rides' ) {
|
||||
return $this->get_rides();
|
||||
}
|
||||
|
||||
if ( isset( $this->{$name} ) )
|
||||
if ( isset( $this->{$name} ) ) {
|
||||
return $this->{$name};
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return null;
|
||||
}
|
||||
|
||||
public function get_api() {
|
||||
@@ -58,7 +61,7 @@ class WPStrava {
|
||||
|
||||
return $this->api;
|
||||
}
|
||||
|
||||
|
||||
public function get_rides() {
|
||||
if ( ! $this->rides ) {
|
||||
require_once WPSTRAVA_PLUGIN_DIR . 'lib/Rides.class.php';
|
||||
|
||||
Reference in New Issue
Block a user