/** * Load the update checker state from the DB. * * @return StdClass|null */ public function getUpdateState() { $state = get_site_option($this->optionName); if (!empty($state) && isset($state->update) && !$state->update instanceof PluginUpdate) { $state->update = PluginUpdate::fromObject($state->update); } return $state; }
/** * Load the update checker state from the DB. * * @return StdClass|null */ public function getUpdateState() { $state = get_site_option($this->option_db_name, null); if (empty($state) || !is_array($state)) { $state = null; } if (!empty($state) && isset($state['update_info']) && is_object($state['update_info'])) { $state['update_info'] = PluginUpdate::fromObject($state['update_info']); } return $state; }