#4991 closed defect (bug) (fixed)
Edit post post_type should actually be the post_type
| Reported by: | filosofo | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.5 |
| Component: | General | Version: | 2.3 |
| Severity: | normal | Keywords: | post_type edit has-patch |
| Cc: | Focuses: |
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
@
19 years ago
Since we've already fetched the post, we can use what's already there. See post_type.diff.
#5
@
19 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Some sanitization is probably in order if we allow arbitrary types. Perhaps add sanitize_title to the pre_post_type filter?