Recent

Pings_Commandclass

Pings_Command

Open or close pingbacks and trackbacks from the command line.

Namespace: WebberZone\AutoClose\CLI
Since: 3.2.0
Source: includes/cli/class-pings-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 pingbacks and trackbacks.

OPTIONS

[…] : Post IDs. Omit to operate on every matching public non-attachment post type supporting trackbacks.

[–post-ids=] : Comma-separated post IDs. Can be used instead of positional IDs.

[–age=] : Only match posts older than this many days. Default: 0 (no age filter).

[–post-types=] : Comma-separated post types to include. Overrides the default post types.

[–exclude-terms=] : Comma-separated term taxonomy IDs to exclude.

[–dry-run] : Report matching posts without changing content.

[–sample=] : Maximum sample rows in dry-run output. Default: 10. Maximum: 100. Requires –dry-run; errors otherwise.

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

EXAMPLES

wp autoclose pings close --age=90 --post-types=post,page
wp autoclose pings close 1234 5678
wp autoclose pings 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 pingbacks and trackbacks.

OPTIONS

[…] : Post IDs. Omit to operate on every matching public non-attachment post type supporting trackbacks.

[–post-ids=] : Comma-separated post IDs. Can be used instead of positional IDs.

[–age=] : Only match posts older than this many days. Default: 0 (no age filter).

[–post-types=] : Comma-separated post types to include. Overrides the default post types.

[–exclude-terms=] : Comma-separated term taxonomy IDs to exclude.

[–dry-run] : Report matching posts without changing content.

[–sample=] : Maximum sample rows in dry-run output. Default: 10. Maximum: 100. Requires –dry-run; errors otherwise.

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

EXAMPLES

wp autoclose pings open 1234
wp autoclose pings 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