feat: Divi adapters for roles and library with a live compatibility check

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-27 00:51:09 +02:00
co-authored by Claude Opus 5.5
parent b389f983de
commit ce1ad7c6c3
10 changed files with 491 additions and 5 deletions
+17 -3
View File
@@ -4,14 +4,21 @@ declare(strict_types=1);
namespace LIT\MCP\Integrations\Core;
use LIT\MCP\Integrations\Divi\DiviCompatibility;
defined('ABSPATH') || exit;
/**
* Detects the themes/plugins LIT MCP integrates with.
* Detects the themes/plugins LIT MCP integrates with; for Divi also the internals that are missing
* (DiviCompatibility).
*/
class EnvironmentProbe
{
/** @return list<array{id: string, active: bool, version: ?string}> */
public function __construct(private ?DiviCompatibility $divi = null)
{
}
/** @return list<array{id: string, active: bool, version: ?string, problems: list<string>}> */
public function components(): array
{
$theme = wp_get_theme();
@@ -22,16 +29,23 @@ class EnvironmentProbe
$tecActive = class_exists('Tribe__Events__Main');
return [
['id' => 'divi', 'active' => $isDivi, 'version' => $diviVersion],
[
'id' => 'divi',
'active' => $isDivi,
'version' => $diviVersion,
'problems' => $isDivi ? ($this->divi ?? new DiviCompatibility())->problems() : [],
],
[
'id' => 'pods',
'active' => defined('PODS_VERSION'),
'version' => defined('PODS_VERSION') ? (string) PODS_VERSION : null,
'problems' => [],
],
[
'id' => 'the-events-calendar',
'active' => $tecActive,
'version' => $tecActive ? (string) constant('Tribe__Events__Main::VERSION') : null,
'problems' => [],
],
];
}
+2 -1
View File
@@ -30,7 +30,8 @@ final class SiteStatusAbility implements Ability
public function description(): string
{
return 'Überblick: Website, WordPress-Version, eigener Benutzer und Rollen, '
. 'erkannte Integrationen (Divi, Pods, The Events Calendar).';
. 'erkannte Integrationen (Divi, Pods, The Events Calendar). '
. 'Bei Divi nennt problems Divi-Funktionen, die nach einem Update fehlen.';
}
public function inputSchema(): array