feat: site-status test tool and core integration

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01At3V6SjwbMe6eMzVGW3Hs7
This commit is contained in:
2026-09-25 15:36:53 +02:00
co-authored by Claude Opus 5.5
parent b54d55e5e1
commit fb4787c032
5 changed files with 209 additions and 0 deletions
@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
namespace LIT\MCP\Integrations\Core;
/**
* Detects the themes/plugins LIT MCP integrates with.
*/
class EnvironmentProbe
{
/** @return list<array{id: string, active: bool, version: ?string}> */
public function components(): array
{
$theme = wp_get_theme();
$isDivi = $theme->get_template() === 'Divi';
$parent = $theme->parent();
$diviVersion = $isDivi ? (string) ($parent ? $parent->get('Version') : $theme->get('Version')) : null;
$tecActive = class_exists('Tribe__Events__Main');
return [
['id' => 'divi', 'active' => $isDivi, 'version' => $diviVersion],
[
'id' => 'pods',
'active' => defined('PODS_VERSION'),
'version' => defined('PODS_VERSION') ? (string) PODS_VERSION : null,
],
[
'id' => 'the-events-calendar',
'active' => $tecActive,
'version' => $tecActive ? (string) constant('Tribe__Events__Main::VERSION') : null,
],
];
}
}