Eine Installation löscht das gespeicherte Update-Ergebnis; eine Prüfung, die läuft, solange das Plugin nicht geladen ist, speichert eines ohne das Plugin, und der Schalter für automatische Updates fehlt bis zu eine Stunde. RecheckOnInstall vergisst das Ergebnis beim ersten admin_init mit der neuen Version (Priorität 5, vor _maybe_update_plugins des Core), der es dann mit registriertem GiteaUpdater neu aufbaut. Die Option lit_mcp_installed_version räumt der Uninstaller auf. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
44 lines
1.3 KiB
PHP
44 lines
1.3 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Plugin Name: WP-LIT-MCP
|
|
* Plugin URI: https://git.loosen-it.de/janniclas.loosen/WP-LIT-MCP
|
|
* Description: MCP-Server für WordPress, Divi 5 und Pods. Pflegt Inhalte, Medien und Divi-Seiten mit OAuth für KI-Assistenten.
|
|
* Version: 1.0.5
|
|
* Update URI: https://git.loosen-it.de/janniclas.loosen/WP-LIT-MCP
|
|
* Requires at least: 6.9
|
|
* Requires PHP: 8.1
|
|
* Tested up to: 7.1
|
|
* Author: Jan-Niclas Loosen - Loosen-IT
|
|
* Author URI: https://loosen-it.de
|
|
* License: GPL-2.0-or-later
|
|
* Text Domain: wp-lit-mcp
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
defined('ABSPATH') || exit;
|
|
|
|
$lit_mcp_autoload = __DIR__ . '/vendor/autoload_packages.php';
|
|
|
|
if (! is_readable($lit_mcp_autoload)) {
|
|
add_action('admin_notices', static function (): void {
|
|
echo '<div class="notice notice-error"><p>'
|
|
. esc_html__(
|
|
'WP-LIT-MCP: Abhängigkeiten fehlen. Bitte "composer install --no-dev" im Plugin-Ordner ausführen.',
|
|
'wp-lit-mcp'
|
|
)
|
|
. '</p></div>';
|
|
});
|
|
return;
|
|
}
|
|
|
|
require_once $lit_mcp_autoload;
|
|
|
|
register_activation_hook(__FILE__, [\LIT\MCP\Lifecycle::class, 'activate']);
|
|
register_deactivation_hook(__FILE__, [\LIT\MCP\Lifecycle::class, 'deactivate']);
|
|
|
|
add_action('plugins_loaded', static function (): void {
|
|
\LIT\MCP\Plugin::boot(__FILE__);
|
|
});
|