[wp-trac] [WordPress Trac] #46283: Allow filtering post-type archive rewrites
WordPress Trac
noreply at wordpress.org
Wed Feb 20 02:59:18 UTC 2019
#46283: Allow filtering post-type archive rewrites
-------------------------------+--------------------------------------
Reporter: ethitter | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 3.1
Severity: normal | Keywords: has-patch has-unit-tests
Focuses: |
-------------------------------+--------------------------------------
If one wishes to introduce additional query arguments into a post-type
archive's rewrite structure, the current options are rather cumbersome:
filter the rewrites as they're generated, filter the whole rewrites array,
or reproduce a considerable amount of logic from
`WP_Post_Type::add_rewrite_rules()`. By introducing a few filters on the
archive-specific rewrites, it becomes far easier to customize a post
type's archive rewrites.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46283>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list