From 9f398e40730e84ad950116603b7e7ce03f971912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Cap=C3=B3?= Date: Wed, 15 Mar 2017 16:08:51 +0100 Subject: [PATCH] fix first install --- gitea-updater.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gitea-updater.php b/gitea-updater.php index c632f00..56ce1e9 100644 --- a/gitea-updater.php +++ b/gitea-updater.php @@ -43,6 +43,8 @@ class Gitea_Updater { Gitea_Options::getInstance(); + add_action('admin_init', array($this, 'admin_init')); + // plugins checks add_filter('plugins_api', array($this, 'plugins_api'), 10, 3); add_filter('pre_set_site_transient_update_plugins', array($this, 'pre_set_site_transient_update_plugins')); @@ -56,13 +58,15 @@ class Gitea_Updater { } - function plugins_loaded() { - load_plugin_textdomain('gitea', FALSE, basename( dirname( __FILE__ ) ) . '/languages/'); - + function admin_init() { if (!get_option('gitea_plugins') || !get_option('gitea_plugins')) $this->get_all(); } + function plugins_loaded() { + load_plugin_textdomain('gitea', FALSE, basename( dirname( __FILE__ ) ) . '/languages/'); + } + function get_all() { $this->get_plugins(); $this->get_themes();