diff --git a/gitea-updater.php b/gitea-updater.php index 8a0497c..c632f00 100644 --- a/gitea-updater.php +++ b/gitea-updater.php @@ -3,7 +3,7 @@ * Plugin Name: Gitea Updater * Plugin URI: http://www.paucapo.com * Description: Plugins updater - * Version: 0.1.1 + * Version: 0.2 * Author: Pau Capó * Author URI: http://www.paucapo.com * Text Domain: gitea @@ -58,6 +58,9 @@ class Gitea_Updater { function plugins_loaded() { load_plugin_textdomain('gitea', FALSE, basename( dirname( __FILE__ ) ) . '/languages/'); + + if (!get_option('gitea_plugins') || !get_option('gitea_plugins')) + $this->get_all(); } function get_all() { @@ -84,8 +87,8 @@ class Gitea_Updater { $url = $this->get_url($host, $repo, '/raw/master/'.$file); if ($url != false) { $new_version = $this->get_version($url, 'plugin'); - $new_version = $new_version ? $new_version : $local_version; } + $new_version = $new_version ? $new_version : $local_version; // here we have the remote version from gitea/repo/plugin_file