Recent

Search_CommandclassPro only

Search_Command

Execute searches via WP-CLI.

Namespace: WebberZone\Better_Search\Pro\CLI
Since: 4.3.0
Source: includes/pro/cli/class-search-command.php line 21 Extends: Base_Command

Methods

__invoke()

Execute a search query and display results.

OPTIONS

… : Search term to query. Multiple words are joined into a single query (no quoting needed).

[–limit=] : Number of results to show. Default: 10

[–post-type=] : Comma-separated post types. Default: post

[–[no-]use-fulltext] : Force FULLTEXT search on or off, overriding the plugin setting.

[–[no-]boolean-mode] : Force boolean mode on or off, overriding the plugin setting.

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

[–verbose] : Show URL and excerpt for each result.

EXAMPLES

wp bsearch search WordPress
wp bsearch search php tutorial --limit=20 --format=json
wp bsearch search mysql --post-type=post,page --use-fulltext
wp bsearch search it's a test --verbose

Line: 59

public function __invoke( array $args, array $assoc_args ): void;
Type Name Description
array $args Command arguments.
array $assoc_args Command associative arguments.

Returns: void