#4991 closed defect (bug) (fixed)
Edit post post_type should actually be the post_type
Reported by: | filosofo | Owned by: | |
---|---|---|---|
Milestone: | 2.5 | Priority: | normal |
Severity: | normal | Version: | 2.3 |
Component: | General | Keywords: | post_type edit has-patch |
Focuses: | Cc: |
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 (4)
Change History (12)
#3
@
17 years ago
Since we've already fetched the post, we can use what's already there. See post_type.diff.
#5
@
17 years ago
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.
Note: See
TracTickets for help on using
tickets.
Some sanitization is probably in order if we allow arbitrary types. Perhaps add sanitize_title to the pre_post_type filter?