apply_filters( ‘wp_query_search_exclusion_prefix’, string $exclusion_prefix )

In this article

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

$exclusion_prefix = apply_filters( 'wp_query_search_exclusion_prefix', '-' );

Changelog

VersionDescription
4.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.