date_rewrite_rules WordPress Filter Hook
The date_rewrite_rules hook allows you to change the date-based permalinks for your WordPress site. This hook is called when the date rewrite rules are generated.
apply_filters( 'date_rewrite_rules', string[] $date_rewrite ) #
Filters rewrite rules used for date archives.
Description
Likely date archives would include /yyyy/
, /yyyy/mm/
, and /yyyy/mm/dd/
.
Parameters
- $date_rewrite
(string[])Array of rewrite rules for date archives, keyed by their regex pattern.
Source
Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |