string $rules )
Filters the full set of generated rewrite rules.
(string) The compiled array of rewrite rules, keyed by their regex pattern.
- This filter hook can be used to any rule in the rewrite rules array.
- Since rewrite rules are saved to the database, you must flush/update your rules from your admin under Settings > Permalinks before your changes will take effect. You can also use the flush_rules() function to do this programmatically.
- Make sure you return the $rules array or very bad things will happen.