feat: plugin scaffold with dependency check
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:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
if (! class_exists('WP_Error')) {
|
||||
class WP_Error
|
||||
{
|
||||
public function __construct(
|
||||
private string $code = '',
|
||||
private string $message = '',
|
||||
private mixed $data = null
|
||||
) {
|
||||
}
|
||||
|
||||
public function get_error_code(): string
|
||||
{
|
||||
return $this->code;
|
||||
}
|
||||
|
||||
public function get_error_message(): string
|
||||
{
|
||||
return $this->message;
|
||||
}
|
||||
|
||||
public function get_error_data(): mixed
|
||||
{
|
||||
return $this->data;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
if (! class_exists('WP_User')) {
|
||||
class WP_User
|
||||
{
|
||||
public int $ID = 0;
|
||||
public array $roles = [];
|
||||
|
||||
public function __construct(int $id = 0, array $roles = [])
|
||||
{
|
||||
$this->ID = $id;
|
||||
$this->roles = $roles;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user