[wp-trac] [WordPress Trac] #25177: map_meta_cap() doesn't require $post_author_data
WordPress Trac
noreply at wordpress.org
Thu Aug 29 12:19:02 UTC 2013
#25177: map_meta_cap() doesn't require $post_author_data
--------------------------+-----------------------------
Reporter: duck_ | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Performance | Version: 2.0
Severity: normal | Keywords: has-patch
--------------------------+-----------------------------
`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()`
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25177>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list