Opened 14 years ago
Closed 10 years ago
#20745 closed defect (bug) (worksforme)
Hard-code less capability types
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 3.0 |
| Component: | Role/Capability | Keywords: | has-patch close |
| Focuses: | Cc: |
Description
We still hard-code some capability types thoughout the admin area.
For example edit_post is hard-coded as the edit attachment capability in the edit attachment pages. It should be pulled from the post type object instead so that it can be modified.
I've patched the ones I found.
Attachments (1)
Change History (7)
#1
@
14 years ago
Version 0, edited 14 years ago
by
(next)
#2
@
14 years ago
Had we done meta capabilities with the rest of custom post types in 3.0, I don't think edit_post, read_post, or delete_post would have made it into the $cap object.
Note: See
TracTickets for help on using
tickets.
'edit_post' is a meta capability. In other words, the conversion you made in your patch are already done in map_meta_cap(). Same for 'delete_post' etc.