(permastructname)_rewrite_rules filter-hook . WP 3.1.0
Filters rewrite rules used for individual permastructs.
The dynamic portion of the hook name, $permastructname, refers to the name of the registered permastruct, e.g. 'post_tag' (tags), 'category' (categories), etc.
Usage
add_filter( '(permastructname)_rewrite_rules', 'filter_function_name_8596' ); function filter_function_name_8596( $rules ){ // filter... return $rules; }
- $rules(string[])
- Array of rewrite rules generated for the current permastruct, keyed by their regex pattern.
Changelog
Since 3.1.0 | Introduced. |
Where the hook is called
(permastructname)_rewrite_rules
wp-includes/class-wp-rewrite.php 1407
$rules = apply_filters( "{$permastructname}_rewrite_rules", $rules );