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

WordPress Trac noreply at wordpress.org
Sat May 23 15:23:07 UTC 2020


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

 * owner:  (none) => ocean90
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"47850" 47850]:
 {{{
 #!CommitTicketReference repository="" revision="47850"
 Role/Capability: Use meta caps `edit_post`, `read_post`, and `delete_post`
 directly.

 Rather than consulting the post type object, let `map_meta_cap()` handle
 that for us.

 Props peterwilsoncc, ocean90.
 Fixes #50128.
 See #23226.
 }}}

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


More information about the wp-trac mailing list