Recent

CLIclass

CLI

Manage AutoClose maintenance from the command line.

Namespace: WebberZone\AutoClose\CLI
Since: 3.2.0
Source: includes/cli/class-cli.php line 22 Extends: Base_Command

Methods

__construct()

Constructor.

Since: 3.2.0
Line: 67

public function __construct( $runner = ... );
Type Name Description
Runner|null $runner Maintenance runner.

status()

Show plugin and cron health status.

OPTIONS

[–format=] : Output format. Options: table, json, csv. Default: table.

EXAMPLES

wp autoclose status
wp autoclose status --format=json

Since: 3.2.0
Line: 90

public function status( $args, $assoc_args ): void;
Type Name Description
array $args Positional arguments.
array $assoc_args Associative arguments.

Returns: void

run()

Run configured maintenance or show a read-only preview.

OPTIONS

[–dry-run] : Show the effective filters, counts, and a sample without changing content, settings, events, or notifications.

[–sample=] : Maximum sample rows per operation in dry-run output. Only available with –dry-run. Default: 10. Maximum: 100.

[–yes] : Skip confirmation when configured revision deletion makes the run destructive. Use this for unattended runs.

[–format=] : Output format. Options: table, json, csv. Default: table.

EXAMPLES

wp autoclose run
wp autoclose run --dry-run
wp autoclose run --dry-run --sample=25 --format=json
wp autoclose run --yes

Since: 3.2.0
Line: 127

public function run( $args, $assoc_args ): void;
Type Name Description
array $args Positional arguments.
array $assoc_args Associative arguments.

Returns: void