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
[–limit=
[–post-type=
[–[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=
[–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