Comments_Command
Open or close comments from the command line.
Namespace: WebberZone\AutoClose\CLI
Since: 3.2.0
Source: includes/cli/class-comments-command.php line 21
Extends: Discussions_Command
Methods
__construct()
Constructor.
Since: 3.2.0
Line: 30
public function __construct( $comments = ... );
| Type | Name | Description |
|---|---|---|
Comments|null |
$comments |
Discussion processor. |
close()
Close matching comments.
OPTIONS
[
[–post-ids=
[–age=
[–post-types=
[–exclude-terms=
[–dry-run] : Report matching posts without changing content.
[–sample=
[–format=
EXAMPLES
wp autoclose comments close --age=90 --post-types=post,page
wp autoclose comments close 1234 5678
wp autoclose comments close --dry-run --format=json
Since: 3.2.0
Line: 74
public function close( $args, $assoc_args ): void;
| Type | Name | Description |
|---|---|---|
array |
$args |
Positional arguments. |
array |
$assoc_args |
Associative arguments. |
Returns: void
open()
Open matching comments.
OPTIONS
[
[–post-ids=
[–age=
[–post-types=
[–exclude-terms=
[–dry-run] : Report matching posts without changing content.
[–sample=
[–format=
EXAMPLES
wp autoclose comments open 1234
wp autoclose comments open --post-types=post
Since: 3.2.0
Line: 117
public function open( $args, $assoc_args ): void;
| Type | Name | Description |
|---|---|---|
array |
$args |
Positional arguments. |
array |
$assoc_args |
Associative arguments. |
Returns: void