[wp-trac] [WordPress Trac] #50128: Don't retrieve the post type object for checking post meta capabilities

WordPress Trac noreply at wordpress.org
Fri May 8 10:18:00 UTC 2020


#50128: Don't retrieve the post type object for checking post meta capabilities
-----------------------------+-----------------------
 Reporter:  ocean90          |      Owner:  (none)
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  5.5
Component:  Role/Capability  |    Version:
 Severity:  normal           |   Keywords:  has-patch
  Focuses:                   |
-----------------------------+-----------------------
 Previously: #23226

 There are a few places in core where `get_post_type_object( $post_type
 )->cap->edit_post` is used for a capability check. This is not required
 because `map_meta_cap()` does actually the same for meta caps.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50128>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list