Recent

Close_Date_Commandclass

Close_Date_Command

Manage per-post comment and ping close dates.

Namespace: WebberZone\AutoClose\CLI
Since: 3.2.0
Source: includes/cli/class-close-date-command.php line 21 Extends: Base_Command

Methods

__construct()

Constructor.

Since: 3.2.0
Line: 37

public function __construct( $close_date = ... );
Type Name Description
Close_Date|null $close_date Close-date processor.

list()

List configured per-post close dates.

OPTIONS

[…] : Post IDs. Omit to list posts with a configured close date.

[–post-ids=] : Comma-separated post IDs.

[–limit=] : Maximum rows when listing all posts. Default: 100. Maximum: 1000.

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

EXAMPLES

wp autoclose close-date list
wp autoclose close-date list 1234 --format=json

Since: 3.2.0
Line: 68

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

Returns: void

set()

Set one or both per-post close dates.

OPTIONS

[] : Post ID.

[–post-ids=] : Comma-separated post IDs. Exactly one ID is required.

[–comments=] : Site-local close date in Y-m-dTH:i format.

[–pings=] : Site-local close date in Y-m-dTH:i format.

[–dry-run] : Show the normalized dates without saving or scheduling them.

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

EXAMPLES

wp autoclose close-date set 1234 --comments=2026-10-01T09:00
wp autoclose close-date set 1234 --comments=2026-10-01T09:00 --pings=2026-10-01T09:00

Since: 3.2.0
Line: 135

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

Returns: void

clear()

Clear one or both per-post close dates.

OPTIONS

[…] : Post IDs.

[–post-ids=] : Comma-separated post IDs.

[–comments] : Clear only comment close dates.

[–pings] : Clear only ping close dates.

[–dry-run] : Show what would be cleared without changing metadata or schedules.

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

EXAMPLES

wp autoclose close-date clear 1234
wp autoclose close-date clear 1234 5678 --comments

Since: 3.2.0
Line: 217

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

Returns: void