Opened 11 years ago
Closed 11 years ago
#25177 closed defect (bug) (fixed)
map_meta_cap() doesn't require $post_author_data
Reported by: | duck_ | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.7 | Priority: | normal |
Severity: | normal | Version: | 2.0 |
Component: | Performance | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
map_meta_cap()
sets up $post_author_data
to check if a user is editing/deleting/reading their own post. However, the only piece of data required is the ID. To get this data we already have $post_author_id
from $post->post_author
or $user_id
.
Related: [21563] for #21120 did some optimisations to avoid get_userdata()
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
Passes all existing tests.