Skip to content

Commit

Permalink
fix time to real 6 hours
Browse files Browse the repository at this point in the history
  • Loading branch information
franz-josef-kaiser committed Mar 4, 2012
1 parent bab8195 commit f9fe219
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions updater.php
Expand Up @@ -168,7 +168,7 @@ public function get_new_version() {
$_version = explode( '~', $__version[1] );
$version = $_version[0];
// refresh every 6 hours
set_site_transient( "{$this->config['slug']}_new_version", $version, 60*60*60*6 );
set_site_transient( "{$this->config['slug']}_new_version", $version, 60*60*6 );
}

return $version;
Expand All @@ -185,15 +185,15 @@ public function get_new_version() {
public function get_github_data() {
$github_data = get_site_transient( "{$this->config['slug']}_github_data" );

if ( ! isset($github_data) || ! $github_data || '' == $github_data ) {
if ( ! isset( $github_data ) || ! $github_data || '' == $github_data ) {
$github_data = wp_remote_get( $this->config['api_url'], $this->config['sslverify'] );

if ( is_wp_error( $github_data ) )
return false;

$github_data = json_decode( $github_data['body'] );
// refresh every 6 hours
set_site_transient( "{$this->config['slug']}_github_data", $github_data, 60*60*60*6);
set_site_transient( "{$this->config['slug']}_github_data", $github_data, 60*60*6);
}

return $github_data;
Expand Down

0 comments on commit f9fe219

Please sign in to comment.