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

WordPress Trac noreply at wordpress.org
Sun May 10 06:05:15 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           |  Resolution:
 Keywords:  has-patch        |     Focuses:
-----------------------------+---------------------

Comment (by peterwilsoncc):

 @ocean90 I checked out the code, you're right this can be made safely.

 The additional checks that are run (ensuring the post type is registered
 and ensuring revisions use the parent's post caps) won't adversely affect
 the existing checks. This applies for the read, edit and delete meta caps.

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


More information about the wp-trac mailing list