wp_search_stopwords filter-hookWP 3.7.0

Filters stopwords used when parsing search terms.

Usage

add_filter( 'wp_search_stopwords', 'wp_kama_search_stopwords_filter' );

/**
 * Function for `wp_search_stopwords` filter-hook.
 * 
 * @param string[] $stopwords Array of stopwords.
 *
 * @return string[]
 */
function wp_kama_search_stopwords_filter( $stopwords ){

	// filter...
	return $stopwords;
}
$stopwords(string[])
Array of stopwords.

Changelog

Since 3.7.0 Introduced.

Where the hook is called

WP_Query::get_search_stopwords()
wp_search_stopwords
wp-includes/class-wp-query.php 1513
$this->stopwords = apply_filters( 'wp_search_stopwords', $stopwords );

Where the hook is used in WordPress

Usage not found.