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.
Built from https://develop.svn.wordpress.org/trunk@55696


git-svn-id: http://core.svn.wordpress.org/trunk@55208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2023-04-28 10:05:21 +00:00
parent a14d6d04e6
commit 19b456f9f8
2 changed files with 1 additions and 3 deletions

View File

@ -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',

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.3-alpha-55695';
$wp_version = '6.3-alpha-55696';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.