[wp-trac] [WordPress Trac] #31154: register_post_type function does not check reserved post_types
WordPress Trac
noreply at wordpress.org
Mon Nov 23 19:34:14 UTC 2015
#31154: register_post_type function does not check reserved post_types
-------------------------------+------------------------------
Reporter: sebastiaandegeus | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 4.2
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-------------------------------+------------------------------
Comment (by WraithKenny):
Just an idea, but what about an API for registering reserved terms,
perhaps for 4.5? Core code, when registering post_types for example, would
call `register_reserved_term('post')` or somesuch. Perhaps and array of
terms, with a reference to the `__FILE__` (might be useful for debugging),
a descriptions, whether its added by core, etc. Then, other functions
(core and user) could check this list (like for tax identifiers, page
slugs, etc), and plugins could extend the list from the same API. Might be
better than the adhoc convention...
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31154#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list