Status
Stores the latest maintenance outcome and reports cron health.
Namespace: WebberZone\AutoClose\Maintenance
Since: 3.2.0
Source: includes/maintenance/class-status.php line 21
Methods
get_saved() static
Get the latest persisted maintenance status for the current site.
Since: 3.2.0
Line: 37
static public function get_saved( ): array;
Returns: array — Latest status, or an empty array when no run has completed.
save() static
Save the latest maintenance status for the current site.
Since: 3.2.0
Line: 51
static public function save( array $status ): bool;
| Type | Name | Description |
|---|---|---|
array |
$status |
Status data. |
Returns: bool — Whether WordPress accepted the update.
record_attempt() static
Mark the beginning of a maintenance attempt.
Since: 3.2.0
Line: 63
static public function record_attempt( int $timestamp, string $run_id ): void;
| Type | Name | Description |
|---|---|---|
int |
$timestamp |
Attempt timestamp. |
string |
$run_id |
Run identifier. |
Returns: void
record_run() static
Record a completed maintenance run.
Only the latest summary is kept. Successful zero-change runs update the successful timestamp; partial and failed runs do not.
Since: 3.2.0
Line: 89
static public function record_run( array $summary ): void;
| Type | Name | Description |
|---|---|---|
array |
$summary |
Completed run summary. |
Returns: void
get() static
Return current site, feature, schedule, and latest-run status.
Since: 3.2.0
Line: 127
static public function get( ): array;
Returns: array — Status report.