PUM_Extension_Updater::get_cached_version_info( $cache_key = '' )
Description Description
Source Source
File: classes/Extension/Updater.php
public function get_cached_version_info( $cache_key = '' ) { if( empty( $cache_key ) ) { $cache_key = $this->cache_key; } $cache = get_option( $cache_key ); if( empty( $cache['timeout'] ) || time() > $cache['timeout'] ) { return false; // Cache is expired } // We need to turn the icons into an array, thanks to WP Core forcing these into an object at some point. $cache['value'] = json_decode( $cache['value'] ); if ( ! empty( $cache['value']->icons ) ) { $cache['value']->icons = (array) $cache['value']->icons; } return $cache['value']; }
Expand full source code Collapse full source code View on Trac