﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
23226,Always use meta caps directly instead of going through the post_type_object->caps array,markjaquith,nacin,"When using post-related meta caps in core, we should use their meta cap name instead of manually digging into the post object looking for the cap.

e.g.

Do this:

{{{
if ( ! current_user_can( 'edit_post', $post_id ) ) {
  // ...
}
}}}

Instead of this:

{{{
$post_type = get_post_type_object( get_post_type( $post_id ) );
if ( ! current_user_can( $post_type->cap->edit_post, $post_id ) ) {
  // ...
}
}}}

Our meta caps resolve custom caps for the meta caps (if someone has been foolish enough to use them), and we should be consistent about doing it that way so people know that's the right way to do it.",defect (bug),assigned,normal,3.6,Role/Capability,,normal,,has-patch needs-testing,nashwan.doaqan@…
