apply_filters( "{$permastructname}_rewrite_rules", string[] $rules )
Filters rewrite rules used for individual permastructs.
Description
The dynamic portion of the hook name, $permastructname
, refers to the name of the registered permastruct, e.g. ‘post_tag’ (tags), ‘category’ (categories), etc.
Parameters
- $rules
-
(string[]) Array of rewrite rules generated for the current permastruct, keyed by their regex pattern.
More Information
This filter hook allows you to modify various custom permastructs, such as those generated for custom post types or taxonomies (both built-in or custom).
Source
Changelog
Version | Description |
---|---|
3.1.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/permastructname_rewrite_rules