Exclude_Command
Manage posts excluded from related-post results.
Namespace: WebberZone\Contextual_Related_Posts\Pro\CLI
Since: 4.5.0
Source: includes/pro/cli/class-exclude-command.php line 21
Extends: Base_Command
Methods
__construct()
Constructor.
Line: 35
public function __construct( Exclusion_Service $service );
| Type | Name | Description |
|---|---|---|
Exclusion_Service |
$service |
Exclusion service. |
add()
Exclude a post from related-post results.
OPTIONS
EXAMPLES
wp crp exclude add 123
Since: 4.5.0
Line: 56
public function add( array $args, array $assoc_args ): void;
| Type | Name | Description |
|---|---|---|
array |
$args |
Positional arguments. |
array |
$assoc_args |
Associative arguments. |
Returns: void
remove()
Include a previously excluded post.
OPTIONS
EXAMPLES
wp crp exclude remove 123
Since: 4.5.0
Line: 78
public function remove( array $args, array $assoc_args ): void;
| Type | Name | Description |
|---|---|---|
array |
$args |
Positional arguments. |
array |
$assoc_args |
Associative arguments. |
Returns: void
list()
List excluded posts.
OPTIONS
[–limit=
[–offset=
[–format=
EXAMPLES
wp crp exclude list
wp crp exclude list --format=json
Since: 4.5.0
Line: 107
public function list( array $args, array $assoc_args ): void;
| Type | Name | Description |
|---|---|---|
array |
$args |
Positional arguments. |
array |
$assoc_args |
Associative arguments. |
Returns: void