Opened 3 years ago
Last modified 22 months ago
#12510 new feature request
There should be an API to register post_types and post_status
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Post Types | Version: | 3.0 |
| Severity: | normal | Keywords: | reporter-feedback |
| Cc: |
Description
Presently the available (default) post_types and post_statuses are stored in wp-includes/post.php and called on init.
Shouldn't they be stored in the DB (perhaps in the options table). This would make it much easier / cleaner to add / manage custom post_types.
Essentially as the post_type array contains meta-data about that posts of that type I don't believe that it is good practice to store that statically.
This could be very easily implemented for 3.0 release and clean up a whole lot of hacking / issues and make a uniform way of storing custom post_types.
Change History (4)
- Priority changed from high to normal
- Summary changed from Shouldn't post_types and post_status be stored in DB? to There should be an API to register post_types and post_status
- Milestone changed from 3.0 to Future Release
Currently, the lack of storage is by design. We might add it later once some storage issues are worked out.
- Keywords cck added
The current problem is that now plugins dealing with custom content types all store that data in different places. This means that it is very hard to manage and that when the plugin is removed you loose all the defined custom content. It also means that you have different plugins defining custom content differently and not being able to interact with each other.
If this is by design it seems that the design may need improvement. What are the actual draw backs of storing this small data in table, all custom content plugins are already doing this in their own haphazard way?

There should be some sort of register() action. I think this was discussed in the custom post type discussions.