W3cubDocs

/WordPress

apply_filters( 'search_rewrite_rules', string[] $search_rewrite )

Filters rewrite rules used for search archives.

Description

Likely search-related archives include /search/search+query/ as well as pagination and feed paths for a search.

Parameters

$search_rewrite

(string[]) Array of rewrite rules for search queries, keyed by their regex pattern.

Source

File: wp-includes/class-wp-rewrite.php

View on Trac

Changelog

Version Description
1.5.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/search_rewrite_rules