Abilities
Registers the shared Better Search abilities.
Namespace: WebberZone\Better_Search
Since: 4.5.0
Source: includes/class-abilities.php line 21
Methods
__construct()
Register ability hooks.
Since: 4.5.0
Line: 28
public function __construct( );
register_category()
Register the WebberZone ability category if it is not already present.
Since: 4.5.0
Line: 43
public function register_category( ): void;
Returns: void
register_abilities()
Register the shared abilities.
Since: 4.5.0
Line: 62
public function register_abilities( ): void;
Returns: void
can_search()
Check whether the current user can run a search.
Since: 4.5.0
Line: 157
public function can_search( $input = ... ): bool;
| Type | Name | Description |
|---|---|---|
mixed |
$input |
Ability input. |
Returns: bool — Whether the search may run.
search()
Run a relevance-weighted search.
Since: 4.5.0
Line: 172
public function search( $input ): array|\WP_Error;
| Type | Name | Description |
|---|---|---|
mixed |
$input |
Ability input. |
Returns: array|\WP_Error — Search results or an error.