diff --git a/kgv-updater.php b/kgv-updater.php index 9923590..2ef00c6 100644 --- a/kgv-updater.php +++ b/kgv-updater.php @@ -3,6 +3,8 @@ * Plugin Name: KGV Updater * Plugin URI: https://apex-project.de/ * Description: Aktualisiert KGV-Plugins direkt aus den Gitea-Repositories. + * Update URI: https://git.apex-project.de/RonnyG/KGV-Updater + * Gitea Plugin URI: https://git.apex-project.de/RonnyG/KGV-Updater * Version: 1.0.0 * Author: Ronny Grobel * Text Domain: kgv-updater @@ -13,8 +15,8 @@ if ( ! defined( 'ABSPATH' ) ) { } final class KGV_Updater { - const OPTION_TOKEN = 'kgv_updater_gitea_token'; - const OPTION_HOST = 'kgv_updater_gitea_host'; + const GITEA_HOST = 'git.apex-project.de'; + const GITEA_TOKEN = ''; private static $instance = null; @@ -29,72 +31,6 @@ final class KGV_Updater { private function __construct() { add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'inject_updates' ) ); add_filter( 'plugins_api', array( $this, 'plugins_api' ), 10, 3 ); - add_action( 'admin_menu', array( $this, 'register_settings_page' ) ); - add_action( 'admin_init', array( $this, 'register_settings' ) ); - } - - public function register_settings() { - register_setting( - 'kgv_updater_settings', - self::OPTION_TOKEN, - array( - 'type' => 'string', - 'sanitize_callback' => 'sanitize_text_field', - 'default' => '', - ) - ); - - register_setting( - 'kgv_updater_settings', - self::OPTION_HOST, - array( - 'type' => 'string', - 'sanitize_callback' => 'sanitize_text_field', - 'default' => 'git.apex-project.de', - ) - ); - } - - public function register_settings_page() { - add_options_page( - 'KGV Updater', - 'KGV Updater', - 'manage_options', - 'kgv-updater', - array( $this, 'render_settings_page' ) - ); - } - - public function render_settings_page() { - if ( ! current_user_can( 'manage_options' ) ) { - return; - } - ?> -
Prueft KGV-Plugins mit Update URI auf neue Versionen in Gitea.