On this page
apply_filters( 'wp_query_search_exclusion_prefix', string $exclusion_prefix )
Filters the prefix that indicates that a search term should be excluded from results.
Parameters
$exclusion_prefixstring-
The prefix. Default
'-'. Returning an empty value disables exclusions.
Source
File: wp-includes/class-wp-query.php. View all references
$exclusion_prefix = apply_filters( 'wp_query_search_exclusion_prefix', '-' );
Related
Used By
| Used By | Description |
|---|---|
| WP_Query::parse_search() wp-includes/class-wp-query.php | Generates SQL for the WHERE clause based on passed search terms. |
Changelog
| Version | Description |
|---|---|
| 4.7.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_query_search_exclusion_prefix