Added option to clear cache

This commit is contained in:
Justin Foell
2017-05-10 14:39:00 -05:00
parent 37816d12b8
commit 3bb9faace6
3 changed files with 23 additions and 3 deletions
+2 -2
View File
@@ -37,7 +37,7 @@ class WPStrava {
}
public function __get( $name ) {
//on-demand classes
// On-demand classes.
if ( $name == 'api' ) {
return $this->get_api();
}
@@ -56,7 +56,7 @@ class WPStrava {
public function get_api() {
if ( ! $this->api ) {
require_once WPSTRAVA_PLUGIN_DIR . 'lib/API.class.php';
$this->api = new WPStrava_API( get_option('strava_token') );
$this->api = new WPStrava_API( get_option( 'strava_token' ) );
}
return $this->api;