Ticket #4991 (closed defect (bug): fixed)
Edit post post_type should actually be the post_type
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.5 |
| Component: | General | Version: | 2.3 |
| Severity: | normal | Keywords: | post_type edit has-patch |
| Cc: | filosofo |
Description
Lately for a couple of plugins I've created a custom post_type.
However, when editing a post, the post_type input field has hard-coded "post" as its value, meaning post_type is always overwritten as "post."
My patch sets the post_type field with whatever the post type actually is.
Attachments
Change History
Some sanitization is probably in order if we allow arbitrary types. Perhaps add sanitize_title to the pre_post_type filter?
Since we've already fetched the post, we can use what's already there. See post_type.diff.
For the post_type sanitizer, we should use a less expensive function than sanitize_title() which does UTF-8 octet encoding and accent removal. Something more like sanitize_user() strict.
- Status changed from new to closed
- Resolution set to fixed

