feat: Divi tab with REST check, release and withdrawal

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-30 02:39:21 +02:00
co-authored by Claude Opus 5.5
parent 47040aa43d
commit 6113e5ad5a
13 changed files with 849 additions and 18 deletions
+32
View File
@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
// WP_HTTP_Response first: real WordPress' WP_REST_Response extends it (ConnectionUsage::successful()
// tells a WP_REST_Response apart from a WP_Error/array via instanceof WP_HTTP_Response).
if (! class_exists('WP_HTTP_Response')) {
class WP_HTTP_Response
{
/** @param array<string, string> $headers */
public function __construct(public mixed $data = null, public int $status = 200, public array $headers = [])
{
}
public function get_status(): int
{
return $this->status;
}
/** @return array<string, string> */
public function get_headers(): array
{
return $this->headers;
}
}
}
if (! class_exists('WP_REST_Response')) {
class WP_REST_Response extends WP_HTTP_Response
{
}
}