[wp-trac] [WordPress Trac] #44270: Non-public custom post types have rewrite rules enabled by default
WordPress Trac
noreply at wordpress.org
Tue May 29 22:02:32 UTC 2018
#44270: Non-public custom post types have rewrite rules enabled by default
-------------------------------+-----------------------------
Reporter: TheDeadMedic | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version:
Severity: trivial | Keywords:
Focuses: |
-------------------------------+-----------------------------
Is there a reason for the pairing of `public => false` with `rewrite =>
true` for default custom post type arguments? If there isn't can we change
the default `rewrite` to inherit `public` at runtime?
I often see a large rewrite rules array from plugin/theme private post
types not declaring `rewrite => false` - if there's no need for them seems
bit of a waste - a default WP install is 17 rules per post type, 17
possible unnecessary regex checks per-request. Usually it's two or three
CPTs I see per site and they stack up quick.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44270>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list