mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-02-24 09:42:45 +00:00
REST API: Remove unused variable from the permissions check for deleting a revision.
`WP_REST_Revisions_Controller::delete_item_permissions_check()` no longer uses the value of the `$parent_post_type` variable anywhere. Follow-up to [45812], [47547], [47850]. Props Soean, mukesh27. Fixes #58218. git-svn-id: https://develop.svn.wordpress.org/trunk@55696 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5c247f75f3
commit
5e4d1bc2d6
@ -410,8 +410,6 @@ class WP_REST_Revisions_Controller extends WP_REST_Controller {
|
||||
return $parent;
|
||||
}
|
||||
|
||||
$parent_post_type = get_post_type_object( $parent->post_type );
|
||||
|
||||
if ( ! current_user_can( 'delete_post', $parent->ID ) ) {
|
||||
return new WP_Error(
|
||||
'rest_cannot_delete',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user