Opened 15 years ago
Closed 15 years ago
#12987 closed defect (bug) (fixed)
Some capability checks need update for custom post types
Reported by: | duck_ | Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Posts, Post Types | Keywords: | has-patch |
Focuses: | Cc: |
Description
Create new custom post type (e.g. album) with capability_type
page. Create new subscriber and add necessary capabilities to interact with the new post type (most importantly edit_others_pages, publish_pages and edit_published_pages). If you login as the new user and try to publish a new album post it will only create a album post with status pending. Also if you try to edit an album post created by a different user when you click update WordPress dies with the error 'You are not allowed to edit posts as this user.'
Cause of both of these problems is in _wp_translate_postdata.
Attachments (1)
Change History (2)
Note: See
TracTickets for help on using
tickets.
(In [14130]) Update _wp_translate_postdata() capability checks to use Post Type API capability fields. Props duck_. Fixes #12987