[wp-trac] [WordPress Trac] #23226: Always use meta caps directly instead of going through the post_type_object->caps array

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


#23226: Always use meta caps directly instead of going through the
post_type_object->caps array
-------------------------------------+---------------------
 Reporter:  markjaquith              |       Owner:  nacin
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:  3.6
Component:  Role/Capability          |     Version:
 Severity:  normal                   |  Resolution:  fixed
 Keywords:  has-patch needs-testing  |
-------------------------------------+---------------------

Comment (by ocean90):

 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/23226#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list